Home
Update

uShare has been updated, see here for info. You don't need the patched version to do this anymore, just the latest version.
Finally a way to stream videos to the 360 without windows.


Note: you need the latest update for the xbox 360.
32bit package has been updated on 05/31/07, forgot to patch it before compiling it.
I’m having problems streaming video with my wireless B game adapter, so I’m getting a D-Link DWL-G730AP High Speed Wireless Pocket Router/AP - Retail, hopefully that will work better.

Thanks to KeithB from geexbox’s forum for releasing a patch. Also thanks to microsoft for making it possible to stream MPEG 4 files.
If the packages don’t work or you aren’t using ubuntu or debian, then you can download the patched source below.

Download ushare 1.0:
ushare_1.0-1_i386.deb
ushare_1.0-1_amd64.deb

You can get the latest source from here.

If you want your mirror on here, then send an email to info@vanvalkinburgh.org.

You also need libupnp:
Download 32 bit libupnp
Download 64 bit libupnp
You can also obtain libupnp here.

After you install it run the following command:

ushare -p 49153 -D -x -c /media/sda1/MyVideos/converted/

Change the folder path to the correct folder.

ffmpeg: (If you have gnome, I provided a nautilus script, so all you have to do is right click the file, and you can convert it. You don’t need avidemux for this method.)
The compression is pretty good. One of my mpg files went from 365 MB to 98 MB. The videos look good too.

The below version of ffmpeg has aac support.
ffmpeg 32bit package with aac support
ffmpeg 64bit package with aac support

Mirrors
ffmpeg_20070531-1_amd64.deb mirror
ffmpeg_20070601-1_i386.deb mirror

The below script is for gnome users, click the link, it has instructions.
nautilus script

If you go into synaptic you can lock the version of the package, so the annoying update thing will go away. Select ffmpeg and then click Package at the top and lock version.

The command for converting videos with ffmpeg is below:

ffmpeg -y -i input.avi -vcodec h264 -b 1000000 -acodec aac -ar 48000 -ab 160 -f mov output.mov

I made a share.sh file in my home folder with that in it.

share.sh:

#!/bin/sh
ushare -p 49153 -D -x -c /media/sda1/MyVideos/converted/

To make it startup when you login go to System | Preferences | Sessions and add a new startup entry.
If you add a new folder or file, then you can go to http://localhost:49153/web/ushare.html and click refresh shares, you can also add shares.

Convert videos to MPEG 4

I used avidemux to do this, so these instructions are for it.

I installed avidemux with automatix. I also installed “Multimedia Codecs” with automatix.

Change the following settings:

Video: Mpeg4
Audio: FAAC
Format: MP4

 

 

 

 

 

Save the file with a .mov extension, wouldn’t work with .mp4.

On my xbox it said I needed a media update, so I said yes, and then it said I already have it, but I downloaded it anyways. And the file played after that, the tv was black for some seconds, and then it started to play.

If the file isn’t playing full screen, then click A and click the right arrow key until it says display mode, and then keep clicking A until it says full screen.

Tips
Xbox 360 video playback faq

Things to try if the video doesn’t work.

In avidemux after you select the video codec, click filters, and click mplayer resize. If you don’t have a HDTV, then put in 480×480. If you have a HDTV, then you probably don’t need to change this, unless the video is to big. Look at the xbox 360 faq link above.


 

 

 

After you select the audio codec, click filters, and click resample to hz, put it 48000.
Change mixer to stereo.

 

 

 

 

 

If you can’t get avidemux to work, you can try ffmpeg.

