Tuesday, December 16, 2008

Linux to Xbox 360 Media Sharing

Like most people I have a couple TVs in my house. One of the TVs has the MythBox on it and the other has the Xbox 360. Now I keep all my movies on the MythBox (all legal backups of course). I wanted to play these on my Xbox on the other TV. I noticed that after the Xbox 360 dashboard update the Xbox saw my shared drive and I could browse to my media directories. When I tried to Play one of these I got some cryptic Microsoft error code. So I did a little research and found out that Xbox media streaming uses the DLNA protocol to receive content from a peer on a network. Great, does Linux have a DLNA protocol server, YES, it is called uShare.

Here are the easy steps to set it up.

sudo apt-get update
sudo apt-get install ushare

Configuration

Once finished, you’ll have uShare installed and ready for configuration. Out of the box, it won’t work for our purpose. You’ll need to edit /etc/ushare.conf to enable Xbox compatibility as well as define the standard port - 49200. Open /etc/ushare.conf as root and change the following lines:

USHARE_PORT=49200
USHARE_DIR=/path/to/your/media
ENABLE_XBOX=YES

Before these changes will take effect, you’ll need to restart ushare using its init script. However, an issue I’ve noticed is that the last line (’ENABLE_XBOX=YES’) does not always work. So before we restart uShare, we’ll need to make a small change to the init script that resides under /etc/init.d/ to force Xbox compatibility:

sudo vi /etc/init.d/ushare

and add the following line at the beginning of the script:

USHARE_OPTIONS=-x

This tells uShare to start with Xbox compatibility. Now restart uShare using the init script:

invoke-rc.d ushare restart

Now you are finished. You may need to restart the Xbox. Now navigate to ‘My Xbox’ and then select ‘Videos’ and finally you should see ‘uShare’ at the bottom (computer icon). Selecting that will connect to your Linux box and you’ll be able to browse your media just as you would on your PC.

When I tried to play a xvid file it said I needed a download to play this file. I sure it was the codec, but it was free and worked great. Now I have another TV with a HD feed that can Play all the movies on my MythBox .

I love technology!

1 comment:

Anonymous said...

Thanks for this. Previous to the New XBox Experience I was using the old dashboard in conjunction with MythTV. Videos played fine, however I don't know if it was a Myth update or the XBox update (which occurred at a similar time), but the functionality broke so that I could no longer stream the videos.

Thanks to this, my videos stream once again.