GStreamer RTSP server

One request we get often here at Collabora Multimedia is from people using GStreamer in the embedded and mobile sector and are looking for ways to stream over RTSP with GStreamer, often in combination with various kinds of transcoding and proxying functions. Due to this we have launched a new project, the GStreamer RTSP server. This server is written by GStreamer maintainer Wim Taymans and is tightly based on the RTP infrastructure in GStreamer that he has been working on for quite some time now.

It is a server written in C which can stream any GStreamer supported file over RTSP using any of the wide range of RTP formats supported by GStreamer. It also allows you to take any RTSP or HTTP stream and proxy it onwards over RTSP. The screenshot below is of totem playing a RTSP stream of the Max Payne trailer from Apple’s website. The stream offered by Apple is a normal Quicktime http stream, but our RTSP server repackages it and retransmits it over RTSP on my local network on the fly.

The code is currently only available through a git repository which you can grab using this command:
git clone git://git.collabora.co.uk/git/gst-rtsp-server.git gst-rtsp-server

The reason there is no formal release yet is due to early stage the software is in, while it works it is not very user friendly yet, with media paths having to be edited and compiled in with the server for instance. But for those looking for a RTSP server solution using GStreamer, which is suitable for putting onto embedded and mobile devices, then it might be enough to get you started and of course we at Collabora are available to offer assistance for those who want it. One hope we have is that this code will help people doing DLNA servers support the mobile profile of that specification for instance.

We also plan on moving the code into GStreamer’s code repository once that is migrated to git from CVS.

14 thoughts on “GStreamer RTSP server”

  1. A little guide on how to run this would be really nice.

    On wich mailing list and irc channel are news about this project discussed?

  2. A little guide on how to run this would be really nice.

    On wich mailing list and irc channel are news about this project discussed?

    I would also like if you could write a new post once the project is more consumer ready.

  3. @Christopher: yes, it also does transcoding. Some of the sample stream configurations in the code already do this.

    @kab: there is a small README in the repository which tries to explain some of the very basics. You can also grab us on #gstreamer on irc.freenode.com. For the time being I think gstreamer-devel is also the natural mailing list for it. We might set up a separate IRC channel and mailing list if the server becomes popular.

  4. @user: as far as I know there is no released version of Flumotion with RTSP support. The other thing is that this is all implemented in C, while Flumotion is Python.

  5. I tried this:

    Server: ./gst-rtsp-server

    Client: gst-launch rtspsrc location=rtsp://localhost:1554/h264 debug=true ! fakesink

    Setting pipeline to PAUSED …
    RTSP request message 0xbfda7250
    request line:
    method: ‘OPTIONS’
    uri: ‘rtsp://localhost:1554/h264’
    version: ‘1.0’
    headers:
    body:
    RTSP response message 0xbfda7234
    status line:
    code: ‘505’
    reason: ‘RTSP Version not supported’
    version: ‘1.0’
    headers:
    key: ‘CSeq’, value: ‘0’
    key: ‘Date’, value: ‘Fri, 17 Oct 2008 00:44:05 GMT’
    body: length 0
    ERROR: Pipeline doesn’t want to pause.
    ERROR: from element /pipeline0/rtspsrc0: Could not read from resource.
    Additional debug info:
    gstrtspsrc.c(3449): gst_rtspsrc_send (): /pipeline0/rtspsrc0:
    Got error response: 505 (RTSP Version not supported).
    Setting pipeline to NULL …
    FREEING pipeline …

    Seems like server doesn’t support OPTIONS. Any comments? TIA

  6. Hi
    Am trying to install gst-rtsp-server, I am facing some compilation issues please see the text below.

    I would like to port this to Windows mobile, is there any rtspserver for windows mobile ??

    [sbox-DIABLO_X86: ~/gst-rtsp-server] > make
    make all-recursive
    make[1]: Entering directory `/home/penguin/gst-rtsp-server’
    Making all in src
    make[2]: Entering directory `/home/penguin/gst-rtsp-server/src’
    if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -Werror -g -DGST_DISABLE_DEPRECATED -g -O2 -MT gst_rtsp_server-rtsp-session.o -MD -MP -MF “.deps/gst_rtsp_server-rtsp-session.Tpo” -c -o gst_rtsp_server-rtsp-session.o `test -f ‘rtsp-session.c’ || echo ‘./’`rtsp-session.c; \
    then mv -f “.deps/gst_rtsp_server-rtsp-session.Tpo” “.deps/gst_rtsp_server-rtsp-session.Po”; else rm -f “.deps/gst_rtsp_server-rtsp-session.Tpo”; exit 1; fi
    rtsp-session.c: In function `gst_rtsp_session_get_media’:
    rtsp-session.c:111: warning: ‘result’ might be used uninitialized in this function
    make[2]: *** [gst_rtsp_server-rtsp-session.o] Error 1
    make[2]: Leaving directory `/home/penguin/gst-rtsp-server/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/penguin/gst-rtsp-server’
    make: *** [all] Error 2

  7. Very nice intitiative Christian ! Very helpful when validating a client on mobile device, especially to debug tricky cases combined with a debugger (data sending interrupt, server suspended)

    A big ‘thank you’ to the dev team.

  8. Hi ,

    I am not able to connect to the server, any idea what is the issue please see the log below

    Setting pipeline to PAUSED …
    RTSP request message 0xbfa1a5c0
    request line:
    method: ‘OPTIONS’
    uri: ‘rtsp://10.187.109.46:1554/ps.3gp’
    version: ‘1.0’
    headers:
    key: ‘User-Agent’, value: ‘RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)’
    key: ‘ClientChallenge’, value: ‘9e26d33f2984236010ef6253fb1887f7’
    key: ‘CompanyID’, value: ‘KnKV4M4I/B2FjJ1TToLycw==’
    key: ‘GUID’, value: ‘00000000-0000-0000-0000-000000000000’
    key: ‘RegionData’, value: ‘0’
    key: ‘PlayerStarttime’, value: ‘[28/03/2003:22:50:23 00:00]’
    key: ‘ClientID’, value: ‘Linux_2.4_6.0.9.1235_play32_RN01_EN_586’
    body:
    RTSP response message 0xbfa1a5a0
    status line:
    code: ‘505’
    reason: ‘RTSP Version not supported’
    version: ‘1.0’
    headers:
    key: ‘CSeq’, value: ‘0’
    key: ‘Date’, value: ‘Thu, 23 Oct 2008 12:11:25 GMT’
    body: length 0
    ERROR: Pipeline doesn’t want to pause.
    ERROR: from element /pipeline0/rtspsrc0: Could not read from resource.
    Additional debug info:
    gstrtspsrc.c(3327): gst_rtspsrc_send (): /pipeline0/rtspsrc0:
    Got error response: 505 (RTSP Version not supported).
    Setting pipeline to NULL …
    FREEING pipeline …

Comments are closed.