How can I limit bitrate of a transcoding video in FFMPEG to keep it under a limit value?
Asked
Active
Viewed 3.2k times
2 Answers
18
You can use this code
ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v

Giacomo1968
- 25,759
- 11
- 71
- 103

alireza akbaribayat
- 424
- 3
- 6
-
4Thank you! exactly I needed `minrate` and `maxrate` – Mahdi Ataollahi Apr 16 '17 at 09:38
-
1-b set video and audio's average bit rate per second – alireza akbaribayat Mar 12 '18 at 15:00
-
Note: "maxrate integer (encoding,audio,video) - Set max bitrate tolerance (in bits/s). Requires bufsize to be set." - see also https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate – Avatar Dec 24 '21 at 08:40
7
Read the documentation here: http://www.ffmpeg.org/ffmpeg-all.html#Description
To set the video bitrate of the output file to 64 kbit/s:
ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi

Saeed Ludeen
- 368
- 3
- 11