Monday, June 07, 2010

Stream Divx/xvid from linux to your xbox 360

For everyone of us who use ushare to stream video from our linux box to the xbox 360 it is common to see an annoying message telling us that the file could not be played because a bad codec.

I have lived with this for a while but today I was not going to accept MS interfere with my just downloaded torrent. So I researched a little and found a solution that actually works. It can be hacky because you need to change your mime info and maybe it will break something.

The problem is related mime info since it looks like ushare doesn't know what to do with "video/x-msvideo" which is related to avi files in the /usr/share/mime/packages/freedesktop.org.xml mime file. Having noticed this, and knowing that "video/x-ms-wmv" is supported by ushare it is easy to change the unssuported msvideo mime to ms-wmv in the mime file. After editing any file in /usr/share/mime/packages/ you will need to `update-mime-database /usr/share/mime/`to apply your changes before they take effect.

Doing this, ushare send the avi file just as any other and, since an old update, the xbox is able to decode it and play it for you.

Problem: I do not feel ok hacking over freedesktop.xml mime file, I'm not sure if there is another way to tell mime that .avi is an video/x-ms-wmv or maybe  video/x-divx.

I think I will need to look for a better way to get it working but that will need to be later since today, I will procrastinate in favor of my now-possible-to-play-on-my-xbox just downloaded video.

*I found all this info here: https://lists.ubuntu.com/archives/ubuntu-us-nm/2007-December/000368.html
(yeah, I never expected to find something useful in ubuntu archives)