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 696037 - [h264parse] Access unit delimiters are missing
[h264parse] Access unit delimiters are missing
Status: RESOLVED DUPLICATE of bug 736213
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.2.0
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-18 09:30 UTC by Anton Gritsay
Modified: 2015-07-23 16:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (1.05 KB, patch)
2013-03-18 09:30 UTC, Anton Gritsay
none Details | Review
Proposed fix (corrected) (1.57 KB, patch)
2013-03-18 12:59 UTC, Anton Gritsay
needs-work Details | Review

Description Anton Gritsay 2013-03-18 09:30:14 UTC
Created attachment 239104 [details] [review]
Proposed fix

Packing of h264 to mpeg transport stream requires access unit delimiters to precede every GOP and SPS/PPS. In all other applications of h264 au delimiters may or may not present.

Pushing au delimiters from h264parse element allows the output of some_h264_source ! h264parse ! mpegtsmux pipeline be playable by e.g. an iphone. It seems to be harmless enough to be enabled unconditionally.

Please see also https://bugzilla.gnome.org/show_bug.cgi?id=608786 for reference.
Comment 1 Anton Gritsay 2013-03-18 12:59:55 UTC
Created attachment 239125 [details] [review]
Proposed fix (corrected)
Comment 2 David Schleef 2013-03-18 21:02:44 UTC
Agreed, AU delimiters should be unconditionally enabled.

However, I'm pretty sure the delimiter should not be sent in its own buffer for most property settings.
Comment 3 Olivier Crête 2013-03-19 21:24:13 UTC
Can't we just add some code to ignore auds in rtph264pay? Or is there any other case where we should drop them ?
Comment 4 Olivier Crête 2013-06-12 01:12:30 UTC
Comment on attachment 239125 [details] [review]
Proposed fix (corrected)

The patch is wrong, it shouldn't be sent as a separate buffer. But as the first nal of a buffer containing a whole access unit, etc in some cases. And it should check if there is already one and not duplicate it.

Also, does it make sense to send aud in stream-format=avc,alignment=au or just in stream-format=byte-stream ?
Comment 5 Olivier Crête 2013-07-29 07:08:58 UTC
The tricky bit here is to make sure the aud is inserted between access-unit (ie to detect the start of a new AU), the code in h264parse is a bit convoluted. Also, the sps/pps inserting should also be made so that they only happen between AUs, it's currently not the case, so a bit of refactoring of h264parse may be required.
Comment 6 Javier Jardón (IRC: jjardon) 2013-10-10 13:07:37 UTC
Hey, only wanted to confirm the patch from commment #1 make the video work in my iOS devide (iPad).
I know Olivier said the patch is wrong, but only want you to know (also Id say not completely wrong, as it fixed the problem for me)
Comment 7 Jan Schmidt 2015-07-23 16:45:57 UTC
Duping to 736213, which has a more up-to-date attempt at a patch.

*** This bug has been marked as a duplicate of bug 736213 ***