Discussion:
[Bug 736213] New: h264parse: process NAL AU DELIMITER
Add Reply
"GStreamer" (bugzilla.gnome.org)
2014-09-06 23:34:05 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

Summary: h264parse: process NAL AU DELIMITER
Classification: Platform
Product: GStreamer
Version: git
OS/Version: Linux
Status: UNCONFIRMED
Severity: enhancement
Priority: Normal
Component: gst-plugins-bad
AssignedTo: gstreamer-***@lists.freedesktop.org
ReportedBy: ***@gmail.com
QAContact: gstreamer-***@lists.freedesktop.org
GNOME version: ---


there is no reason to dump AU delimiter until we get SPS PPS as
AU is harmless NAL

for example:
AU SPS PPS IDR AU SLICE AU SLICE ..................
produce:
SPS PPS IDR AU SLICE AU SLICE ..................

iDevices don't play hls stream without AU delimiter for every frame
so If I have h264parse after encoder h264 parse dump first AU delimiter
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-06 23:34:40 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

--- Comment #1 from m][sko <***@gmail.com> 2014-09-06 23:34:31 UTC ---
Created an attachment (id=285598)
View: https://bugzilla.gnome.org/attachment.cgi?id=285598
Review: https://bugzilla.gnome.org/review?bug=736213&attachment=285598

process NAL AU delimiter
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-06 23:36:16 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

--- Comment #2 from m][sko <***@gmail.com> 2014-09-06 23:36:14 UTC ---
to 1.4 branch too plz
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-07 09:53:12 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

Julien Isorce <julien.isorce> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-09 14:54:33 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

Olivier Crete (Tester) <olivier.crete> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@ocrete.ca

--- Comment #3 from Olivier Crete (Tester) <***@ocrete.ca> 2014-09-09 14:54:27 UTC ---
Actually, we need to insert AU delimiters between AUs when outputting
byte-stream mode to create a valid stream (for MPEG-TS embedding).
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-12 12:27:41 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

Sebastian Dröge (slomo) <slomo> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |***@coaxion.net
Ever Confirmed|0 |1

--- Comment #4 from Sebastian Dröge (slomo) <***@coaxion.net> 2014-09-12 12:27:37 UTC ---
Yes
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-12 12:28:38 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

Sebastian Dröge (slomo) <slomo> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #285598|none |needs-work
status| |

