How can I limit bitrate of a transcoding video in FFMPEG to keep it under a limit value?
To set a bitrate for a video encode in FFmpeg use -b:v which means bitrate for video, then specify the bitrate value. This can be k for kBits or m for megabits, -b:v 2M is 2 Megabits.
FFmpeg maintains the same audio channels and samples as the source file and applies a bitrate of 128Kbps.
-bufsize. -bufsize sets the buffer size, and can be 1-2 seconds for most gaming screencasts, and up to 5 seconds for more static content. If you use -maxrate 960k then use a -bufsize of 960k-1920k. You will have to experiment to see what looks best for your content.
You can use this code
ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With