转自:​​https://brokenpipe.wordpress.com/2016/10/07/ffmpeg-h-264-constant-bitrate-cbr-encoding-for-iptv/​

Copy From: ​​https://brokenpipe.wordpress.com/2016/10/07/ffmpeg-h-264-constant-bitrate-cbr-encoding-for-iptv/​

 

Example command using a single-frame VBV:


ffmpeg -i <input> -r 25 -c:v libx264 -x264opts nal-hrd=cbr:force-cfr=1 -b:v 2500k -minrate 2500k -maxrate 2500k -bufsize 100k output.ts


where:

nal-hrd=cbr

set the hypothetical reference decoder (HRD) to CBR and pack the bitstream to the specified bitrate

force-cfr=1

force constant framerate timestamp generation

-b:v

the video bitrate

-minrate
-maxrate

same as the video bitrate for constant bitrate

-bufsize

the video buffering verifier (VBV) buffer size, set for capped frame-size encoding (bufsize = bitrate / framerate)

Additional notes: