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 608786 - [mpegtsmux] Internal H.264 byte-stream wrapping isn't working correctly
[mpegtsmux] Internal H.264 byte-stream wrapping isn't working correctly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal major
: 0.10.22
Assigned To: David Schleef
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-02 12:01 UTC by Veli-Matti Nurmenniemi
Modified: 2011-04-24 23:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Access Unit Delimeters codes added (7.85 KB, application/octet-stream)
2010-02-02 12:01 UTC, Veli-Matti Nurmenniemi
  Details
Updated patch against git head (1.49 KB, patch)
2011-03-26 09:00 UTC, Jan Schmidt
none Details | Review

Description Veli-Matti Nurmenniemi 2010-02-02 12:01:06 UTC
Created attachment 152827 [details]
Access Unit Delimeters codes added

Problem:

Some players (e.g. Sony Bravia) won't display video when GStreamer's mpegtsmuxer is used for transcoding MP4 H.264 to TS H.264 (byte-stream).


Used pipeline:

mpegtsmux name=mux ! filesink location=OUTPUT.TS filesrc location=INPUT.MP4 ! qtdemux name=demux ! queue ! mux. demux. ! queue ! mux.


Solution:

Mpegtsmuxer needs to be modified to add Access Unit Delimiter before each AVC access units. In H.264 standard (ITU-T Rec. H.264 | ISO/IEC 14496-10) Access Unit Delimiter is an optional (may) feature. But in contrast to that, in Transport Stream standard (ITU-T Rec. H.222.0 | ISO/IEC 13818-1: http://neuron2.net/library/avc/T-REC-H%5B1%5D.222.0-200403-I!Amd3!PDF-E.pdf) Access Unit Delimiter is upgraded to required (shall) feature. 


Example solution:

See attached mpegtsmux_h264.c. 

All the modifications are under 'ADD_ACCESS_UNIT_DELIMITER' flag (defined by default). Note that this is just proto code.

With these mods, the resulting TS file is playable e.g. with Sony Bravia.


Notes:

This mod can maybe be added into h264parse internal byte-stream conversion as well??
Comment 1 Sebastian Dröge (slomo) 2010-02-05 16:18:09 UTC
Could you attach your changes as a diff please? This will make reviewing and everything easier :)
Comment 2 Fabio Durán Verdugo 2010-04-05 22:20:15 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 3 Tim-Philipp Müller 2010-04-05 22:35:39 UTC
Fabio Durán Verdugo: please be more careful when closing bugs.

Someone submitted a fix for a bug, just not in the format we usually need. If you just close the bug we'll lose the fix, this is not what we want.
Comment 4 Fabio Durán Verdugo 2010-04-06 02:23:53 UTC
thanks for the correction, it will not happen, I think it was rushed into an old bug
Comment 5 Jan Schmidt 2011-03-26 09:00:00 UTC
Created attachment 184272 [details] [review]
Updated patch against git head

Here's the patch updated for current git. It doesn't seem to cause any harm for me with simple testing, but I don't have any devices that require the access unit delimiter to achieve a positive test.
Comment 6 Jan Schmidt 2011-03-26 09:01:38 UTC
Also, the code should probably check if the access unit delimiter has already been added upstream, in case x264enc or h264parse add it in the future.
Comment 7 David Schleef 2011-04-24 23:37:09 UTC
The pipeline above doesn't make sense, since it is missing an h264parse element, and recent changes make it not negotiate without the h264parse.

commit 55633f5e8f96bbb7c92309348a2d29d1b6446f36
Author: David Schleef <ds@schleef.org>
Date:   Fri Apr 15 22:25:27 2011 -0700

    mpegtsmux: Add byte-stream to h264 caps