SourceForge has been redesigned. Learn more.

Mediatomb input is an rtp stream, howto??

  • Sabah Al-Sabea

    Sabah Al-Sabea - 2010-08-23


    I want to let mediatomb has as input rtp stream. Here is my setup:

        - I have mediatomb running on ubuntu on a virtual machine,
        - I use vlc to stream an .avi or .mp4 video file using rtp to the loopback address (rtp://
        - the host machine is windows xp with xmbc MediaRenderer
        - the network adapter between the host and guest machine is bridging
        - I want the mediatomb to take this rtp stream and stream it again (over UPnP) so that i can play it on xbmc

    After googling and trying for a couple of weeks I realized that i should use the transcoding feature of the mediatomb. In my configuration file I have changed/added  the following:

    <transcoding enabled="yes">
    <transcode mimetype="video/x-avi" using="ffmpeg-sh"/>
    <profile name="ffmpeg-sh" enabled="yes" type="external">
                <agent command="" arguments="%in %out"/>
                <buffer size="10485760" chunk-size="262144" fill-size="5242880"/>

    I created the /bin/ file (and made it executable) and put this in it:

       exec ffmpeg -i "$1" -b 2000k -me_method zero -f mpeg -ar 48000 -ac 2 - >"$2"

    In the web interface I added an item with the following characteristics:

    Type:               external link
    title:                  test
    URL:                rtp://
    Protocol:         rtsp-rtp-udp
    class:              object.Item.VideoItem
    Mimetype:       video/x-avi

    For testing run the vlc for streaming (without transcoding) and to make sure it works i try to open the stream using another instance from vlc and it works :-)

    However from the UPnP part (xbmc and mediatomb) it doesn't giving lot of errors.

    I have been trying for weeks and it is really annoying me as it is mentioned that mediatomb is able to take input from rtp stream but i am not successful in this. So please if you have any idea or any question for more details that may help me solve this, I will be very thankful.

  • Jin

    Jin - 2010-10-18

    use http-get in the protocol, with your setup you are not serving the rtp stream directly to the player, instead you are using MediaTomb to transcode and that serves the transcoded stream via http.

  • Sreekanth  Chandran

       exec ffmpeg -i "$1" -b 2000k -me_method zero -f mpeg -ar 48000 -ac 2 - >"$2"

    Add a -y option to the command as the ffmpeg transcoder needs to be forced to write to the fifo reffered to by the variable $2. Refer the "ffmpeg failing mysteriously" in the documentation


Log in to post a comment.