qtdemux: guess bitrate if only one stream's bitrate is unknown
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 24 May 2010 19:34:43 +0000 (01:04 +0530)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 16 May 2011 11:29:56 +0000 (13:29 +0200)
commitf89caeff5c1820caecfd2e1d9b93ffeb0a477a17
tree1aee34f420444b1dc68340c7673f73488c952293
parent6e2774af55d65c14c628fd1bdc25807808b62b01
qtdemux: guess bitrate if only one stream's bitrate is unknown

If the bitrates for all but one audio/video streams are known, and the
total stream size and duration can be determined, this calculates the
unkown bitrate as (stream size / duration) - (sum of known bitrates).
While this is not guaranteed to be very accurate, it should be good
enough for most purposes.

For example, this is useful for H.263 + AAC streams where no 'btrt' atom
is available for the video portion.

https://bugzilla.gnome.org/show_bug.cgi?id=619548
gst/isomp4/qtdemux.c
gst/isomp4/qtdemux.h