HOWTO: Ubuntu UPnP Server to XBox 360 using uShare
I recently got an Xbox 360, not a new 360 S, but the older 360. The ones that tend to cook themselves after a period of time
Well anyway, over the holidays, I had wanted to take a motherboard I had lying around, a PCI graphics card, a cheap network adapter, shove it all in a little case, and with a VGA – VGA cable, connect it to my TV, in order to play back the many movies and TV shows I have stored on my server.
I hadn’t gotten around to it by the time the 360 arrived on the scene. The 360 is really just a computer, a tri-core at 3.2GHz with 512Mb of RAM, making it quite powerful. Powerful enough for full HD gaming. And, it has a built in UPnP client, meaning that we can stream media to it, videos, pictures, music, so long as it’s in the right format or you can set it up as a Windows Media Centre extender.
Now, let’s begin, using a program called ushare.
On Ubuntu, install ushare from the repo’s using Synaptic or typing the following into a terminal;
sudo apt-get install ushare
Hit Enter and give your password, hitting Enter again.
Once it’s installed, it’s incredibly easy to setup. Simply edit the config using;
sudo nano /etc/ushare.conf
and make it look like the following, entering the name of your computer and media directory where required
# /etc/ushare.conf # Edit this file with 'dpkg-reconfigure ushare' # Configuration file for uShare # uShare UPnP Friendly Name (default is 'uShare'). USHARE_NAME=Computer_Name # Interface to listen to (default is eth0). # Ex : USHARE_IFACE=eth1 USHARE_IFACE=eth1 << Change this to suit your network interface (default = eth0) # Port to listen to (default is random from IANA Dynamic Ports range) # Ex : USHARE_PORT=49200 USHARE_PORT=49200 # Port to listen for Telnet connections # Ex : USHARE_TELNET_PORT=1337 USHARE_TELNET_PORT= # Directories to be shared (space or CSV list). # Ex: USHARE_DIR=/dir1,/dir2 USHARE_DIR=/path/to/media # Use to override what happens when iconv fails to parse a file name. # The default uShare behaviour is to not add the entry in the media list # This option overrides that behaviour and adds the non-iconv'ed string into # the media list, with the assumption that the renderer will be able to # handle it. Devices like Noxon 2 have no problem with strings being passed # as is. (Umlauts for all!) # # Options are TRUE/YES/1 for override and anything else for default behaviour USHARE_OVERRIDE_ICONV_ERR= # Enable Web interface (yes/no) USHARE_ENABLE_WEB=yes # Enable Telnet control interface (yes/no) USHARE_ENABLE_TELNET=no # Use XboX 360 compatibility mode (yes/no) USHARE_ENABLE_XBOX=yes # Use DLNA profile (yes/no) # This is needed for PlayStation3 to work (among other devices) USHARE_ENABLE_DLNA=no
Start up the server with;
sudo /etc/init.d/ushare start
And you’re done!
uShare does have some limitations though, namely the lack of on-the-fly transcoding, meaning you’ll have to make sure that your media is in the correct format. Xbox seems to play well with .avi files generally, and some mp4′s.
It also doesn’t automatically update itself, meaning you’ll have to restart it manually when new videos are added. Personally, I use a crontab to restart the server at 3am. To do so open,
sudo nano /etc/crontab
and add to the bottom;
#Refresh uShare 00 03 * * * root /etc/init.d/ushare stop 01 03 * * * root /etc/init.d/ushare start
That should do it. Each night at 3am, ushare will restart (for some reason the restart flag doesn’t work).
I’m looking into an alternate solution, and may put up a post in the near future if it works out better.
Filed under: HowTo, Posts, Server, Ubuntu | 10 Comments
Tags: postaweek2011, Server, Ubuntu