Serving DivX to the Xbox 360 from Ubuntu
Microsoft released the fall update for the Xbox 360 on the 4th of December which included support for DivX/Xvid playback. A popular choice for encoding video due to its compression to quality ratio. Could this mean I am now able to free up some space on my A/V rack? Currently I’m using a hardware-modified Xbox (original) with the open source Xbox Media Center (XBMC) installed on it, decoding my Divx/Xvid content from a Samba share on my media server.
After a quick poke around I found a package called uShare that serves media over the uPnP protocol that the Xbox 360 utilises. Before we go installing uShare, it has a few dependencies: libupnp and libdlna. First up, libupnp…
wget http://dfn.dl.sourceforge.net/sourceforge/pupnp/libupnp-1.6.1.tar.bz2 tar -xf libupnp-1.6.1.tar.bz2 cd libupnp-1.6.1 ./configure make sudo make install
…and then libdlna…
wget http://libdlna.geexbox.org/releases/libdlna-0.2.3.tar.bz2 tar -xf libdlna-0.2.3.tar.bz2 cd libdlna-0.2.3 ./configure
This is where I hit my first problem:
Error, can't find libavformat
After consulting the almighty Google, it would appear libavformat is a part of ffmpeg, so I then installed ffmpeg, still no luck compiling. I also tried installing libdlna via apt-get, which looked to have worked but I later discovered it didn’t when configuring uShare.
We can serve content to the Xbox 360 with DLNA disabled so I took that route for now. Lets install uShare…
wget http://ushare.geexbox.org/releases/ushare-1.1.tar.bz2 tar -xf ushare-1.1.tar.bz2 cd ushare-1.1 nano src/mime.c
You’ll notice we just opened mime.c for editing, this is because we need to change the following line:
{ "avi", UPNP_VIDEO, "http-get:*:video/x-msvideo:"},
To this:
{ "avi", UPNP_VIDEO, "http-get:*:video/x-ms-wmv:"},
We have to change this line so that uShare thinks that avi containers are actually wmv as it currently assumes that the Xbox 360 only supports wmv. On with the uShare install, as you can see below we’re disabling DLNA as I couldn’t get it to install – Feel free to try it without that option, you might have managed a successful libdlna install.
./configure --disable-dlna make sudo make install
Now that we have uShare installed, we can launch it with the following command. I have used two options, -x enables Xbox mode, and the -c is for marking the directory we want to serve to the Xbox 360.
ushare -xc /media/tv
We can now fire up the Xbox 360, browse to the media blade, select videos, hit the X button to change the source and select uShare to start browsing your shared content.
So, can I demote my original Xbox? No, and here’s why:
- The Xbox 360 only decodes DivX that was encoded with version 5.0 or higher. I have a fair number of pre 5.0 files that I don’t fancy re-encoding.
- There is no support for subtitles (.srt) – I sometimes find myself watching films that have some foreign dialog.
- A large number of my encoded films are playing back in a small box using only a quarter of my screen – I’m not sure if it was the way I ripped and encoded the files, but I can’t pinpoint a consistent attribute in those rips that could be causing this. It doesn’t happen on the Xbox.
- There is no support for playing media compressed in archives, which I find myself doing on a regular basis. But to be fair, I wasn’t expecting to be able to do this anyway!
It’s definitely a start, but also something I can’t see Microsoft improving on any time soon. It may also be perfect for a lot of people, but just not me.
Tags: DivX, media server, network, uPnP, Xbox 360, XviD
This entry was posted on Thursday, December 6th, 2007 at 10:48 pm and is filed under GNU Linux, Xbox 360. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
December 22nd, 2007 at 10:22 pm
Hey, thanks for this post. I found it via Google when I was having the exact same problems you were with libavformat. I hadn’t figured out that I could use ushare with dlna disabled so this saved me some time, I appreciate you sharing.