Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set bitrate limit in FFMPEG

How can I limit bitrate of a transcoding video in FFMPEG to keep it under a limit value?

like image 264
Mahdi Ataollahi Avatar asked Apr 16 '17 09:04

Mahdi Ataollahi


People also ask

How do I limit bitrate in FFmpeg?

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.

What is bit rate FFmpeg?

FFmpeg maintains the same audio channels and samples as the source file and applies a bitrate of 128Kbps.

How do I change the buffer size in FFmpeg?

-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.


1 Answers

You can use this code

ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
like image 188
alireza akbaribayat Avatar answered Oct 06 '22 05:10

alireza akbaribayat