Several Questions About gst-launch-1.0
tim at centricular.com
Thu Aug 17 10:15:40 UTC 2017
On Thu, 2017-08-17 at 02:02 -0700, myaspm wrote:
> 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
> 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
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.
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
More information about the gstreamer-devel