Please help with uridecodebin pipeline (I would like to prevent re-encoding)

stic at free.fr stic at free.fr
Sat Sep 6 14:42:25 PDT 2014


Thanks for your answer.
Yes but the stream may have audio too, and the video encoding format is not always h264.
This is why I wanted to make a more generic pipeline by using uridecodebin and decodebin and not remake what already exists.

Elements are dynamically added in the pad-added signal of uridecodebin.
I was able to make the pipeline work by synchronising state of added elements with the pipeline state (i forgot to do this previously).

But this is not enough and I "randomly" still have that kind of error !
Sometimes the pipeline links and works, and sometimes it doesn't with the exact same stream, and it ends with the same error.
It seems to happen only when the stream has audio, but again, this happens randomly, sometimes it works for the same stream.

So what are the main steps to follow not to have such "not linked" error ? 

My current pipeline now looks like something like this (with audio):
uridecodebin name=uridecodebin ! tee name=videotee ! queue name=videoqueue ! decodebin name=vdecodebin ! videoconvert ! videoscale ! eglglessink name=videosink 
videotee. ! queue name=recordvideoqueue ! fakesink 
uridecodebin. ! tee name=audiotee ! queue name=audioqueue ! decodebin name=adecodebin ! audioconvert ! autoaudiosink name=audiosink 
audiotee. ! queue name=recordaudioqueue ! fakesink

I was thinking that maybe it cannot be linked because the uridecodebin depends on downstream audio and video decodebin elements which are not yet linked (because they will be linked with their own "pad-added" signal). 
but how to do in that case if my problem is caused by this ??

I hope I am clear enough in my explanations, and that someone could give me some advices.
Thank you very much for any hints.
Best regards.

----- Mail original -----
De: "Tim Müller" <tim at centricular.com>
À: gstreamer-devel at lists.freedesktop.org
Envoyé: Samedi 6 Septembre 2014 13:26:04
Objet: Re: Please help with uridecodebin pipeline (I would like to prevent re-encoding)

On Fri, 2014-09-05 at 12:55 +0200, stic at free.fr wrote:

Hi,

> I have following pipeline:
> uridecodebin name=uridecodebin ! queue ! matroskamux name=mux ! decodebin ! videoconvert ! videoscale ! eglglessink name=videosink
> 
> The source stream is a rtsp uri transporting h264 video data.
> I try to build this pipeline because I would like then to be able to record to a file the h264 video data BEFORE it is decoded and sent to the videosink (would like to prevent re-encoding !)
> 
> But this fails with following error:
> 
> W/GStreamer+basesrc(2246): 0:00:18.677825943 0x77956860 gstbasesrc.c:2867:gst_base_src_loop:<udpsrc3> error: Internal data flow error.
> W/GStreamer+basesrc(2246): 0:00:18.678039566 0x77956860 gstbasesrc.c:2867:gst_base_src_loop:<udpsrc3> error: streaming task paused, reason not-linked (-1)
> 
> I also tried to return false with uridecodebin autoplug-continue signal to allow it to pass through data, but still same error.
> 
> Please can you give me some hints on how I could achieve this ?
> Any help would be greatly appreciated.

The easiest would probably be to use rtspsrc instead of uridecodebin
then, and do something like:

 gst-launch-1.0 rtspsrc location=rtsp://.. ! rtph264depay ! tee name=t \
    t. ! queue ! (decodebin or h264parse ! avdec_h264) ! videoconvert !
videoscale ! autovideosink \
    t. ! queue ! h264parse ! muxer ! filesink location=recording.foo

 Cheers
  -Tim


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

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list