FFMPEG encode with CBR (constant bit rate)

Example to encode with CPU for CBR @ 30 Mb/s:
ffmpeg -i image_sequence_%4d.png -vcodec h264 -b:v 30M -minrate 30M -maxrate 30M -bufsize 60M -preset slow -r 25 -qmin:v 21 -qmax:v 19 -x264-params "nal-hrd=cbr" movie_name_30Mb.mov

  • -bufsize must be 2x the target bitrate
  • -x264-params "nal-hrd=cbr"

Example to encode with nvidia encoder for CBR @ 30 Mb/s :
ffmpeg -i FILM_image_sequence_%4d.png -c:v h264_nvenc -preset slow  -profile high -cbr true -b:v 30M moviename_nvenc_30Mb.mov
  • -cbr true
  • -b:v 30M