GNOME Bugzilla – Bug 608786
[mpegtsmux] Internal H.264 byte-stream wrapping isn't working correctly
Last modified: 2011-04-24 23:37:09 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??
Could you attach your changes as a diff please? This will make reviewing and everything easier :)
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!
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.
thanks for the correction, it will not happen, I think it was rushed into an old bug
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.
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.
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