Several Questions About gst-launch-1.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Several Questions About gst-launch-1.0

myaspm
Hi everyone, i'm a pretty noob gstreamer 1.0 user and i have several questions which i couldnt find answers on the internet.

1) I have an local RTSP server created by VLC. Whenever i try to stream it with gst-launch-1.0 with this pipe  : gst-launch-1.0 rtspsrc location=xxxx:yyy ! ximagesink (It doesn't work with any sink)
i see "ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3: Internal data flow error." 

It works with playbin but sound is very broken. Why would this happen? I'm not looking for you to solve my problem, just directing in the right direction would be enough for me.

2) How can i learn more about the command line pipes? Generally speaking, most examples in the internet, documentation and tutorials are build upon C. For example i want to learn what sources work with which encoders, why my webcam pipe doesn't work if i change the source to rtsp, why x can't be linked with y etc.

3) Is there a way to serve video file as rtsp with gst-launch-1.0 ? I can somehow build my own local server with VLC and stream it with gstreamer but it'd be better if i could use gstreamer to do both.

Thanks in advance. Have a nice day.
Reply | Threaded
Open this post in threaded view
|

Re: Several Questions About gst-launch-1.0

Tim Müller
On Thu, 2017-08-17 at 02:02 -0700, myaspm wrote:

Hi,


> 1) I have an local RTSP server created by VLC. Whenever i try to
> stream it
> with gst-launch-1.0 with this pipe  : *gst-launch-1.0 rtspsrc
> location=xxxx:yyy ! ximagesink* (It doesn't work with any sink)
> i see /"ERROR: from element
> /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3:
> Internal data
> flow error."/ 

rtspsrc will output RTP-payloaded data. So at the very least you would
need a depayloader and decoder and/or converters there before any
sink. 

fakesink should work though :)

For a more useful lower-level pipeline, try:

 uridecodebin uri=rtsp:/// name=d \
   d. ! queue ! videoconvert ! videoscale ! ximagesink


> It works with playbin but sound is very broken. Why would this
> happen? I'm not looking for you to solve my problem, just directing
> in the right direction would be enough for me. 

Hard to say. If it's a local RTSP server it's not packet loss I
suppose. What format is it that you're streaming? Does it happen if you
stream a different audio format/codec?

Does it work if you use rtspt://... instead of rtsp:// ?


> 2) How can i learn more about the command line pipes? Generally
> speaking, most examples in the internet, documentation and tutorials
> are build upon C.
> For example i want to learn what sources work with which encoders,
> why my webcam pipe doesn't work if i change the source to rtsp, why x
> can't be linked with y etc.

You'll find lots of example pipelines with various elements, and also
on the gst-launch man page/documentation, but all of those rely on you
understanding how to construct GStreamer pipelines in principle, e.g.
to combine compatible elements based on caps and such. That's not
something that's easy to teach, you'll have to figure it out by trial-
and-error until it all makes sense :) Or ask questions here or on the
#gstreamer IRC channel.


> 3) Is there a way to serve video file as rtsp with gst-launch-1.0 ? I
> can somehow build my own local server with VLC and stream it with
> gstreamer but it'd be better if i could use gstreamer to do both.

There's a gst-rtsp-server module. It provides a library to build rtsp-
servers and to serve GStreamer pipelines via RTSP. If you build it
yourself, there's an examples/ folder with test applications for
serving a parse-launch pipeline or serving a file on the file system
and such. Those examples are currently not installed though, so you'll
only get them in the source package if you compile yourself.

Cheers
 -Tim


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

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Several Questions About gst-launch-1.0

myaspm
Perfect answer thanks a lot! Yeah uridecodebin method works, i suppose i should play around some more.

About pipeline constructions, i believe what i'm gonna do is strip working examples element by element and look them up in documentation to get an idea about what are they and what they do.

Thanks a lot, again!