GNOME Bugzilla – Bug 623678
qtmux: Write AAC/H.264 bitrate if available
Last modified: 2010-07-08 02:35:38 UTC
This collects avg/max bitrate tags for streams if available, and writes them out if possible (to the ESDS for AAC streams and "btrt" atom for H.264 streams). The AAC patch is fairly straight-forward, but the H.264 patch needs some explanation. As far as I can tell, the "btrt" atom (called MPEG4BitrateBox in the spec) got dropped from ISO/IEC 14496-15 sometime after 2004. The newer spec drops this box in favour of using using the UUID PROF box which goes just after "ftyp" and is somewhat more comprehensive. Unfortunately, we don't always have enough information to populate it fully (for example, does the stream have a variable bitrate/frame-rate, is it protected, etc.). Given this, I think it makes more sense to just use the "btrt" atom till we have a convincing reason to not use the uuid instead.
Created attachment 165356 [details] [review] qtmux: Write avg/max bitrate to ESDS if available This collects the 'bitrate' and 'maximum-bitrate' tags on the corresponding pad and uses these to populate these fields in the ESDS where applicable.
Created attachment 165357 [details] [review] qtmux: Write 'btrt' atom for H.264 media if possible This writes out the optional 'btrt' atom (MPEG4BitrateBox) for H.264 media if either or both of average and maximum bitrate are available for the stream.
Do we extract and rely on those tags in qtdemux?
We do extract the tags in qtdemux if the information is available. In general if the metadata is available from the container, that takes precedence over any bitrate estimation that we do downstream.
Pushed. commit c28613d8dbde2b2f09cef07ec03a736a6aa3dba5 Author: Arun Raghavan <arun.raghavan@collabora.co.uk> Date: Tue Jul 6 14:48:08 2010 +0530 qtmux: Write 'btrt' atom for H.264 media if possible This writes out the optional 'btrt' atom (MPEG4BitrateBox) for H.264 media if either or both of average and maximum bitrate are available for the stream. https://bugzilla.gnome.org/show_bug.cgi?id=623678 commit 827e401e3a16f77477bf0a9f1fd91df91ef2b772 Author: Arun Raghavan <arun.raghavan@collabora.co.uk> Date: Mon Jul 5 14:09:50 2010 +0530 qtmux: Write avg/max bitrate to ESDS if available This collects the 'bitrate' and 'maximum-bitrate' tags on the corresponding pad and uses these to populate these fields in the ESDS where applicable. https://bugzilla.gnome.org/show_bug.cgi?id=623678