Streaming HD video to low performance devices with UPNP server mediatomb (Watching HD mkv on XBMC4XBOX on X-Box classic)

By Christopher, October 8, 2011

I have figured out a solution for watching HD videos on my old XBOX classic. This attempt should work also for other low performance devices which are not able to render HD media standalone.

The basic idea is using UPNP (because many devices are able to use it) and an UPNP server which supports live transcoding of the media. I choose mediatomb on my debian desktop system(also available for windows…).

After you have installed mediatomb you need add some directories/media`s with the web-interface. I think it is not necessary to explain that step, because its quite easy. If someone needs support please ask. After you have added some media with HD content, in my case some movies inside MKV containers, you need to edit the configuration.

On debian mediatomb configuration is stored in /etc/mediatomb/config.xml. Open this file with an editor and do following changes inside the transcoding section. Changes are marked bold. <transcoding enabled=”yes“>

    <mimetype-profile-mappings>
      <transcode mimetype="video/x-flv" using="vlcmpeg"/>
      <transcode mimetype="application/ogg" using="vlcmpeg"/>
      <transcode mimetype="application/ogg" using="oggflac2raw"/>
      <transcode mimetype="audio/x-flac" using="oggflac2raw"/>
      <transcode mimetype="video/x-matroska" using="vlcmpeg"/>
    </mimetype-profile-mappings>
    <profiles>
      <profile name="oggflac2raw" enabled="no" type="external">
        <mimetype>audio/L16</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="vlcmpeg" enabled="yes" type="external">
        <mimetype>video/mpeg</mimetype>
        <accept-url>yes</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>yes</accept-ogg-theora>
        <agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
        <buffer size="14400000" chunk-size="512000" fill-size="120000"/>
      </profile>
    </profiles>
  </transcoding>

Next restart mediatomb: /etc/init.d/mediatomb restart

After that connect your low performance device with UPNP Client to your mediatomb UPNP server and navigate to some example mkv file and you will see it will play fluently. If you have HD content with other file format you need to add another mimetype.

During testing with some HD movie I recognized that the my HD movie has still HD resolution but because of the converted stream my xbox(you could display information about current running video) was not running into any performance problems in contrast to play directly the HD movie. Because I only own a old CRT television I could not check if my XBOX really displays HD content. If somebody could try this, please let me know.  If you have a low performance device which is still not able to play your HD media with this trick, you need to figure out which option for the vlc transcoder reduces the resolution.

I hope this article could give you some hints on how to solve such issue!