个人工具

“UbuntuHelp:Xbox360Media”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Xbox360Media}}
 
{{From|https://help.ubuntu.com/community/Xbox360Media}}
 
{{Languages|UbuntuHelp:Xbox360Media}}
 
{{Languages|UbuntuHelp:Xbox360Media}}
== Xbox 360 Media sharing ==
+
== Introduction ==
The Xbox 360 has its own implementation of [http://en.wikipedia.org/wiki/UPNP UPnP], meaning that in theory you can share your media without Windows by using open protocols. The reality is more complex, but we do have solutions in the Free world.
+
The Xbox 360 has its own implementation of [http://en.wikipedia.org/wiki/Upnp UPnP], meaning that in theory you can share your media without Windows by using open protocols. The reality is more complex, but we do have solutions in the Free world.
=== Format compatibility ===
+
== Format compatibility ==
The Xbox 360 is fussy about [http://www.xbox.com/en-US/support/systemuse/xbox360/digitalmedia/intro.htm media formats]. It only supports JPEG images (not GIF or PNG), and you'll likely find that quite a few of your [http://www.xbox.com/en-us/support/systemuse/xbox360/digitalmedia/videoplaybackfaq.htm  videos] refuse to play.
+
The Xbox 360 is fussy about [http://www.xbox.com/en-US/support/systemuse/xbox360/digitalmedia/intro.htm media formats]. It only supports JPEG images (not GIF or PNG), and you will likely find that quite a few of your [http://www.xbox.com/en-us/support/systemuse/xbox360/digitalmedia/videoplaybackfaq.htm  videos] refuse to play.
A workaround is to use transcode, ffmpeg or mencoder to convert your video to a format that the Xbox 360 can interpret, such as Xvid/MP3 in an AVI container.
+
A workaround is to use transcode, ffmpeg or mencoder to convert your video to a format that the Xbox 360 can interpret, such as Xvid/MP••••••••3 in an AVI container.
=== UPnP sharing with uShare ===
+
== UPnP sharing with uShare ==
[http://ushare.geexbox.org/ uShare] allows a Linux PC to share its files with any other device using UPnP. There's a [http://packages.ubuntu.com/search?searchon=names&keywords=ushare package in universe], but its official support for Xbox 360 isn't quite right.
+
[http://ushare.geexbox.org/ uShare] allows a Linux PC to share its files with any other device using UPnP.
Here's one method to get it working right. It's based on [http://ubuntuforums.org/showthread.php?t=848144 this howto], which uses [http://netou.co.uk/?p=28 this patched version of uShare].
+
=== Installation of uShare ===
==== Easy version ====
+
There are several ways of installing uShare.
You can find a copy of the source and a DEB package [http://www.slug.org.au/~yama/packages/ushare/ here]. Note that the DEB was made quickly on Ubuntu 8.04 ('Hardy Heron') using [http://www.howtoforge.com/howto_linux_debian_deb_checkinstall Checkinstall]. It is not digitally signed or configured fully, but it should work fine. If the version from universe is installed, remove it first. If you don't feel comfortable with this, see the 'DIY version' below.
+
==== From the Ubuntu repositories ====
 +
uShare is available from the Ubuntu repositories, so you can simply [[UbuntuHelp:apt:ushare|install it from there]]. After the successful installation of the program, you can proceed at step 2, [[UbuntuHelp:Xbox360Media#Configuration|the configuration]].
 
==== DIY version ====
 
==== DIY version ====
 
First, you need to download, compile and install the patched version of uShare.
 
First, you need to download, compile and install the patched version of uShare.
第58行: 第59行:
 
</li><li>Now you'll have a DEB package created and installed. You can save the DEB for future use.</li></ol>
 
</li><li>Now you'll have a DEB package created and installed. You can save the DEB for future use.</li></ol>
  
----
+
=== Configuration ===
<ol><li>To edit uShare's configuration, open /etc/ushare.conf in your favourite editor and set the following (adjust to your requirements).<pre><nowiki>
+
==== Basic Configuration ====
USHARE_NAME=myserver
+
There is a tool integrated to automatically create a configuration file. To run it, open a terminal and execute
 +
<pre><nowiki>
 +
$ sudo dpkg-reconfigure ushare
 +
</nowiki></pre>
 +
In a first step, enter the of your media server. Then choose the network-interface to be used by uShare. In the third step, you can enter the paths of the directories you want to share with your Xbox 360. If you have more than one directory you want to share, separate them with a ",". The program will then restart the uShare service.
 +
==== Advanced Configuration ====
 +
For advanced configuration of uShare, open and edit '''/etc/ushare.conf''' (root access required). '''In order to enable the Xbox360 support, this step is necessary!'''
 +
Here's an example of how a configuration file can look like:
 +
<pre><nowiki>
 +
USHARE_NAME=Ubuntu_Media_Server
 +
USHARE_IFACE=eth0
 
USHARE_PORT=49200
 
USHARE_PORT=49200
USHARE_TELNET_PORT=49201
+
USHARE_TELNET_PORT=1337
USHARE_DIR=/mnt/hda1,/mnt/hdc1,/mnt/hdd1
+
USHARE_DIR=/media1,/media2,/media3
 +
USHARE_OVERRIDE_ICONV_ERR=
 
USHARE_ENABLE_WEB=yes
 
USHARE_ENABLE_WEB=yes
USHARE_ENABLE_TELNET=yes
+
USHARE_ENABLE_TELNET=no
 
USHARE_ENABLE_XBOX=yes
 
USHARE_ENABLE_XBOX=yes
 +
USHARE_ENABLE_DLNA=no
 
</nowiki></pre>
 
</nowiki></pre>
</li><li>Start the uShare daemon.<pre><nowiki>
+
All the lines are explained in the file on your computer by default.
$ sudo /etc/init.d/ushare start
+
It's important that USHARE_ENABLE_DLNA is set to no, otherwise your Xbox 360 will see the share but won't be able to connect.
</nowiki></pre>
+
=== Usage ===
</li><li>Set uShare to start on boot.<pre><nowiki>
+
To start the program, just run
$ update-rc.d ushare defaults
+
</nowiki></pre></li></ol>
+
 
+
===== Using uShare =====
+
You can access the uShare Web interface at
+
 
<pre><nowiki>
 
<pre><nowiki>
http://ip_address:port/web/ushare.html
+
$ sudo service ushare start
 
</nowiki></pre>
 
</nowiki></pre>
The Xbox 360 should see your server just like any UPnP share.
+
If you want to start it by default after booting, execute
===== Allowing connections through a firewall =====
+
If you're using Ubuntu's UFW, you can easily add a rule to cope with this. Let's say your Xbox 360 uses a static IP address of 192.168.10.3, and your server is 192.168.10.2 with UPnP on port 49200. Use the following command to provide a small hole in your firewall for this:
+
 
<pre><nowiki>
 
<pre><nowiki>
sudo ufw allow proto tcp from 192.168.10.3 to 192.168.10.2 port 49200
+
$ update-rc.d ushare defaults
 
</nowiki></pre>
 
</nowiki></pre>
===== Removing uShare =====
+
on a terminal.
Checkinstall installs uShare into the dpkg repository just like any other package. Uninstallation is easy:
+
==== Webinterface ====
 +
To easily manage the shared folders, there is a web-interface you can use. In order to do that, make sure that ''USHARE_ENABLE_WEB'' is enabled in the configuration file.
 +
You can now enter the web-interface by opening a browser and typing "http://localhost:49200/web/ushare.html" in the address bar. Remember that you have to change the port according to the value you set in the configuration. You are also able to access the web-interface from another computer by simply replacing "localhost" with the computer's IP-address.
 +
==== Telnet ====
 +
If you set ''USHARE_ENABLE_TELNET'' to ''yes'', you will be able to access the uShare-server with a Telnet-client. Remember to set the port for the Telnet-server in ''USHARE_TELNET_PORT''. Once connected, you are able to use the following commands on the server:
 +
{|border="1" cellspacing="0"
 +
| '''Command''' || '''Description'''
 +
|-
 +
| kill || Terminates the uShare server
 +
|-
 +
| exit || Exits the interface
 +
|-
 +
| help || Shows help information
 +
|-
 +
| echod || Echoes all arguments, but with each argument in a new line… DEBUG
 +
|-
 +
| echo || Echoes all arguments
 +
|}
 +
=== Allowing connections through a firewall ===
 +
If you are using Ubuntu's UFW, you can easily add a rule to cope with this. Let's say your Xbox 360 uses a static IP address of 192.168.10.3, and your server is 192.168.10.2 with UPnP on port 49200. Use the following command to provide a small hole in your firewall for this:
 
<pre><nowiki>
 
<pre><nowiki>
$ aptitude remove ushare
+
$ sudo ufw allow proto tcp from 192.168.10.3 to 192.168.10.2 port 49200
 
</nowiki></pre>
 
</nowiki></pre>
==== Other uShare resources ====
+
=== Removing uShare ===
* [http://ubuntuforums.org/showthread.php?t=631213   Ushare & Xbox 360]
+
You can follow [https://help.ubuntu.com/9.10/add-applications/C/removing.html this guide] to remove uShare from your computer.
 +
== External Links ==
 +
* [http://ubuntuforums.org/showthread.php?t=794489   HOWTO: Stream music to your Xbox 360]
 +
* [http://en.wikipedia.org/wiki/UPnP_AV_MediaServers  A list of UPnP media servers]
 
* [http://ubuntuforums.org/showthread.php?t=632428  How to make Ubuntu, uShare and xBox 360 play nice]
 
* [http://ubuntuforums.org/showthread.php?t=632428  How to make Ubuntu, uShare and xBox 360 play nice]
 
* [http://www.liamm.com/tech/how-toxbox-360-media-server-in-linux  How-To:XBOX 360 Media Server in Linux]
 
* [http://www.liamm.com/tech/how-toxbox-360-media-server-in-linux  How-To:XBOX 360 Media Server in Linux]
=== Resources ===
+
* [http://buffalo.nas-central.org/wiki/Ushare_-_UPnP_Media_Server_for_Linux Ushare - UPnP Media Server for Linux]
* [http://ubuntuforums.org/showthread.php?t=794489  HOWTO: Stream music to your Xbox 360]
+
* a list of [http://en.wikipedia.org/wiki/UPnP_AV_MediaServers  UPnP media servers]
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月20日 (四) 01:03的最新版本

Introduction

The Xbox 360 has its own implementation of UPnP, meaning that in theory you can share your media without Windows by using open protocols. The reality is more complex, but we do have solutions in the Free world.

Format compatibility

The Xbox 360 is fussy about media formats. It only supports JPEG images (not GIF or PNG), and you will likely find that quite a few of your videos refuse to play. A workaround is to use transcode, ffmpeg or mencoder to convert your video to a format that the Xbox 360 can interpret, such as Xvid/MP••••••••3 in an AVI container.

UPnP sharing with uShare

uShare allows a Linux PC to share its files with any other device using UPnP.

Installation of uShare

There are several ways of installing uShare.

From the Ubuntu repositories

uShare is available from the Ubuntu repositories, so you can simply install it from there. After the successful installation of the program, you can proceed at step 2, the configuration.

DIY version

First, you need to download, compile and install the patched version of uShare.

  1. Set up a build environment.
    $ sudo aptitude install libupnp-dev build-essential
    
  2. Get the uShare source code from here.
  3. In a terminal, extract the source and then descend into the directory.
    $ tar -jxvf ushare-11a-netou.tar.bz2
    $ cd ushare-1.1a-NeToU
    
  4. Configure and compile the source
    $ ./configure --prefix=/ --bindir=/usr/bin --mandir=/usr/share/man
    $ make
    
  5. Create a package and install.
    $ sudo checkinstall -D make install
    
  6. You'll be presented the following options:
*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values: 

0 -  Maintainer: [ root@ubuntu-desktop ]
1 -  Summary: [ ushare ]
2 -  Name:    [ ushare-1.1a ]
3 -  Version: [ NeToU ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ ushare-1.1a-NeToU ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ ushare-1.1a ]

Enter a number to change any of them or press ENTER to continue: 2
Enter new name: 
>> ushare
  1. Select option 2 and enter the name uShare then press <enter>
  2. You will also need to change the version number follow the same step this time choosing 3 instead. Enter version number "1.1a" then press <enter> twice. It will now create a DEB Package.
  3. Now you'll have a DEB package created and installed. You can save the DEB for future use.

Configuration

Basic Configuration

There is a tool integrated to automatically create a configuration file. To run it, open a terminal and execute

$ sudo dpkg-reconfigure ushare

In a first step, enter the of your media server. Then choose the network-interface to be used by uShare. In the third step, you can enter the paths of the directories you want to share with your Xbox 360. If you have more than one directory you want to share, separate them with a ",". The program will then restart the uShare service.

Advanced Configuration

For advanced configuration of uShare, open and edit /etc/ushare.conf (root access required). In order to enable the Xbox360 support, this step is necessary! Here's an example of how a configuration file can look like:

USHARE_NAME=Ubuntu_Media_Server
USHARE_IFACE=eth0
USHARE_PORT=49200
USHARE_TELNET_PORT=1337
USHARE_DIR=/media1,/media2,/media3
USHARE_OVERRIDE_ICONV_ERR=
USHARE_ENABLE_WEB=yes
USHARE_ENABLE_TELNET=no
USHARE_ENABLE_XBOX=yes
USHARE_ENABLE_DLNA=no

All the lines are explained in the file on your computer by default. It's important that USHARE_ENABLE_DLNA is set to no, otherwise your Xbox 360 will see the share but won't be able to connect.

Usage

To start the program, just run

$ sudo service ushare start

If you want to start it by default after booting, execute

$ update-rc.d ushare defaults

on a terminal.

Webinterface

To easily manage the shared folders, there is a web-interface you can use. In order to do that, make sure that USHARE_ENABLE_WEB is enabled in the configuration file. You can now enter the web-interface by opening a browser and typing "http://localhost:49200/web/ushare.html" in the address bar. Remember that you have to change the port according to the value you set in the configuration. You are also able to access the web-interface from another computer by simply replacing "localhost" with the computer's IP-address.

Telnet

If you set USHARE_ENABLE_TELNET to yes, you will be able to access the uShare-server with a Telnet-client. Remember to set the port for the Telnet-server in USHARE_TELNET_PORT. Once connected, you are able to use the following commands on the server:

Command Description
kill Terminates the uShare server
exit Exits the interface
help Shows help information
echod Echoes all arguments, but with each argument in a new line… DEBUG
echo Echoes all arguments

Allowing connections through a firewall

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

$ sudo ufw allow proto tcp from 192.168.10.3 to 192.168.10.2 port 49200

Removing uShare

You can follow this guide to remove uShare from your computer.

External Links