[FFmpeg-devel] [PATCH] avformat/concatdec: get bit_rate from internal format

Zhang Rui bbcallen at gmail.com
Mon Jan 4 12:49:08 CET 2016


>> av_dump_format() could show something better than 0.
>
> Yes, but what would be the point? How is it actually useful to know the
> average bitrate of a concatenated stream?

Actually, I use custom IO in my own application to prefetch data via HTTP.
I'm trying to calculate duration from bytes with bit_rate, for:
1. Calculate necessary download speed.
2. Adjust prefetch buffer size.
3. Show prefetched duration in progress bar.

I thought AVFormatContext.bit_rate is a convenient alias.
Is AVCodecContext.bit_rate more suitable for these purpose?


More information about the ffmpeg-devel mailing list