GNOME Bugzilla – Bug 696037
[h264parse] Access unit delimiters are missing
Last modified: 2015-07-23 16:45:57 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.
Created attachment 239125 [details] [review] Proposed fix (corrected)
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.
Can't we just add some code to ignore auds in rtph264pay? Or is there any other case where we should drop them ?
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 ?
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.
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)
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 ***