Ads 468x60px

Showing posts with label Xbox. Show all posts
Showing posts with label Xbox. Show all posts

Saturday, 17 July 2010

The Ultimate Ubuntu XBOX 360 Multimedia Sharing Guide

NOTE: Since the Fuppes UPNP project has gotten its act together I consider that project a superior solution to ushare. I have some basic instructions for compiling SVN fuppes at the end of this thread as currently there is no fuppes package available in the Ubuntu repos. Possibly when my 360 comes back from repair I will consider updating the guide unless someone does it before me.

So your using Ubuntu and you want to share multimedia from your machine to your 360. This is indeed possible! Some of you may ask, there is a number of existing guides about this, so whats different about this one? Well, this guide uses free software and it uses free software that is not encumbered with bugs.

At the heart of the matter is that we need whats called a upnp media server to serve the media requests. Microsoft in typical fashion did not adhere to upnp standards when producing the 360's sharing. So that means right off the bat, upnp media servers will not work. Thankfully though, some upnp media servers have been modified to run in a special xbox 360 mode. The bad news is that these select servers are either not free or not robust.

The community has reached a point where the single robust upnp server that is free, and importantly is not deprecated, does not have the special xbox 360 mode. Servers like 360 media serve and Fruppes are not actively being developed. The Fruppes community is talking about merging with MediaTomb but getting 360 mode into MediaTomb is going to take time. Ushare is still being developed but it contains a number of ugly bugs that makes the experience frustrating. There is a payware upnp media server but in our hearts, we know that using non free software really isnt right.

Thanks to forum member NeToU he has taken the Ushare source code and patched it to resolve these ugly bugs. So we will be using his patched Ushare version.

Were going to need to download his source code, configure it, compile it and install it. This is not as hard as it sounds and provided you can follow these instructions carefully you will do fine.

NOTE: YOU MUST REMOVE AND PURGE ANY OLD USHARE INSTALLS YOU MAY HAVE FROM THE REPOS BEFORE STARTING

1. Download The Source

Goto http://netou.co.uk/ and download the source code.

2. Extract The Source

I keep my source in a directory tree under home / src though you may use a different approach. Open up a terminal by selecting the Ubuntu icon, Accessories and then Terminal. Now carefully copy and paste the following, one line at a time, hit enter in the terminal and do the next line.














Code:
cd ~
mkdir src
Now move your archive to the src directory depending on where you downloaded the source too. For example, if it is in your home directory use:


Code:
mv ~/ushare-11a-netou.tar.bz2 ~/src/
Lets extract the source now:


Code:
cd ~/src
tar -xjf ushare-11a-netou.tar.bz2
3. Compile the program

First lets get the dependencies out of the way. If your not sure if you already have these there is no harm in doing it as existing installs will not be installed again. So lets get the tools to be able to build software:


Code:
sudo apt-get install build-essential
Now lets deal with getting the software Ushare depends on:


Code:
cd ushare-1.1a-NeToU
sudo apt-get build-dep ushare
Once that is done, we can compile Ushare now:


Code:
./configure --prefix=/ --bindir=/usr/bin --mandir=/usr/share/man
make
sudo make install
sudo make clean
4. Configure Ushare:

Ushare like most Linux apps has a conf file. It is critical that you enable the special xbox 360 upnp mode and that you correctly put in the path of the multimedia that you want to share. To edit you conf file, use the following command:


Code:
gksudo gedit /etc/ushare.conf
Or use nano in the CLI:


Code:
sudo nano -w /etc/ushare.conf
Edit the file to your liking, with the important settings explained below:



Code:
USHARE_NAME=          Put the name you want your share to be called e.g. MyMedia
USHARE_PORT=          Define the port number you want to use e.g. 49200
USHARE_DIR=           Configure the share locations e.g. /mnt/hda1,/mnt/hdb1/videos/share/
USHARE_ENABLE_WEB=    Use yes to enable the web interface
USHARE_ENABLE_TELNET= I turn this off with no, preferring to use the web interface
USHARE_ENABLE_XBOX=   This must be yes for 360 sharing to work
Note that Ushare does not handle spaces in the share directories.

5. Controlling the Ushare daemon

To start Ushare:


Code:
sudo /etc/init.d/ushare start

And to stop Ushare:


Code:
sudo /etc/init.d/ushare stop
6. Getting Ushare to automatically start on user login:

Some of the existing guides that use not so robust Upnp servers, also recommend unnecessarily complex ways to get Ushare to autostart. For example by hacking up sudo to run Ushare as a session item for the user. This approach is not only messy, but it also creates the problem where if that user logs out and then later logs in again without rebooting you now have multiple Ushare sessions going.

Let's get Ushare to auto start using Ubuntu's default runlevel settings:



Code:
sudo update-rc.d ushare defaults
7. Managing Ushare via the web interface

You can manage Ushare via the web interface at:


Code:
http://ip_address:port/web/ushare.html
For example on my machine, its http://192.168.10.2:49200/web/ushare.html

8. Wait, I have the firewall on!

If your using Ubuntu's UFW, you can easily add a rule to cope with this. Lets say your 360 uses a static IP address of 192.168.10.3 and your machine is 192.168.10.2. Use the following command to provide a small hole in your firewall for this:



Code:
sudo ufw allow proto tcp from 192.168.10.3 to 192.168.10.2 port 49200
You can easily check what UFW is doing with:



Code:
sudo ufw status



FAQ #1 Why Cant I Transcode?

You can easily! However the best way is to do this outside of a upnp server. Why? The elegant way to do it otherwise is coding a media centre extender. However Microsoft's 360 media centre does not support MPEG4-ASP (divx, xvid) among other things - yes it is behind the "dumber" sharing interface without the media centre. This complicates coding a media centre add on.

There is robust and verstile Linux apps you can use to easily transcode media. I consider the best to be mencoder which can quickly convert many different media formats into mpeg2. You could even batch script it to convert directories of your media overnight.

FAQ #2 I Want to Uninstall



Code:
cd ~/src/ushare-1.1a-NeToU/
sudo make uninstall
sudo update-rc.d -f ushare remove



Subscribe to the Ubuntu Dan newsletter

share



Enhanced by Zemanta

Recent Posts

 
Blogger Templates