Reputation: 3535
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?
Upvotes: 4
Views: 7015
Reputation: 134253
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.
Upvotes: 9