Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMpeg default bitrate value

What does FFMpeg do if I specify one codec to reencode and omit bitrate parameter? I tested with one video but I would like to understand

Original:

 Duration: 00:00:10.48, start: 0.000000, bitrate: 17282 kb/s

then I ran

ffmpeg.exe -i a.mp4 -c:v h264 c.mp4

Result:

Duration: 00:00:10.50, start: 0.000000, bitrate: 4467 kb/s

Where did it get 4467 from? is it a standard value for any video or it depends on something?

like image 646
Rafael Lima Avatar asked Oct 17 '25 18:10

Rafael Lima


1 Answers

Depends on the encoder. Assuming -c:v h264 maps to the encoder libx264 then the default rate control method uses -crf 23, not a specific bitrate value (-b:v).

To simplify, CRF targets a quality level and the bitrate is adjusted accordingly to achieve the desired quality. Complex scenes will require more bits than simple easy to compress scenes, so the bitrate can fluctuate over the duration of a video.

See FFmpeg Wiki: H.264.

like image 121
llogan Avatar answered Oct 20 '25 13:10

llogan