Ushare uPnP media server
From DD-WRT Wiki
English • Deutsch • Español • Français • Italiano • 日本語 • Polski • Português • Русский • Svenska • 中文(中国大陆) • 中文(台灣) • |
Contents |
[edit] Introduction and Overview
uShare is a UPnP (TM) A/V & DLNA Media Server. It implements the server component that provides UPnP media devices with information on available multimedia files. uShare uses the built-in http server of libupnp to stream the files to clients. GeeXboX uShare is able to provide access to both images, videos, music or playlists files (see below for a complete file format support list). It does not act as an UPnP Media Adaptor and thus, can't transcode streams to fit the client requirements.
Great for streaming media to Xbox360 & PS3
[edit] Requirements
- Telnet / SSH
- Optware Package System Setup
- Startup Script for Installed Optware Packages
- USB Support or External Storage support
- "UPnP Service" enable under router web interface
Good Howto on setting up a USB flash drive as the main /jffs/ http://www.dd-wrt.com/phpBB2/viewtopic.php?t=19273
[edit] Install uShare
Make sure optware is setup right and that you have ushare available to you
/opt/bin/ipkg-opt update /opt/bin/ipkg-opt list | grep ushare
returns: ushare - 1.1a-2 - A free UPnP A/V Media Server for Linux.
/opt/bin/ipkg-opt install ushare
[edit] Basic Configuration
vi /opt/etc/ushare.conf
Set this option to which ever folders you want to share that contain movies,music & pictures
USHARE_DIR=/mmc/movies,/mmc/music
There are some errors on the default config file, the following paramaters should be prefixed by USHARE_ Set to no because the web interface doesn't seem to work (at least for me)
Edit by RolF: web interface is working without any problems for me ,if enabled just open http://your.router.ip.here:49200/web/ushare.html
# Enable Web interface (yes/no) # ENABLE_WEB=no USHARE_ENABLE_WEB=no
Set to no to turn off telnet support (haven't tested it to see if it works if you turn it on)
# Enable Telnet control interface (yes/no) # ENABLE_TELNET=no USHARE_ENABLE_TELNET=no
Set to yes to enable Xbox 360 Compatibility Mode
# Use XboX 360 compatibility mode (yes/no) # ENABLE_XBOX=yes USHARE_ENABLE_XBOX=yes
Set to yes to enable DLNA profile for Playstation 3, I have this set to no since i only have an xbox360
# Use DLNA profile (yes/no) # This is needed for PlayStation3 to work (among other devices) # ENABLE_DLNA=yes USHARE_ENABLE_DLNA=yes
Final Product
# /etc/ushare.conf # Configuration file for uShare # uShare UPnP Friendly Name (default is 'uShare'). USHARE_NAME=ddwrt # Interface to listen to (default is eth0). # Ex : USHARE_IFACE=eth1 USHARE_IFACE=br0 # Port to listen to (default is random from IANA Dynamic Ports range) # Ex : USHARE_PORT=49200 USHARE_PORT=49200 # Port to listen for Telnet connections # Ex : USHARE_TELNET_PORT=1337 USHARE_TELNET_PORT= # Directories to be shared (space or CSV list). # Ex: USHARE_DIR=/dir1,/dir2 USHARE_DIR=/mmc/movies,/mmc/music # 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= # Enable Web interface (yes/no) # ENABLE_WEB=no USHARE_ENABLE_WEB=yes # Enable Telnet control interface (yes/no) # ENABLE_TELNET=no USHARE_ENABLE_TELNET=no # Use XboX 360 compatibility mode (yes/no) # ENABLE_XBOX=yes USHARE_ENABLE_XBOX=yes # Use DLNA profile (yes/no) # This is needed for PlayStation3 to work (among other devices) # ENABLE_DLNA=yes USHARE_ENABLE_DLNA=yes
Open uPnP Broadcast port
route add -net 239.0.0.0 netmask 255.0.0.0 br0
[edit] Xbox 360 Startup script modify
If you have modified the config file to have USHARE_ENABLE_XBOX then you do not need to do this part
I had to edit the opt startup script to get my Xbox360 to recognize ushare on the network.
vi /opt/etc/init.d/S99ushare
Change the following line (line number: 30)
$DAEMON -D
Change to
$DAEMON -x -D
[edit] Configure for Playstation 3
Change the following line in /opt/etc/ushare.conf
# Use DLNA profile (yes/no) # This is needed for PlayStation3 to work (among other devices)
- ENABLE_DLNA=yes
USHARE_ENABLE_DLNA=yes
Needs tested and filled in, I don't own one
[edit] Startup Script
If you don't have anything in place like outlined in the optware setup tutorials to auto start optware startup scripts installed in /opt/etc/init.d you can use this script
vi /jffs/etc/config/optware.startup
#OptWare Startup if [ -d /opt/etc/init.d ]; then for f in /opt/etc/init.d/S* ; do [ -x $f ] && $f start done fi
chmod +x /jffs/etc/config/optware.startup
Now test the script
sh /jffs/etc/config/optware.startup
Make sure ushare is running
ps | grep ushare
Should show
1333 root 1076 S /opt/bin/ushare -x -D 1334 root 1076 S /opt/bin/ushare -x -D 1335 root 1076 S /opt/bin/ushare -x -D 1336 root 1076 S /opt/bin/ushare -x -D 1338 root 1076 S /opt/bin/ushare -x -D 1339 root 1076 S /opt/bin/ushare -x -D 1340 root 1076 S /opt/bin/ushare -x -D 1341 root 1076 S /opt/bin/ushare -x -D 1342 root 1076 S /opt/bin/ushare -x -D
THATS IT, YOU'RE DONE AND YOUR STREAMING SERVER IS RUNNING
reboot the router and check to make sure everything started
[edit] Fix Optware Ushare startup script *optional*
edit the optware startup script
vi /opt/etc/init.d/S99ushare
Change the following section
stop() { ................... .................. }
To this
stop() { echo -n "Stopping $DESC... " if [ -n "`pidof ushare`" ] ; then killall -9 ushare fi echo "done" }
This will actual stop ushare
[edit] Setup on Xbox 360 *newest dashboard update*
Log into main dashboard, goto media, choose movies or (pictures, music,etc), X button to "change source", and you should see your server named whatever you set USHARE_NAME=**** in ushare.conf
[edit] Questions / Comments
email undertoe at chemlab dot com