[FFmpeg-user] output bitrate equal to expected bitrate
Moritz Barsnick
barsnick at gmx.net
Thu Apr 13 23:58:46 EEST 2017
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
More information about the ffmpeg-user
mailing list