Difference between revisions of "UShare"

From ArchWiki
Jump to: navigation, search
m
(23 intermediate revisions by 17 users not shown)
Line 1: Line 1:
[[Category: Networking (Enlgish)]][[Category: HOWTOs (English)]]
+
{{Lowercase title}}
=Streaming Media via uShare=
+
[[Category:Networking]]
uShare is a UPnP program developed by [http://ushare.geexbox.org/ GeeXboX] that allows you to stream media from your computer to your Xbox 360 or Playstation 3 along with other media devices.  While there are other UPnP programs out there, such as [http://fuppes.ulrich-voelkel.de/ Fuppes], [http://code.google.com/p/ps3mediaserver/ PS3 MediaServer] and [http://mediatomb.cc/ MediaTomb] (each of which are available via AUR if you so choose), I have found after trying each of the three that uShare is the easiest to setup and works with least amount of editing and configuring.
+
{{Article summary start}}
 +
{{Article summary text|An introduction to the uShare UPnP Media Server developed by GeeXboX.}}
 +
{{Article summary heading|Related}}
 +
{{Article summary wiki|Streaming media}}
 +
{{Article summary end}}
  
 +
{{Note|As [[uShare]] is unmaintained, users may wish to use [[Minidlna|MiniDLNA]], which is actively developed and just as simple to set up, and does not require manually refreshing its database.}}
 +
uShare is a UPnP program developed by [http://ushare.geexbox.org/ GeeXboX] that allows you to stream media from your computer to your Xbox 360 or PlayStation 3 along with other media devices.  While there are other UPnP programs available, such as [http://fuppes.ulrich-voelkel.de/ FUPPES], [http://code.google.com/p/ps3mediaserver/ ps3mediaserver], [[MediaTomb]] and [[Minidlna|MiniDLNA]] (each of which are available in [community] or the [[AUR]] if you so choose), uShare is relatively easy to configure and works well ''out of the box''.
  
After many hours searching for a site that explained how to setup uShare and failing, I decided that I would compile all the information I found through trial and error, along with corrections from fellow users via comments on uShare's AUR page, if for nothing else but to see my name on the ''internet''.
+
==Shortcomings==
 +
Note that uShare is a minimalist server; it keeps all media metadata in memory, and therefore needs to re-scan all your files at start. If you have lots of files (e.g. music), this can take a while. Also, as packaged in Arch now, uShare runs as ushare user (see USHARE_USER in /etc/conf.d/ushare). uShare is currently unmaintained.
  
 
==Installation==
 
==Installation==
To install uShare you have to grab it from [http://aur.archlinux.org/packages.php?ID=3677 AUR] as well as [http://aur.archlinux.org/packages.php?do_Details=1&ID=10200&O=&L=&C=&K=&SB=&SO=&PP=&do_Orphans=&SeB= libupnp] or if you use [http://aur.archlinux.org/packages.php?ID=5863 yaourt] you can simply run:
+
uShare can be [[pacman|installed]] with the {{pkg|ushare}} package, available from the [[official repositories]].
yaourt -Sy ushare
+
  
uShare is in the community repository now.  
+
==Starting uShare==
''sudo pacman -S ushare''
+
To start ushare you can simply run:
 +
# ushare
 +
 
 +
If you would like ushare to run as a daemon on boot you need to add the {{ic|ushare}} [[daemon]] to your {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}. You also need to set USHARE_USER in {{ic|/etc/conf.d/ushare}} to your username.
  
 
==Configuration==
 
==Configuration==
After the installation is complete its time to move on to the configuration of uShare.  This is very simple in the sense that you only have one file to edit, /etc/ushare/ushare.conf:
+
After the installation is complete it is time to move on to the configuration of uShare.  This is very simple in the sense that you only have one file to edit, {{ic|/etc/ushare/ushare.conf}}:
  
 
  # /etc/ushare/ushare.conf
 
  # /etc/ushare/ushare.conf
Line 49: Line 58:
 
   
 
   
 
  # Enable Web interface (yes/no)
 
  # Enable Web interface (yes/no)
  ENABLE_WEB=
+
  USHARE_ENABLE_WEB=
 
   
 
   
 
  # Enable Telnet control interface (yes/no)
 
  # Enable Telnet control interface (yes/no)
  ENABLE_TELNET=
+
  USHARE_ENABLE_TELNET=
 
   
 
   
 
  # Use XboX 360 compatibility mode (yes/no)
 
  # Use XboX 360 compatibility mode (yes/no)
  ENABLE_XBOX=yes
+
  USHARE_ENABLE_XBOX=yes
 
   
 
   
 
  # Use DLNA profile (yes/no)
 
  # Use DLNA profile (yes/no)
 
  # This is needed for PlayStation3 to work (among other devices)
 
  # This is needed for PlayStation3 to work (among other devices)
  ENABLE_DLNA=
+
  USHARE_ENABLE_DLNA=
  
 
*ex: USHARE_NAME=Archlinux
 
*ex: USHARE_NAME=Archlinux
Line 71: Line 80:
  
 
*ex: USHARE_DIR=/media/Share
 
*ex: USHARE_DIR=/media/Share
**I found uShare has problems with more than one directory, so I setup a general Share directory in /media that has both my Music and Video folders but you can try multiple directories if you feel adventurous
+
**I found uShare has problems with more than one directory. Setting this to a directory of symlinks works well for sharing a number of different unrelated directories.
  
 
*USHARE_OVERRIDE_ICONV_ERR=  
 
*USHARE_OVERRIDE_ICONV_ERR=  
Line 78: Line 87:
 
*Web interface and Telnet service I put as no because I like to do everything from a command line but you can set this however you like
 
*Web interface and Telnet service I put as no because I like to do everything from a command line but you can set this however you like
  
*ENABLE_XBOX=yes
+
*USHARE_ENABLE_XBOX=yes
**'''jordz''' said that this line needs to be:
+
USHARE_ENABLE_XBOX=yes
+
I can confirm that this does indeed work so if you are connecting to an Xbox you should modify and enable this option
+
  
*ENABLE_DLNA=
+
*USHARE_ENABLE_DLNA=
 
**Enable this if you are connecting to a Playstation 3 otherwise it is safe to say no here
 
**Enable this if you are connecting to a Playstation 3 otherwise it is safe to say no here
 +
 +
===Firewall===
 +
 +
The tcp/USHARE_PORT and udp/1900 need to be added to your firewall.  It is recommended that you turn your firewall off during the initial setup and turn it back on once ushare is working properly.
  
 
==Troubleshooting==
 
==Troubleshooting==
The only issue I've run into is running uShare as a daemon.  When in daemon mode, I have found that my Xbox complains about invalid video formats.  To fix this I have found that changing the line:
+
The only issue I have run into is running uShare as a daemon.  When in daemon mode, I have found that my Xbox complains about invalid video formats.  To fix this I have found that changing the line:
 
  [ -z "$PID" ] && /usr/bin/ushare -D $PARAMS
 
  [ -z "$PID" ] && /usr/bin/ushare -D $PARAMS
  
Line 95: Line 105:
  
 
works for me, but I cannot confirm that this is a general fix for all computers or that this is an issue to anyone other than myself.
 
works for me, but I cannot confirm that this is a general fix for all computers or that this is an issue to anyone other than myself.
 +
 +
=== xvid/divx ===
 +
If you have problems with xvid/divx files, a possible work around would be to change mime types from avi files from /usr/share/mime/packages/freedesktop.xml from "video/x-msvideo" to "video/x-ms-wmv", update database with `update-mime-database /usr/share/mime/` and restart ushare.
 +
This procedure was taken from [http://salinasv.blogspot.com/2010/06/stream-divxxvid-from-linux-to-your-xbox.html This blog post] and [https://lists.ubuntu.com/archives/ubuntu-us-nm/2007-December/000368.html this mail].

Revision as of 11:47, 13 June 2012

Summary help replacing me
An introduction to the uShare UPnP Media Server developed by GeeXboX.
Related
Streaming media
Note: As uShare is unmaintained, users may wish to use MiniDLNA, which is actively developed and just as simple to set up, and does not require manually refreshing its database.

uShare is a UPnP program developed by GeeXboX that allows you to stream media from your computer to your Xbox 360 or PlayStation 3 along with other media devices. While there are other UPnP programs available, such as FUPPES, ps3mediaserver, MediaTomb and MiniDLNA (each of which are available in [community] or the AUR if you so choose), uShare is relatively easy to configure and works well out of the box.

Shortcomings

Note that uShare is a minimalist server; it keeps all media metadata in memory, and therefore needs to re-scan all your files at start. If you have lots of files (e.g. music), this can take a while. Also, as packaged in Arch now, uShare runs as ushare user (see USHARE_USER in /etc/conf.d/ushare). uShare is currently unmaintained.

Installation

uShare can be installed with the ushare package, available from the official repositories.

Starting uShare

To start ushare you can simply run:

# ushare

If you would like ushare to run as a daemon on boot you need to add the ushare daemon to your DAEMONS array in /etc/rc.conf. You also need to set USHARE_USER in /etc/conf.d/ushare to your username.

Configuration

After the installation is complete it is time to move on to the configuration of uShare. This is very simple in the sense that you only have one file to edit, /etc/ushare/ushare.conf:

# /etc/ushare/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=

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

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

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

# Enable Telnet control interface (yes/no)
USHARE_ENABLE_TELNET=

# Use XboX 360 compatibility mode (yes/no)
USHARE_ENABLE_XBOX=yes

# Use DLNA profile (yes/no)
# This is needed for PlayStation3 to work (among other devices)
USHARE_ENABLE_DLNA=
  • ex: USHARE_NAME=Archlinux
    • Set this to whatever you want, it is the name you will see when selecting the server
  • ex: USHARE_IFACE=eth0
    • Default is eth0 so only change it if yours is something different
  • ex: USHARE_PORT= 49200
    • I set this to 49200 so it was always the same port but you can leave it blank if you want it to randomly set it each time
  • ex: USHARE_DIR=/media/Share
    • I found uShare has problems with more than one directory. Setting this to a directory of symlinks works well for sharing a number of different unrelated directories.
  • USHARE_OVERRIDE_ICONV_ERR=
    • Unless you feel like overriding the default I would leave it blank
  • Web interface and Telnet service I put as no because I like to do everything from a command line but you can set this however you like
  • USHARE_ENABLE_XBOX=yes
  • USHARE_ENABLE_DLNA=
    • Enable this if you are connecting to a Playstation 3 otherwise it is safe to say no here

Firewall

The tcp/USHARE_PORT and udp/1900 need to be added to your firewall. It is recommended that you turn your firewall off during the initial setup and turn it back on once ushare is working properly.

Troubleshooting

The only issue I have run into is running uShare as a daemon. When in daemon mode, I have found that my Xbox complains about invalid video formats. To fix this I have found that changing the line:

[ -z "$PID" ] && /usr/bin/ushare -D $PARAMS

in /etc/rc.d/ushare to:

[ -z "$PID" ] && /usr/bin/ushare -x -D $PARAMS

works for me, but I cannot confirm that this is a general fix for all computers or that this is an issue to anyone other than myself.

xvid/divx

If you have problems with xvid/divx files, a possible work around would be to change mime types from avi files from /usr/share/mime/packages/freedesktop.xml from "video/x-msvideo" to "video/x-ms-wmv", update database with `update-mime-database /usr/share/mime/` and restart ushare. This procedure was taken from This blog post and this mail.