--- Comment #5 from Sebastian Dröge (slomo) <***@coaxion.net> 2014-09-12 12:28:30 UTC ---
(
"GStreamer" (bugzilla.gnome.org)
2014-09-12 23:00:16 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

m][sko <xlazom00> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #285598|0 |1
is obsolete| |

--- Comment #6 from m][sko <***@gmail.com> 2014-09-12 23:00:14 UTC ---
Created an attachment (id=286096)
View: https://bugzilla.gnome.org/attachment.cgi?id=286096
Review: https://bugzilla.gnome.org/review?bug=736213&attachment=286096

inline au delimiter

as we discuss in other bug
https://bugzilla.gnome.org/show_bug.cgi?id=736211
I made this patch
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-12 23:35:05 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

m][sko <xlazom00> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #286096|0 |1
is obsolete| |

--- Comment #7 from m][sko <***@gmail.com> 2014-09-12 23:35:02 UTC ---
Created an attachment (id=286097)
View: https://bugzilla.gnome.org/attachment.cgi?id=286097
Review: https://bugzilla.gnome.org/review?bug=736213&attachment=286097

inline au delimiter

as we discuss in other bug
https://bugzilla.gnome.org/show_bug.cgi?id=736211
I made this patch
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-15 21:49:44 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

Olivier Crete (Tester) <olivier.crete> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #286097|none |needs-work
status| |

--- Comment #8 from Olivier Crete (Tester) <***@ocrete.ca> 2014-09-15 21:49:37 UTC ---
Review of attachment 286097:
--> (https://bugzilla.gnome.org/review?bug=736213&attachment=286097)

There shouldn't be a property for this. The AUD should always be inserted in
bytestream mode, and never in avc mode. And it should be inserted whatever the
alignment is (au or nal), the question is just if it should be in the same
GstBuffer or not.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-16 07:01:40 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

--- Comment #9 from m][sko <***@gmail.com> 2014-09-16 07:01:34 UTC ---
1. ok so I will change
h264parse->align == GST_H264_PARSE_ALIGN_AU
=>
h264parse->format == GST_H264_PARSE_FORMAT_BYTE
in gst_h264_parse_pre_push_frame


2. gst_pad_push should be enaught.
do you have problem with some muxers ?
for example if you generate hls with mpegtsmux I think that this should be ok
that is reason why I flagged buffer SPS+PPS+IDR NALs with
GST_BUFFER_FLAG_DELTA_UNIT
it is maybe useless btw
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-16 07:04:44 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

--- Comment #10 from m][sko <***@gmail.com> 2014-09-16 07:04:38 UTC ---
property or not
I saw some spec that AU delimiter is options
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (bugzilla.gnome.org)
2014-09-16 07:40:57 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213
GStreamer | gst-plugins-bad | git

--- Comment #11 from Sebastian Dröge (slomo) <***@coaxion.net> 2014-09-16 07:40:54 UTC ---
The AU delimiter should be in the *same* buffer for alignment=AU, otherwise
things will break. Also this probably needs some changes to also insert the AU
delimiter if in passthrough mode
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-23 16:31:40 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #12 from Jan Schmidt <***@noraisin.net> ---
*** Bug 724510 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-23 16:45:57 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

Jan Schmidt <***@noraisin.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@angri.ru

--- Comment #13 from Jan Schmidt <***@noraisin.net> ---
*** Bug 696037 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-23 16:48:35 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #14 from Jan Schmidt <***@noraisin.net> ---
Just a note, I just pushed:

commit 48a1f2792316d01c4ea4c6baa27188ffae73c543
Author: Jan Schmidt <***@centricular.com>
Date: Fri Jul 24 02:46:21 2015 +1000

h264parse: Don't discard first AU delimiter

Don't throw away AU delimiter(s) that precede the SPS/PPS. Should
fix MPEG-TS playback on iOS/Quicktime when muxing streams that
already have AU delimiters.

See https://bugzilla.gnome.org/show_bug.cgi?id=736213 for getting
h264parse to insert AU delimiters when they don't already
exist.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-01-02 12:13:43 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

Uwe Mueller <***@namez.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@namez.de
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-01-03 11:49:31 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

Víctor Manuel Jáquez Leal <***@igalia.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugzilla.gnome.org/
| |show_bug.cgi?id=776712
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-17 02:59:00 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

Hyunjun Ko <***@igalia.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@igalia.com

--- Comment #15 from Hyunjun Ko <***@igalia.com> ---
Hi. I'm from #Bug 776712 :)

I think if this issue can be fixed, it would be happy for all of us:)
If people don't mind, I would propose new patch based on master.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-17 03:11:08 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #16 from Hyunjun Ko <***@igalia.com> ---
Created attachment 346038
--> https://bugzilla.gnome.org/attachment.cgi?id=346038&action=edit
h264parse: insert AU delimiter only in case of byte-stream

Inserts AU delimeter by default if missing au delimeter from upstream.
This should be done only in case of byte-stream format.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-17 16:11:12 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #17 from Víctor Manuel Jáquez Leal <***@igalia.com> ---
Review of attachment 346038:
--> (https://bugzilla.gnome.org/review?bug=736213&attachment=346038)

Also, since AU delimiter is optional, there should be a property, imo.

::: gst/videoparsers/gsth264parse.c
@@ +2329,3 @@
+ gboolean ok;
+
+ gst_byte_writer_init_with_size (&bw, gst_buffer_get_size (buffer), FALSE);

Isn't there an overflow? because you are adding 48 bits to the original buffers
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-18 07:22:31 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #18 from Hyunjun Ko <***@igalia.com> ---
(In reply to Víctor Manuel Jáquez Leal from comment #17)
Post by "GStreamer" (GNOME Bugzilla)
Also, since AU delimiter is optional, there should be a property, imo.
Some people want that it should be by default. I have no idea of this thing.
Hope that listen to opinion of someone else. :)
Post by "GStreamer" (GNOME Bugzilla)
::: gst/videoparsers/gsth264parse.c
@@ +2329,3 @@
+ gboolean ok;
+
+ gst_byte_writer_init_with_size (&bw, gst_buffer_get_size (buffer), FALSE);
Isn't there an overflow? because you are adding 48 bits to the original
buffers
That size is not fixed as the third parameter, which means it can allocate more
if needed. But I think you're right in this case, which can be fixed at
initialization for performance.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-20 14:30:47 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #19 from Olivier Crête <***@ocrete.ca> ---
I think that AU delimiter should always be there in byte-stream mode as it's
required to make a valid MPEG-TS file.

As for avc1/avc3 modes, I don't think it's required, I'd be tempted to never
include it, but I have no strong feelings there.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-20 14:32:56 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #20 from Olivier Crête <***@ocrete.ca> ---
Review of attachment 346038:
--> (https://bugzilla.gnome.org/review?bug=736213&attachment=346038)

and you seem to be doing two copies. Maybe better just allocate a new
GstMemory, write the AUD in there and append it to the buffer.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-21 00:38:37 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

Tim-Philipp Müller <***@zen.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
Post by "GStreamer" (GNOME Bugzilla)
I think that AU delimiter should always be there in byte-stream
mode as it's required to make a valid MPEG-TS file.
Where is this specified? (That it is required to make a valid MPEG-TS file)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-21 01:21:17 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

Hyunjun Ko <***@igalia.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #346038|0 |1
is obsolete| |

--- Comment #22 from Hyunjun Ko <***@igalia.com> ---
Created attachment 346292
--> https://bugzilla.gnome.org/attachment.cgi?id=346292&action=edit
h264parse: insert AU delimiter only in case of byte-stream

Agree with Oliver about memory copy thing.
Patch updated
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-21 12:16:06 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

Nicolas Dufresne (stormer) <***@ndufresne.ca> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@ndufresne.ca

--- Comment #23 from Nicolas Dufresne (stormer) <***@ndufresne.ca> ---
(In reply to Tim-Philipp Müller from comment #21)
Post by "GStreamer" (GNOME Bugzilla)
Post by "GStreamer" (GNOME Bugzilla)
I think that AU delimiter should always be there in byte-stream
mode as it's required to make a valid MPEG-TS file.
Where is this specified? (That it is required to make a valid MPEG-TS file)
I didn't have time to dig into the spec, but at least Apple requires it for
HLS:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/FrequentlyAskedQuestions/FrequentlyAskedQuestions.html

I believe it's armless to have them. It's common to skip unused unit, but
uncommon to add them when missing.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-21 12:16:38 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #24 from Nicolas Dufresne (stormer) <***@ndufresne.ca> ---
(Forgot to mention, it's in question 10)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-21 14:24:58 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=736213

--- Comment #25 from Tim-Philipp Müller <***@zen.co.uk> ---
I'm quite aware that Apple requires them (see various mailing list posts that
led most people to this bug), and I also agree that it makes sense to
add/output them by default for byte-stream output.

I just don't believe what Olivier said is true, that they are required to make
a valid TS stream, but happy to be convinced otherwise :)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...