mediatomb and rtsp

Anonymous
2007-05-02
2013-05-30
  • Anonymous - 2007-05-02

    Hello, I am currently trying to enrich mediatomb with rtsp/rtcp/rtp support (the use of the live555 libraries is desired). Are there any hints how to perform this?

    Cheers

     
    • Jin

      Jin - 2007-05-02

      Well, do you want to really stream rtsp from MediaTomb, or do you simply want to add a link to some online rtsp resource?

      The second thing is quite easy, simply add an External Link item via the UI and set the protocol in the protocol field accordingly. You could also use that to point to resources on your own RTSP server.

      If you aim for the first option... well, I have not yet worked with the live555 libraries, so I can not say much about them. I guess the main question here is - how to add media easily or how to determine what will be served via http-get and what via rtsp? The streaming itself is not a problem, the rtsp server seems to be available, it can stay a standalone application or maybe it could be used as a library. As I said before, I have not yet looked at the rtsp thing at all; how do you identify files that are going to be streamed via rtsp? Can you stream any kind of media via rtsp?

      So I guess I have to take a look at the whole rtsp thing first, else it is difficult to answer your question :)

      By the way, which renderer are you using and what is the motivation behind this? If it is really something that many people want, we could certainly think about adding rtsp support to MediaTomb.

      Greetings,
      Jin

       
    • Anonymous - 2007-05-04

      Hm, maybe I told not enough about my background :)
      I am working at the Uni of Klagenfurt and I am participating in an EU research project called Intermedia (http://intermedia.miralab.unige.ch/). The aim of this project is to improve the availability of multimedia content for a mobile user. My work is based on an extended mediatomb implementation and the aim is to provide a multimedia session migration system for several renderers (migrate a running video/audio from one renderer to another). Well, it happens to be that I should use an existing session migration system based on rtsp/rtp. Therefore I am currently evaluating if it is better to integrate the existing semi system or to write it from scratch with mediatomb as a basis.
      A colleague is implementing a upnp software renderer (based on mplayer) that should function as the universal renderer in the architecture. The control point is yet to be implemented (maybe by another Intermedia partner).

      >
      > Well, do you want to really stream rtsp from MediaTomb, or do you simply want to add a link to some online rtsp resource?
      >
      Ok, it is streaming than ... The live555 library is capable of streaming MPEG, H.263+ or JPEG video, and several audio codecs (including mp3).

      >
      > If you aim for the first option... well, I have not yet worked with the live555 libraries, so I can not say much about them. I guess the > main question here is - how to add media easily or how to determine what will be served via http-get and what via rtsp? The streaming itself is not a problem, the rtsp server seems to be available, it can stay a standalone application or maybe it could be used as a library.
      >
      In my opinion it would make sense to implement some kind of an switch between rtsp streaming and http get.

      Another question is, whether it is possible to integrate the rtsp-library into the UPnP stack. I read about it in the UPnP-AV-Specs (http://www.upnp.org/standardizeddcps/documents/AVTransport1.0.pdf). Or is it desireable to use it as a stand-alone solution?

      Best
      Ingo

       
    • Jin

      Jin - 2007-05-04

      Hi,

      >Hm, maybe I told not enough about my background :) 
      >I am working at the Uni of Klagenfurt and I am participating in an EU research project
      >called Intermedia (http://intermedia.miralab.unige.ch/). The aim of this project is to
      >improve the availability of multimedia content for a mobile user. My work is based on
      >an extended mediatomb implementation and the aim is to provide a multimedia session
      >migration system for several renderers (migrate a running video/audio from one
      >renderer to another).

      ah, I remember you guys :) You contributed code to our project, unfortunately we did not have a public SVN back then, so you based your implementation on the 0.8.1 codebase. At the same time, internally, lots of things have changed, so we could not easily integrate your work. I guess that with 0.9.0 we are even further apart now.

      >Well, it happens to be that I should use an existing session migration system based
      >on rtsp/rtp. Therefore I am currently evaluating if it is better to integrate the
      >existing semi system or to write it from scratch with mediatomb as a basis.
      >A colleague is implementing a upnp software renderer (based on mplayer) that should
      >function as the universal renderer in the architecture. The control point is yet to
      >be implemented (maybe by another Intermedia partner).

      Sounds interesting.

      >In my opinion it would make sense to implement some kind of an switch between rtsp
      >streaming and http get.

      Mabye just as an additional option, but I do not see a problem between the coexistance of HTTP and RTSP. The protocol is defined by the resource tag in the DIDL Lite XML and it is fully legitimate to offer several resources and different streaming protocols for the same media item. The renderer then has the possibility to pick the resource that it supports and prefers.

      >Another question is, whether it is possible to integrate the rtsp-library into the
      >UPnP stack.

      As far as I remember the streaming protocol is out of the scope of UPnP, in other UPnP itself does not care about the protocol when it comes to streaming. The PDF you pointed to defines the AVTransport service which is interesting to Control Points - it allows you to tell a renderer to play a resource from a server. The references to HTTP  and RTSP protocols there are simply conventions to ensure interoperability (i.e. that an HTTP url has to start with http:// and an RTSP url has to start with rtsp:// and so on), but basically you could offer any kind of stream and it would be up to the ControlPoint to identify the device capabilities and select an appropariate stream for a particular server-renderer combination.

      I also think that it would not make sense to integrate the RTPS library into libupnp. While HTTP is required for almost any device - for example, because devices have to offer device and service descriptions via HTTP, RTSP is only for streaming media. And that's not part of the UPnP stack but is already on some higher level.
      Theoretically you could modify libupnp in the way, that it passes rtsp requests to the application via callbacks (same as it is done when using the SDK's internal webserver), however, the code of the SDK raises some doubts, we even have a goal of writing an own SDK and finally getting rid of libupnp.

      So my thoughts on this:
      write an RTSP server class that is part of MediaTomb and runs in it's own thread, listening for incoming RTSP requets on a different port (i.e. not on the port that libupnp is using); when UPnP browse requests come in, identify the media by the mimetype when creating the XML, and optionally add an additoinal resource tag pointing to the RTSP URL of the RTSP server.

      Your RTSP class will listen for incoming RTSP requests, you can use the same coding functionality that we use with HTTP (i.e. providing the objectID in the URL), load the object from Storage, figure out it's real location on disk, initiate the RTSP streaming with the help of the live555 library.

      To me, it looks like the most code and effort will be spent with live555 integration, means for adding resources, loading objects, parsing URLs, etc. are already in MediaTomb.

      Of course this is only my view on this.
      If you manage a clean integration we would certainly welcome the patch to make this functionality available for everybody :)

      Feel free to contact us if you have any further questions; a good place for asking is our IRC channel on freenode (that is if you drop by when we are online :)

      Greetings,
      Jin

       
    • Debasish

      Debasish - 2007-07-19

      Just use VLC where media server is present.  From the control point just select the protocol and start the vlc with the song location from the disk and protocl as RTP.

      I think this will solve the purpose.  May be i m wrong.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks