TWiT Live via MediaTomb for your WDTV Live (and probably ps3, whatever..)

I recently upgraded from a WDTV media player to a WDTV Live. The WDTV is just a simple set top box that allows you to play video on your tv, much like an xbox 360 and a whole bunch of other devices. The WDTV live allows you to play stuff over the network which opens up a whole host of cool stuff if you use the mediatomb DLNA server software available for linux (google tversity if you want something similar for windows..)

Anyway, I managed to get my wdtv live to play the live TWiT (http://live.twit.tv) video stream – meaning I now have a real internet tv station right up on my tv!

This is a bit rough and ready, but hopefully I’ll improve it over time. You’ll probably need to have a rough idea of what you’re doing.

Make sure transcoding is set to yes in the config:

<transcoding enabled=”yes”>

In mime type profile mappings in the config:

<transcode mimetype=”video/x-flv” using=”ffmpeg”/>

So anyway, you’ll want to add this profile to your config:

<profile name=”ffmpeg” 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=”/usr/local/bin/ffmpeg-tr.sh” arguments=”%in %out” />
<!– <buffer size=”14400000″ chunk-size=”512000″ fill-size=”1024″/> –>
<buffer size=”5242880″ chunk-size=”102400″ fill-size=”1048576″/>
<hide-original-resource>yes</hide-original-resource>
</profile>
And create this shell script:
#!/bin/sh
exec ffmpeg -i “$1” -sameq -f mpeg -me_method zero -aspect 16:9 – > “$2”
The final piece of the puzzle is to create a link to it in the mediatomb database via the web interface:
Type: External Link (URL)
URL: http://bglive-a.bitgravity.com/twit/live/high
Protocol: http-get
Class: object.item.videoItem
Mimetype: video/x-flv
Notes:
  • You might be able to/want to change the mimetype to a made up one, video/x-twitlive or something so it doesn’t conflict with other types.
  • You’ll probably want to turn off the other profiles you won’t be wanting.
  • Play with the buffer sizes, the commented out one seemed to go a bit funny for me.

A special thanks to aTc from #mediatomb on irc.freenode.net – without whom this wouldn’t exist.

3 thoughts on “TWiT Live via MediaTomb for your WDTV Live (and probably ps3, whatever..)

  1. I think I’ve gotten the majority of it down okay, MediaTomb install and config seems to have gone to plan but for some reason, when I try to play “twitlive” (as I named it) from my WDTV live I get the following output in terminal and an unsupported file error from the WDTV. Any insight?

    /usr/local/bin/ffmpeg-tr.sh: 2: cannot create “/tmp/mt_transcode_1WZEOV″: Directory nonexistent
    /usr/local/bin/ffmpeg-tr.sh: 2: cannot create “/tmp/mt_transcode_3JGFOV″: Directory nonexistent

    Apologies if it isn’t quite the correct place for this but there is not much info on the topic outside of here.

  2. Hi Colin,

    It could be a number of things, my guess is that you might be missing a tool mentioned in the post.. if not mentioned in the post I can’t really help you as I’ve since abandoned using it as it was never that reliable (you couldn’t pause the live stream, that’d break it) and it often went ‘funny’.

    If you run the latest update on your wdtv live and go into internet media, then mediafly/mediafly plugins you’ll see there’s a twit plugin which you can use to access the static podcasts which I know isn’t as good, but it’s still not bad at all.

    Sorry I couldn’t have been more help. Hopefully mediafly/WD will add a live stream there somewhere as there’s already a dedicated twit section so here’s hoping!

  3. Hi,

    i always get this error:

    ERROR: no valid handler type in /content/online/object_id/

    Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.