[FFmpeg-user] Getting MPEG2 video stream bitrate
Carl Eugen Hoyos
cehoyos at ag.or.at
Mon Apr 28 10:09:45 CEST 2014
Tobias Rapp <t.rapp <at> noa-audio.com> writes:
> Carl Eugen Hoyos wrote:
> > The stream does not save a (constant or average)
> > bitrate, only the maximum bitrate is stored.
>
> Yes but the stream has a de-facto bitrate defined by
> the size of each frame.
But this is not how the bitrate field in AVCodecContext
is defined (and I would not rule out that a patch
changing this will be rejected).
> And if I choose a "probesize" that is too small
> ffprobe reports:
>
> [mxf <at> 0x2f692e0] Stream #0: not enough frames
> to estimate rate; consider increasing probesize
>
> So I guess it is estimating the bitrate from frame
> size but just doen't report the value.
Sorry if you consider the warning misleading (a patch
fixing this may be welcome) but this is not meant,
at least not in the mxf-mpegvideo case.
> I want to find out if that is caused by an incomplete
> arguments list on my side.
No, as said mpeg2video files don't contain the
information you are looking for.
One possibility to get it is to remux the whole
video stream and calculate the bitrate.
ffmpeg (the application) could probably be changed so
that it shows the actual input bitrate(s) on eof (after
conversion). Such a patch may be welcome.
Carl Eugen
More information about the ffmpeg-user
mailing list