[FFmpeg-user] Best way to get a average bit rate per stream?

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Sep 3 21:26:36 EEST 2019


Am Di., 3. Sept. 2019 um 18:39 Uhr schrieb August Johansson
<augustperson25 at gmail.com>:

> I would like to store the average bit rate of every stream in my database.
> I tested using ffprobe -print_format json -show_streams but this
> information does not seem to be there. What would be the best way to return
> this information?

Something like the following prints the average bitrate for the first audio
stream (should be very accurate assuming timestamps are correct):
$ ffmpeg -i input -c copy -map 0:a:0 -f rawvideo -y /dev/null

Carl Eugen


More information about the ffmpeg-user mailing list