RTSP server with camera

Philip Craig philipjcraig at gmail.com
Tue Mar 26 03:14:51 PDT 2013


On 26 March 2013 19:53, Wim Taymans <wim.taymans at gmail.com> wrote:
> On 03/26/2013 10:39 AM, Philip Craig wrote:
>>
>> 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?
>
> Use gst_rtsp_media_factory_set_shared() to share one pipeline to multiple
> clients.

Yes I am already doing that, but that only allows multiple clients to
access one media.

I want to allow multiple clients to access different versions of the
camera stream simultaneously. For example, I want to provide both a
raw fisheye stream and a rectilinear stream.

>
> Wim
>
>>
>> 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
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> 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