H264 elementary decode error in avdec_h264

Tim Müller tim at centricular.com
Tue Apr 29 05:16:23 PDT 2014


On Tue, 2014-04-29 at 04:38 -0700, Manoj89 wrote:

Hi,

> I am using the avdec_h264 decoder to decode the H264 elementary streams
> which I get from the application.My pipeline structure is 
> 
>   appsrc->avdec_h264dec->videoconvert->ximagesink

If you feed data directly to avdec_h264 (without h264parse in front),
you need to make sure your H.264 is already properly parsed/frames
(framed in access units, properly timestamped and key frames signalled
via buffer flags, etc.).

> I have two issues here 
> (i) If I set the capabilities of the appsrc as g_object_set (G_OBJECT
> (gdata.appsrc), "caps",
>   gst_caps_new_simple ("video/x-h264",
>      "format", G_TYPE_STRING,"YV12",
>      "width", G_TYPE_INT,1280,
>      "height", G_TYPE_INT,720,
>      "framerate", GST_TYPE_FRACTION, 0, 1,
>      NULL), NULL);
> Then I get the "Internal data flow error" in appsrc

I suspect if you look at the 'debug detail string' of the error message
it says something about not-negotiated? Which would indicate a problem
with the caps.

The "format" field here does not make sense in h264 caps, it's only
needed for raw video.

What is missing in your video/x-h264 caps are "stream-format" (either
avc or byte-stream) and "alignment" (either nal or au, but should be au
for avdec_h264) fields.

> (ii) If I dont set appsrc capabilities and simply pass the H264 frames then
> I get the following error.
>  (snip)
> Tell me whether issue occurs because of h264parser not being included in the
> pipeline or if h264parser to be included in the pipeline then tell me why i
> should need to do that for elementary streams.Can anybody give clear picture
> of how elementary stream can be pushed to appsrc?
> 

Yes, avdec_h264 requires parsed input.

We don't know where the data that you push into appsrc comes from, or
which format it has, so it's hard to tell whether you absolutely *need*
an h264parse or not, but it's probably good to insert one.

You must signal stream-format and alignment though.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list