Wednesday, February 16, 2011

Streaming Media on Linux to your Xbox 360 with Ushare

I want to apologize, first off, for my tutorials being so long. I seem to get very detailed and long-winded in my writing. I hope you don't mind.

(Note: if by chance you are not having success with this, you may need to provide an exception in your firewall for Ushare)

Our goal is to end up with a simple non-intrusive operation that streams movies and music to our xbox. Currently, High Definition Movies are not supported, but if you already know how to change them to mp4's then go ahead and do so. Here is some information on what the xbox currently supports:

Your Xbox 360 supports a variety of video formats, with playback quality dependent on the type of video you are attempting to play. Read through these specifications and tips to understand the capabilities of streaming media from your PC to your Xbox 360

Supported File Types
The Xbox 360 supports AVI, WMV, MPEG-4 Part 2, H.264 and QuickTime movie formats. The file extensions included are as follows: .avi, .divx, .wmv, .mp4, .m4v, .mp4v, and .mov.

Video Playback
For video files with the WMV container, playback occurs at 15 Mbps (Mega-Bytes Per Second) with a resolution of 1920 x 1080. Files with the H.264 container have the same resolution, but are played back at 10 Mbps. For AVI and MPEG-4 Part 2 video files, playback is 5 Mbps at 1280 x 720 resolution.

Audio Playback
The Xbox 360 supports WMA 7-9 and Lossless audio profiles for WMV video formats.Dolby Digital and MP3 profiles are supported in AVI formats. For MPEG-4 Part 2 and H.264 encoded videos, the console supports only two-channel AAC audio encoding.

Streaming Video
With Zune software, the Xbox 360 can stream unprotected AVI, MPEG-4 Part 2, H.264, and WMV video formats. Through Windows Media Player, protected and unprotected WMV videos can be streamed.

Streaming Tips
Download a third-party video codec package to expand the amount of video formats you can stream using the Windows Media Player. For better playback, convert video files into the more Mircosoft user-friendly WMV format using a third-party video conversion program.
Source: Video Playback & Audio Streaming FAQ for the Xbox 360
Source: http://answers.yahoo.com/question/index?qid=20100413121045AALfcHy
Step One (easy way): Using synaptic package manager
Go into System → Administration → Synaptic Package Manager and search ushare. There are two packages that need to be installed, ushare and libdlna0. As you can see, they have a green box next to them showing that I have them installed already. Install both of these and wait for the installer to complete.



Step Two: Edit your configurations
After you install these two, you should be up and ready to edit you configuration to share with your xbox. (If for some reason you get an error by trying to edit this file or when the file pops up it is blank, type into terminal, “sudo apt-get install ushare” and if you still have problems after that, feel free to contact me) Open up a terminal session and type in:
sudo gedit /etc/ushare.conf

The reason I use gedit is because I don't have to use the arrows to move up and down constantly, I can use my mouse. Any text editor works, so if you want to try something new then replace “gedit” with “nano”, “vi”, or any other text editor that you are aware of.



As you can see from the picture above, these are my settings for my ushare.conf. There are a few specific things that you need to have enabled. One thing most importantly is that you should definitely fill in any part that does not say “default is …” mainly because it needs to read it and won't perform otherwise.
USHARE_NAME= This is where you will put how you want to recognize your pc by name
USHARE_IFACE= This is what connection you want to use to connect to your network
eth0 is usually your automatic eth0 and your wired connection
eth1 is usually the wifi that you are currently connected to
If neither of these work, run in terminal “iwconfig” and “ifconfig”. This will tell you what connections you are currently attached to and in my case, eth1. (Desktops will usually be eth1 and laptops eth0)
USHARE_PORT= This is telling you what ports you should listen to. I have been recommended not to go above 49200 and have seen many times people using 49153 and it worked well for me. I would recommend using that number and seeing how it works, it most likely will.
USHARE_TELNET_PORT= This is if TELNET is enabled which shouldn't be so just put 1337
USHARE_DIR= Here you need to find the entire route to where your media is stored. As you can see in mine, it is filled with numbers. This will not be the case with yours only because I partitioned 1/3 of my 1Tb drive I forgot to name it something easy to type like DAISY which I have for the other 2/3's of the partition.
To find your path, simply go to the drive and right-click and hit properties, it will be in there. You can either copy and paste it or type it in by site.
USHARE_OVERRIDE_ICONV_ERR= I don't know exactly what this does yet but I am looking into it. I was instructed to enable this and it hasn't caused any glitches so far.
USHARE_ENABLE_WEB= This is if you want to have to enable the web interface that geexbox provides. I have no idea how to access it so I will be turning it off on mine, but if you figure it out, please tell us in the comments and I will put it in.
USHARE_ENABLE_TELNET= If you are using this to stream to the xbox only, then you don't need this and just set it to “no”
USHARE_ENABLE_XBOX= Just put yes. I think this one is obvious.
USHARE_ENABLE_DLNA= Here you can enable DLNA so that you can stream to your ps3 or other devices. If you feel the need to do so, go ahead and experiment but I am not covering that here.
Step Three: Starting ushare with xbox enabled
Ushare won't enable the ability to start xbox automatically, so when you start it, you need to manually type it in. To do this, open terminal (or use the one already open) and type in:
sudo ushare -x
The “-x” means that it makes it xbox enabled (thats it), When you first run it, you will probably get a message saying that “eth0 is down.” This is a common problem but should not interrupt your streaming. Stream as normal and sit down on your xbox and watch all of your downloaded movies straight to your television.



Step Four (optional): Creating a startup script
This shouldn't be very difficult as ubuntu provides the ability to make a startup script very easily. Simply right click anywhere on your desktop and select “create launcher.” When you click that, change it to an application in terminal and enter in the command, “sudo ushare -x”. This means that whenever you start up your computer, you will be prompted by terminal to input your password so that you can start ushare as usual. A little nuisance but provided that ushare runs in the background, it isn't much of a problem.

No comments:

Post a Comment