59 Responses to “Stream videos to xbox 360 with patched ushare”
  1. 1CraigMay 29th, 2007 at 10:45 pm

    Great guide, I was under the impression the 360 could only handle wmv, but ffmpeg isn’t currently capable of encoding wma audio so there was no sound playback.

    I’m having issues with uShare though, the 360 is connecting to my computer fine, but it’s saying there aren’t any videos on the computer (I’m sharing 4, and uShare sees that). Any ideas?

  2. 2adminMay 30th, 2007 at 2:56 pm

    Do you have the latest version of the xbox 360 firmware?
    Also you have to use the patched version, the one on ushare’s site doesn’t work for videos.

  3. 3CraigMay 30th, 2007 at 9:19 pm

    Yea I’ve got the latest version of the 360 firmware and I’m using the debs from this site. Using twonkymedia my 360 can see my videos fine D:.

  4. 4adminMay 31st, 2007 at 3:00 pm

    Just tested the 32bit package, I didn’t actually test it on the 360, but with geexbox, I have it in vmware server. So the 32bit package isn’t working correctly. I must of forgot to apply the patch, I thought I did, but I guess I forgot. After I get it working I’ll put a new package up.

  5. 5adminMay 31st, 2007 at 3:24 pm

    Re download the file above, it should work now hopefully. Make sure you stop ushare, if you ran it with the -D option then run killall ushare, I run it two times just to be sure.

  6. 6astromanMay 31st, 2007 at 7:35 pm

    I played the video once and it worked great, but now I’m getting a ‘cannot play because this may be unsupported’ message on my 360.

  7. 7adminMay 31st, 2007 at 7:57 pm

    Is it a different video? I was having the same problem try ffmpeg, info above. I think ffmpeg works better.

  8. 8CraigMay 31st, 2007 at 8:48 pm

    I was getting those “cannot play …” messages earlier too. I had downloaded the Apple Addon from XBL Marketplace a long time ago. Redownloading it did the trick for me. Give that a try too maybe you have a similar situation.

    The 32bit version works great now, thanks. Glad to see there’s a free alternative, no twonkymedia :D.

  9. 9astromanJun 1st, 2007 at 6:00 pm

    I figured it out, it wouldn’t work while I tried to share 2 directories (one for music and one for video) but when I disabled the audio directory the video worked fine.

  10. 10adminJun 1st, 2007 at 7:54 pm

    My videos play fine with a audio folder, but the audio files don’t show up.

    -c /video/ -c /music/

    Thats what I use for two folders, and also if you want to see what its doing add -v to the command. Add >> sharelog.txt at the end of the command to produce a log file.

    Looks like two things have to be done to get audio to work:
    1. Only show videos in the video folder, and only show audio in the music folder.
    2. Actually play mp3s instead of getting an error or not playing, can’t remember which it does. Will try with just the audio folder to see what happens.

    Mp3s play fine for me, a new solution instead of using x360mediaplay would be to run two ushare’s both on different ports.

    Command 1:
    ushare -p 49153 -D -x -c /media/sda1/MyVideos/converted/

    Command 2:
    ushare -p 49154 -D -n music -x -c /music/

    Since their code has barely any comments it would be a pain to fix it, since I’m not really sure what anything is doing. So thats a temporary solution until somebody fixes it.

    Edit
    Well running two instances of it doesn’t really work, when searching for computers you’ll only see one of them. It also only shows 1,000 songs, and under Artists it just shows the song names. So I guess x360mediaserve is still better for music. Going to try adding -n videos to the first command though, to see if it works. Doesn’t really matter, as I can’t stream all my music, I have more then 1,000 songs.

    Contacted the developer of mediatomb, maybe I can help them add xbox 360 support.

  11. 11JasonJun 6th, 2007 at 11:05 pm

    Am I missing something? I followed the steps above, but my 360 can’t discover my Ubuntu box. I’m fairly new to linux (after getting fed up with my upteenth Windows reinstall) and I’m trying to get the xbox media sharing enabled.

    I installed ushare and then libupnp from the links above and then ran the ushare command indicating my music folder. I’m assuming this share is recursive (no?). Is there something I’m missing or not doing to get the xbox to recognize the share? How can I tell what’s being shared and if the share is working?

    Thanks in advance.

  12. 12chronniffJun 7th, 2007 at 1:23 am

    I had it working fine following the given instructions, but after I rebooted all of a sudden the darn thing stopped working….when I try and start it I get this:

    uShare (version 0.9.10), a lightweight UPnP Media Server.
    Benjamin Zores (C) 2005-2007, for GeeXboX Team.
    See http://ushare.geexbox.org/ for updates.
    Initializing UPnP subsystem …
    Cannot initialize UPnP subsystem
    Stopping UPnP Service …

    any ideas? I know it really isn’t giving much to go on here

  13. 13adminJun 7th, 2007 at 7:39 am

    Jason did you run the ushare command with -x? Oh yeah and you can refresh the shares by going to http://localhost:49153/web/ushare.html.

    chronniff
    Try running it without -p 49153. Also are you running any other upnp servers? If so try only running ushare, and none of the others.

  14. 14JasonJun 7th, 2007 at 6:42 pm

    I tried a few things and I can connect and play music now!

    A couple more questions:
    When my music is listed on the xbox side, it’s pretty ugly It shows the track number and the song name even when I try to view by album or artist. Does this have to do with the way ushare is sharing the music? Is there any way to clean this up?

    Also, I was using TVersity before moving to Ubuntu and it would transcode AAC files on the fly to share to the 360 so you wouldn’t have to convert all of your music to mp3. Do you or does anyone know of anything like this in the works for linux?

    Thanks for your help! Scratch one more reason to have Windows installed at all…

    Admin:
    Try 360mediaserve. I think it converts aac to mp3s. Sorry about the delay, your comment was marked as spam, stupid spam filter.

  15. 15TomJun 10th, 2007 at 10:59 pm

    I found your guide very helpful and your instructions worked perfectly.

    Does the patched uShare enable the streaming of h.264/x.264 files? These are also supported under the new patch. If I simply rename them .mov, won’t the Xbox recognize it as a supported codec and play them?

  16. 16adminJun 11th, 2007 at 7:13 am

    It will play h.264 if you rename it to .mov.

  17. 17DeCappaJun 12th, 2007 at 1:34 pm

    Tom, first off, you rock. Thanks for this guide it really helped me out. I have started transcoding some video files and they work great. I am having some troubles taking a dvd to a file format that is recognizable to the XBOX. Currently i am using dvd::rip to take them to “raw” unencrypted mpeg files and then I use avidemux with the settings you specify to turn it into an mp4 (Mpeg (lavc), aac, mp4, the .mov file extension). For some reason when i try to play it on the 360 it comes out as an unrecognized format. Have you taken a dvd to a format readable by the 360 before? Have you any suggestions for other methods i should try? Are there any file size / resolution limitations I should be aware of? Thanks again.

  18. 18adminJun 12th, 2007 at 2:59 pm
  19. 19JoshJun 14th, 2007 at 5:04 pm

    Hey, I followed all directions but can’t get get my xbox 360 to see that i’m running media sharing software. This link doesn’t work for me either.. http://localhost:49153/web/ushare.html .. I had previousely ran this command per the geexbox ushare main page… route add -net 239.0.0.0 netmask 255.0.0.0 eth1 .. I don’t know what it does but maybe it has something to do with why nothing’s working. I’m kinda new to Linux, Thanks.

  20. 20adminJun 14th, 2007 at 5:32 pm

    Try running ushare without the -D option.
    ushare -p 49153 -x -c /media/sda1/MyVideos/converted/
    Before running that though run:
    killall ushare

    It will say something like
    “UPnP MediaServer listening on xxxx:xxxx”
    So you would go to http://xxxx:xxxx/web/ushare.html
    The first four x’s are the ip address, and the other are the port number. You can also try running it without the -p 49153 option.

  21. 21JoshJun 14th, 2007 at 5:47 pm

    I’m getting somewhere. I ran it without the -D option and got this error.

    Can’t find interface eth0.
    Recheck uShare’s configuration and try again !

    I’m using eth1, can I change fix it or should I just switch my ethernet cord to the other port? That was a quick response btw. Thanks.

  22. 22adminJun 14th, 2007 at 6:47 pm

    Do the below in a terminal:

    sudo gedit /etc/ushare.conf

    Where it says “USHARE_IFACE=” after the equal sign put eth1.
    USHARE_IFACE=eth1

  23. 23JoshJun 14th, 2007 at 7:09 pm

    New Error :( Sorry for the trouble.

    uShare (version 0.9.10), a lightweight UPnP Media Server.
    Benjamin Zores (C) 2005-2007, for GeeXboX Team.
    See http://ushare.geexbox.org/ for updates.
    Initializing UPnP subsystem …
    Cannot initialize UPnP subsystem
    Stopping UPnP Service …

    I have libupnp installed, is there something I need to configure? Thanks again.

  24. 24adminJun 14th, 2007 at 7:20 pm

    Which ushare package did you download? The 32bit package or the 64bit package?

  25. 25JoshJun 14th, 2007 at 7:22 pm

    64bit. I’m running the 64 bit version ubuntu feisty fawn 7.04

  26. 26JoshJun 14th, 2007 at 7:27 pm

    Here’s some more info, don’t know if it’ll help at all. Connected through eth1, with static ip 192.168.0.11, subnet mask 255.255.255.0, default gateway 192.168.0.1

  27. 27adminJun 14th, 2007 at 7:32 pm

    Try the below:
    route del -net 239.0.0.0 netmask 255.0.0.0 eth1

    Hopefully that’ll fix it.

  28. 28JoshJun 14th, 2007 at 7:37 pm

    Hmm…
    josh@josh-ubuntu:~$ route del -net 239.0.0.0 netmask 255.0.0.0 eth1
    SIOCDELRT: Operation not permitted
    josh@josh-ubuntu:~$ sudo route del -net 239.0.0.0 netmask 255.0.0.0 eth1
    Password:
    SIOCDELRT: No such process

  29. 29adminJun 14th, 2007 at 7:49 pm

    Post the output of netstat -r.

  30. 30JoshJun 14th, 2007 at 7:51 pm

    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
    192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
    link-local * 255.255.0.0 U 0 0 0 wlan0
    link-local * 255.255.0.0 U 0 0 0 eth0
    default 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
    default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
    default * 0.0.0.0 U 0 0 0 wlan0

  31. 31adminJun 14th, 2007 at 7:55 pm

    Try running it without -p 49153.

  32. 32JoshJun 14th, 2007 at 7:58 pm

    same thing

    josh@josh-ubuntu:~$ ushare -x -c /home/josh/Videos/Converted/
    uShare (version 0.9.10), a lightweight UPnP Media Server.
    Benjamin Zores (C) 2005-2007, for GeeXboX Team.
    See http://ushare.geexbox.org/ for updates.
    Initializing UPnP subsystem …
    Cannot initialize UPnP subsystem
    Stopping UPnP Service …
    josh@josh-ubuntu:~$

  33. 33adminJun 14th, 2007 at 8:03 pm

    Then try the below:
    sudo route add -net link-local netmask 255.255.0.0 eth1
    sudo ifdown eth1
    sudo ifup eth1

    If your internet doesn’t work after doing that, then run the below:
    sudo route del -net link-local netmask 255.255.0.0 eth1
    sudo ifdown eth1
    sudo ifup eth1

  34. 34JoshJun 14th, 2007 at 8:15 pm

    josh@josh-ubuntu:~$ sudo route add -net link-local netmask 255.255.0.0 eth1
    josh@josh-ubuntu:~$ sudo ifdown eth1
    RTNETLINK answers: No such process
    postconf: fatal: open /etc/postfix/main.cf: No such file or directory
    josh@josh-ubuntu:~$ sudo ifup eth1
    RTNETLINK answers: File exists
    run-parts: /etc/network/if-up.d/avahi-autoipd exited with return code 2
    postconf: fatal: open /etc/postfix/main.cf: No such file or directory

    Sorry for all the trouble, and thanks for all the help, I’m getting to bed, it’s 11:15 over her, I’ll try getting to the bottom of this tomorrow after work. Thanks again.

  35. 35adminJun 14th, 2007 at 9:01 pm

    You can always try rebooting or running sudo /etc/init.d/networking restart. Though whenever I run /etc/init.d/networking restart, my internet doesn’t work at all. And I end up having to do ifdown and ifup.

  36. 36chronniffJun 15th, 2007 at 7:33 am

    sorry for the late thank you, but thanks for the help, I think I was having issues with running the x360mediaserve at thesame time, whatever the problem was it seems to have fixed itself…regardless I thanks for the help

  37. 37JoshJun 15th, 2007 at 2:54 pm

    I’ve tried rebooting, still having the same problems

    Initializing UPnP subsystem …
    Cannot initialize UPnP subsystem
    Stopping UPnP Service …

  38. 38adminJun 15th, 2007 at 3:22 pm

    Post your ushare.conf file.
    cat /etc/ushare.conf

    Maybe there’s an error in it.

  39. 39JoshJun 15th, 2007 at 3:28 pm

    # /etc/ushare.conf
    # Configuration file for uShare

    # uShare UPnP Friendly Name (default is ‘uShare’).
    USHARE_NAME=

    # Interface to listen to (default is eth0).
    # Ex : USHARE_IFACE=eth1
    USHARE_IFACE=eth1

    # Port to listen to (default is random from IANA Dynamic Ports range)
    # Ex : USHARE_PORT=49200
    USHARE_PORT=

    # Directories to be shared (space or CSV list).
    # Ex: USHARE_DIR=/dir1,/dir2
    USHARE_DIR=

    # 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=

  40. 40adminJun 15th, 2007 at 3:35 pm

    Post the output of route -n

  41. 41JoshJun 15th, 2007 at 3:36 pm

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0
    169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
    0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
    0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
    0.0.0.0 0.0.0.0 0.0.0.0 U 1000 0 0 wlan0

  42. 42adminJun 15th, 2007 at 3:50 pm

    Try running ushare with the below:
    ushare -i eth1 -c /path/to/videos/ -v

  43. 43JoshJun 15th, 2007 at 3:54 pm

    same result
    Initializing UPnP subsystem …
    Cannot initialize UPnP subsystem
    Stopping UPnP Service …

  44. 44adminJun 15th, 2007 at 3:56 pm

    Did the other ushare work? The one without the patch.

  45. 45JoshJun 15th, 2007 at 4:02 pm

    Nope, I just tried and got the same error.

  46. 46adminJun 15th, 2007 at 4:04 pm

    route add -net 239.0.0.0 netmask 255.0.0.0 eth1

    I guess you could try that again.

  47. 47adminJun 15th, 2007 at 4:10 pm

    Are you running any other upnp servers?

  48. 48JoshJun 15th, 2007 at 4:12 pm

    didn’t help, this might be a lost cause :(

  49. 49adminJun 15th, 2007 at 4:12 pm

    Also the reason you are getting that error is either the ip address is incorrect or the port number is in use.

  50. 50JoshJun 15th, 2007 at 4:12 pm

    no, i’m just running gaim, beryl, and uTorrent through wine

  51. 51JoshJun 15th, 2007 at 4:14 pm

    i just turned off utorrent and it worked

  52. 52adminJun 15th, 2007 at 4:17 pm

    So its using the same port as utorrent. You should look in utorrent’s settings, and see what port it is using. Then run ushare with -p 4915x
    Replacing x with a different number, then the port utorrent is using.

  53. 53JoshJun 15th, 2007 at 4:22 pm

    hmm, utorrent is using a different port, and now it seems to work fine with utorrent running, my 360 still doesn’t see that i’m running it though, I’m getting close.

  54. 54adminJun 15th, 2007 at 4:24 pm

    Did you re install the patched version? Also make sure you run it with -x.

  55. 55JoshJun 15th, 2007 at 4:34 pm

    yeah I did, here’s what I get now

    josh@josh-ubuntu:~$ ushare -p 49153 -x -c /media/Archives/Videos/
    uShare (version 0.9.10), a lightweight UPnP Media Server.
    Benjamin Zores (C) 2005-2007, for GeeXboX Team.
    See http://ushare.geexbox.org/ for updates.
    Initializing UPnP subsystem …
    Starting in XboX 360 compliant profile …
    UPnP MediaServer listening on 192.168.0.103:49153
    Sending UPnP advertisement for device …
    Listening for control point connections …
    Building Metadata List …
    Looking for files in content directory : /media/Archives/Videos/
    Found 429 files and subdirectories.

    I have my ip set static at 192.168.0.11 yet it says it’s listening on 192.168.0.103, is this the issue?

  56. 56JoshJun 15th, 2007 at 4:39 pm

    I got it all working!!! it was trying to listen on eth0 again, since i reinstalled it I forgot to re edit the config file, all is well now, Thank you very much.

  57. 57TimJun 23rd, 2007 at 11:48 pm

    A big thanks for your postings. I’ve got ushare working great and have been tweaking your convert script. It doesn’t deal well with multiple ‘.’ characters in the filename. Thought you and others might find it useful if you run into those types of filenames….

    #!/bin/bash
    #Grab process id for tmp file name
    pidfile=$$.tmp
    #Path to where you want the converted videos to be
    o=”/home/yourpath/ushare/”
    $(echo $1 >> $pidfile)
    #Breaks up filename based on ‘.’ in name
    numRecs=$(cat $pidfile | awk -F. ‘{print NF}’)
    ((numRecs–))
    #take everything up until the last ‘.’ thus removing extenstion
    f=$(cut -d”.” -f1-$numRecs $pidfile);
    $(rm $pidfile)
    oo=”$o$f.mov”
    zenity –question –text=”Are you sure you want to convert $1 to $oo?”
    a=$?
    if [ $a -eq 0 ]
    then
    $(ffmpeg -y -i “$1″ -vcodec h264 -b 1000000 -acodec aac -ar 48000 -ab 160 -f mov “$oo”)
    $(zenity –info –text=”Done”)
    fi

  58. 58chronniffJun 26th, 2007 at 1:10 pm

    is there any word on when ushare without the patch will work for the 360? I know I am a brat I just like having it from the repositories so I don’t have to worry about paying attention to upgrades

  59. 59adminJun 26th, 2007 at 1:18 pm

    Last I heard was they had no time to work on ushare.

    “will be applied, but i have no time for that (or ushare in particular) right now.”

    http://www.geexbox.org/forum/viewtopic.php?t=8650&highlight=ushare#47879