RTSP server with camera

Philip Craig philipjcraig at gmail.com
Tue Mar 26 02:39:33 PDT 2013


Hi,

I'm trying to use gst-rtsp-server to stream live video from a camera.
I've modified the test-launch.c example, and have it working for a
single media.

Now I want to allow multiple media. The problem I have is that
gst-rtsp-server creates a separate pipeline for each media. This
doesn't work because I can only have a single camera capture element.

This seems like a fairly common thing to want to do. Has anyone solved
this problem, or does anyone have a recommendation for how to
proceeed?

The way I would expect to solve this is to have a single pipeline and
dynamically update it for each new media. That doesn't seem to fit
well with the current gst-rtsp-server design though, because
GstRTSPMedia wants full control of the pipeline. I haven't found
evidence of anyone doing this. I did find someone else who ran into
the same difficulty though
(http://lists.freedesktop.org/archives/gstreamer-devel/2011-September/033174.html)

The other option that I can see is to create multiple pipelines, and
forward the data between them using something like appsrc, TCP, or
shared memory. Is there any documentation on how to do this? I've
tried doing this with TCP, but I'm quite new to gstreamer and I don't
understand all the details of caps specifications and clocks. Here's
the pipelines I'm trying to use, but they are slow to connect and the
latency is high (I've seen up to 30 seconds).

My capture pipeline is:
gst-launch v4l2src ! gdppay ! tcpserversink host=localhost port=1234

I can display this with zero latency using:
gst-launch tcpclientsrc host=localhost port=1234 ! gdpdepay !
xvimagesink sync=false

The bin that I am using in the rtsp-server is:
"( tcpclientsrc host=localhost port=1234 ! gdpdepay ! ffmpegcolorspace
! x264enc tune=zerolatency ! rtph264pay name=pay0 pt=96 )"

and the rtspclient is:
gst-launch rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay
! ffdec_h264 ! xvimagesink sync=false


More information about the gstreamer-devel mailing list