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 665564 - H264 should require AVC stream-format
H264 should require AVC stream-format
Status: RESOLVED DUPLICATE of bug 653649
Product: GStreamer
Classification: Platform
Component: gst-libav
0.11.x
Other Mac OS
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-05 01:36 UTC by Matej Knopp
Modified: 2012-03-25 18:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
require avc stream format (858 bytes, patch)
2011-12-05 01:36 UTC, Matej Knopp
rejected Details | Review

Description Matej Knopp 2011-12-05 01:36:53 UTC
Created attachment 202787 [details] [review]
require avc stream format

currently it also accepts byte-stream, which ffmpeg can't' decode
Comment 1 Sebastian Dröge (slomo) 2011-12-05 08:35:26 UTC
Does ffmpeg also require a specific alignment, i.e. nal or au? And this patch is valid for 0.10 too
Comment 2 Mark Nauwelaerts 2011-12-05 08:57:31 UTC
I am pretty sure ffdec_h264 has always been able to decode byte-stream (e.g. ask anyone that has ever used it for video call which is usually delivered in such a manner).  It is also the case for which the ffmpeg parser is explicitly enabled by the gstreamer wrapper to ensure the ffmpeg decoder itself receives AU aligned (bytestream) data.

If not working now, there is some serious regression going on ...
Comment 3 Mark Nauwelaerts 2011-12-05 09:20:52 UTC
And FWIW, decoding x264enc byte-stream output does (still) work fine when tested with latest git (though we do seem to have some regression in h264 decoding going on; see bug #653649).
Comment 4 Matej Knopp 2011-12-05 10:06:20 UTC
I'm not sure whats wrong here then. 
I have AVC stream from Matroska. The H264 parser converts it to byte-stream (as ffmpegdec doesn't have any preference). After that the decoder is unable to decoder any frames complaining about invalid PPS/SPS references. It looks like ffmpegdec does enable H264 parser when there is no codec_data. I'll debug it later.
Comment 5 Matej Knopp 2011-12-05 10:23:06 UTC
Oops, I'm sorry, please mark this bug as invalid. The parser does kick in. 

The problem is that ffmpegdec does get CAPS event while decoding is already in progress causing the decoder to reopen. The caps event is sent by downstream element (gst H264 parser) because of Reconfigure event as the pipeline changes while running. I've filed another bug about this

https://bugzilla.gnome.org/show_bug.cgi?id=665566

With the fix from 665566 (although there might be better approach)  applied everything works as expected (converting stream to byte-stream by gsth264parser and subsequent parsing by ffmpeg)
Comment 6 Matej Knopp 2011-12-05 10:24:07 UTC
Changing Version to [0.11] as this is 0.11 specific (CAPS event)
Comment 7 Matej Knopp 2011-12-05 10:24:58 UTC
Review of attachment 202787 [details] [review]:

wrong patch, the problem is in decoder being reopened during decoding rather than stream-type.
Comment 8 Olivier Crête 2011-12-08 00:40:32 UTC
Having the parser convert from avc to byte-stream is also a bug since ffdec_h264 can accept avc.
Comment 9 Matej Knopp 2011-12-08 00:42:34 UTC
Well, with some file I tried (MKVs with H264 stream) it is actually better to convert the AVC stream to byte stream and let ffmpeg parse it again, otherwise I get tons of NAL size warnings from ffmpeg.
Comment 10 Mark Nauwelaerts 2011-12-08 09:24:56 UTC
Sigh, there is a good chance this is due to bug #653649, which has MT ffmpeg decoding only dumping such complaints on AVC input but not on byte-stream input (although the AVC input is fine, as illustrated by using max-threads=1 on the decoder).
Comment 11 Tim-Philipp Müller 2012-03-24 15:33:48 UTC
Can we close this then?

0.11 issue FIXED and handled by other bug.

0.10 issue probably dup of bug #653649, no?
Comment 12 Matej Knopp 2012-03-25 17:46:24 UTC
I think it can be closed.
Comment 13 Tim-Philipp Müller 2012-03-25 18:00:42 UTC

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