0

Using ffmpeg, why the bitrate shown during processing differs so much from the final bitrate after processing?

This command on a 1080p source:

ffmpeg -i "$name" -i "$subname" -map 0 -map 1 -vf scale=-1:720 -c:v libx264 -preset veryslow -crf 21 -c:a aac -b:a 256k -c:s:0 srt -disposition:s:0 default -metadata:s:s:0 language=eng -metadata:s:v:0 title="$title" "$new"

Shows this output: enter image description here

Which essentially averages 1300-1400 kBit/s. But when I calculate the bitrate of the resulting video using mkvinfo -t the bitrate shown sits at ~970-1000 kBit/s and that's not even close to averaging the ~1300 kBit/s shown throughout processing. What is causing the disparity?

Aspiring Dev
  • 505
  • 1
  • 4
  • 17

1 Answers1

1

From the documentation of mkvinfo:

mkvinfo -t Show statistics for each track in verbose mode.

I guess, you see the bitrate from the video track, while the ffmepg output is the average bitrate from the whole mkv (audio track + video track). The difference you notice is round about 300kBit/s which is near to your audio bitrate, which is 256kBit/s

The Bndr
  • 13,204
  • 16
  • 68
  • 107