After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623678 - qtmux: Write AAC/H.264 bitrate if available
qtmux: Write AAC/H.264 bitrate if available
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal enhancement
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-06 13:00 UTC by Arun Raghavan
Modified: 2010-07-08 02:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
qtmux: Write avg/max bitrate to ESDS if available (6.82 KB, patch)
2010-07-06 13:00 UTC, Arun Raghavan
committed Details | Review
qtmux: Write 'btrt' atom for H.264 media if possible (3.20 KB, patch)
2010-07-06 13:00 UTC, Arun Raghavan
committed Details | Review

Description Arun Raghavan 2010-07-06 13:00:45 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.
Comment 1 Arun Raghavan 2010-07-06 13:00:52 UTC
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.
Comment 2 Arun Raghavan 2010-07-06 13:00:57 UTC
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.
Comment 3 Thiago Sousa Santos 2010-07-06 22:50:50 UTC
Do we extract and rely on those tags in qtdemux?
Comment 4 Arun Raghavan 2010-07-07 02:04:53 UTC
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.
Comment 5 Thiago Sousa Santos 2010-07-08 02:34:40 UTC
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