decodebin problems

Tim Müller tim at centricular.com
Fri Apr 22 19:13:00 UTC 2016


On Fri, 2016-04-22 at 18:28 +0000, Johan Basore wrote:

Hi Johan,

> I am building a video editing app for iOS with gstreamer 1.8.1.

I wonder if you are aware of the gst-editing-services (ges) library
which is also what the Pitivi video editor uses. It takes care of a lot
of heavy lifting for you.


> But I am having a problem with decodebin( especially demux).
> It says "Error received from element avidemux0 : Internal data stream
> error.".

When you get an error message on the bus, it's usually useful to also
print the 'debug' string from the error message, it will provide more
details. My guess is that here it probably said something about
'streaming stopped: not-linked'.

> All types of movies have problem with demux.
    
>     gst_element_link_many(source1, decodebin1, clrspace1, videobox1,
> videomixer, clrspace, mpegenc, avimux, sink, nil);
>     gst_element_link_many(source2, decodebin2, clrspace2, videomixer,
> nil);
>     */
>     gst_bin_add_many(GST_BIN (pipeline), source1, sink,  clrspace1,
> mpegenc, avimux, decodebin1, queue, nil);
>     gst_element_link_many(source1, decodebin1, queue, clrspace1,
> mpegenc, avimux, sink, nil);
>   

I suspect that linking decodebin to the elements to the right fails.

This is because decodebin has initially no source (output) pads yet. It
will only add those output pads later once data flow start (i.e. once
you set the pipeline to PAUSED or PLAYING state).

So you can't link decodebin to the next element here yet at this point.

You have to connect to decodebin's "pad-added" signal an then in the
signal callback function you can link the new pad to the next element
(if it's the right kind of pad).

Cheers
 -Tim

PS: please try to add a subject next time


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




More information about the gstreamer-devel mailing list