Re: [FFmpeg-user] output bitrate equal to expected bitrate
On Sat, Apr 15, 2017 at 10:34:33 +0430, negin tebyani wrote: > mediainfo shows this: > Bit rate mode: Constant > Bit rate : 850 Kbps / 850 Kbps > is this ok?? Are you asking us? You were the one requesting that mediainfo should report this. I don't understand what you are actually trying to achieve, and you didn't answer Carl's and my questions regarding why you want this. Note that neither ffprobe nor mediainfo are "conformance" testers, and they won't tell you whether the actual bitrate throughout is within the constraints given by you. (You might be able to calculate that from ffprobe.) Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] output bitrate equal to expected bitrate
after adding what you suggested, it seems that the bitrate has been equal to what I specified. mediainfo shows this: Bit rate mode: Constant Bit rate : 850 Kbps / 850 Kbps is this ok?? > Furthermore (let me google that for you: > https://forum.doom9.org/showthread.php?p=1478388#post1478388), you can > add the x264 option > > nal-hrd=cbr > > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] output bitrate equal to expected bitrate
2017-04-13 15:25 GMT+02:00 negin tebyani: > I need the bitrate to be constant Do you know what constant bitrate means? (The answer is not trivial and it - of course - does not mean constant frame size) If not, your question makes no sense. Since you are encoding with x264, we may be able to answer (some) questions, but even if there is an issue, we will not be able to fix it. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] output bitrate equal to expected bitrate
On Thu, Apr 13, 2017 at 17:55:37 +0430, negin tebyani wrote: > I need the bitrate to be constant and equal to the one specified (-b:v). Is there a technical reason for this? Anyway, it seems libx264 has issues achieving your desired bitrate - it doesn't have enough information. For more precise bitrate, try two-pass encoding: Add "-pass 1" first time round, "-pass 2" second time. Furthermore (let me google that for you: https://forum.doom9.org/showthread.php?p=1478388#post1478388), you can add the x264 option nal-hrd=cbr Note that (I believe) libx264 will pad the bitstream to achieve the desired bitrate, without adding actual information. Yet mediainfo reports exact bitrate and CBR, if that's your desire. (I tried it, it works.) Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] output bitrate equal to expected bitrate
I am using this command to transcode my videos in ffmpeg: ffmpeg -i 1_med.mp4 -movflags faststart -c:v libx264 -x264opts 'keyint=100:min-keyint=25:no-scenecut:8x8dct:sliced-threads=0' -deblock 1:1 -flags +loop -b:v 850k -maxrate 850k -bufsize 2000k -vf "scale=-1280:720:flags=spline+full_chroma_inp+full_chroma_int+accurate_rnd+bitexact" -acodec libfdk_aac -b:a 320k -coder 1 -me_range 16 -bf 10 -q:v 1 -qmin 0 -qmax 69 -trellis 2 -mbtree 1 -mixed-refs 1 -preset veryfast medfull.mp4 and here is the output of mediainfo: Complete name: medToCheck.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom File size: 79.0 MiB Duration : 10mn 0s Overall bit rate mode: Variable Overall bit rate : 1 104 Kbps Writing application : Lavf56.25.101 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : Yes Format settings, ReFrames: 4 frames Codec ID : avc1 Codec ID/Info: Advanced Video Coding Duration : 10mn 0s Bit rate : 779 Kbps Nominal bit rate : 850 Kbps Width: 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth: 8 bits Scan type: Progressive Bits/(Pixel*Frame) : 0.034 Stream size : 55.7 MiB (71%) Writing library : x264 core 142 r2495 6a301b6 Encoding settings: cabac=1 / ref=1 / deblock=1:1:1 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=10 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=100 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc_lookahead=10 / rc=cbr / mbtree=1 / bitrate=850 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=850 / vbv_bufsize=2000 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00 Language : English Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 10mn 0s Bit rate mode: Variable Bit rate : 320 Kbps Maximum bit rate : 850 Kbps Channel count: 2 channels Channel positions: Front: L R Sampling rate: 48.0 KHz Compression mode : Lossy Delay relative to video : 80ms Stream size : 22.9 MiB (29%) Language : English and ffmpeg console output: [root@vm1-108 FullVideoToTestOurCommand2]# ffmpeg -i 1_med.mp4 -movflags faststart -c:v libx264 -x264opts 'keyint=100:min-keyint=25:no-scenecut:8x8dct:sliced-threads=0' -deblock 1:1 -flags +loop -b:v 850k -maxrate 850k -bufsize 2000k -vf "scale=-1280:720:flags=spline+full_chroma_inp+full_chroma_int+accurate_rnd+bitexact" -acodec libfdk_aac -b:a 320k -coder 1 -me_range 16 -bf 10 -q:v 1 -qmin 0 -qmax 69 -trellis 2 -mbtree 1 -mixed-refs 1 -preset veryfast -ss 00:00:00 -t 00:10:00 medToCheckNominalBitrateWithBufzieEqualToMaxrate.mp4 ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394