Media Center HOWTO
From Xbox-Linux
by Thomas Gierlinger, 9. August 2005
Prequisites
Remote control
The two most common solutions will be to either use the DVD remote control provided by Microsoft or to buy a wireless USB mouse/keyboard combination like the Logitech Cordless Desktop. If you don't already own the DVD remote control I suggest you buy the Logitech Cordless Desktop since the price is basically the same and the wireless USB combination is more flexible. Configuration will be simple, just plug in the usb-receiver and you are done. If you have problems with Xebian look at the Logitech Cordless Desktop section of the Xebian HOWTO.
Storage
The available 10 GB (or 8 GB depending on the hardware revision of your Xbox) is far too little to store music, pictures and movies so you will have to do something in order to get more storage space. Again you have two options here. First option is to upgrade the Xbox harddrive and replace it with a new one. The Xbox IDE-controller supports harddrives of any size; the often-cited 137 GB limit only applies to the original Xbox kernel. You will also have to use a different BIOS for the new drive to be detected. As a result you won't be able to play Xbox games anymore. Follow this link to find out how to do this: TSOP flashing HOWTO If you like to continue playing games and don't want to do TSOP-flashing, this won't be suitable for you.
The other possible solution, which this HOWTO will describe in detail, is to use your Desktop-PC as a server and upgrade the harddrive of the PC. The main advantage is that you won't be limited in the size of the disk and that you will still be able to play your Xbox games. The disadvantage is that you will somehow have to transport the data stored on your Desktop-PC to your Xbox through a network connection. This works fine for pictures and music (jpg & mp3) but gets problematic when you want to watch a movie or access files of great size. There are solutions which will make it possible to resolve this issue. You will learn more about it when reading the rest of this document.
The size of the new harddrive should be selected somewhere between 120 and 250 GB. (as of July 2005) Once you have bought your new harddrive assemble it into your Desktop-PC do the partitioning and mount it somewhere. If you run into problems have a look at the Linux Partition HOWTO (http://www.tldp.org/HOWTO/Partition/).
Connectivity
Once again there are two ways of how to connect the Xbox to your homenetwork. You can either use the classical method and connect the Xbox to the network by simply plugging a patch cable into the 100 MBit network connector located at the back of the Xbox, or by using the USB interface with a USB WLAN-stick. The latter solution is not too expensive and it is worth the trouble since you're getting rid of the cables.
Software
There is a different Media Center solution for the Xbox, but since the programmers use a Microsoft Xbox SDK in order to generate the needed binaries the legality of the project is questionable, especially the origin of the used SDK. We will use Linux in this HOWTO because of the 100% legality and the wider range of possibilities you will have when using a fully functional OS. The used Linux distribution is Xebian 1.1.0 see the Xebian HOWTO.
The Media Center software used will be freevo (http://freevo.sourceforge.net/). Another option would be MythTV, but since freevo is already installed and configured we will use it. There are a bunch of plugins for freevo which will add more functionality, we will investigate this further later on. The software dependencies for freevo include the availability of python, mplayer and xine.
We will also use VLC distributed by the VideoLAN Project (http://www.videolan.org/) as the streaming server for the movies and DVDs located on your Media Server (your Desktop-PC).
DVB-T and DVB-S TV-tuners
The perfect Media Center also includes support for Digital Video Broadcasting, i.e. watching TV. Unfortunately the author of this HOWTO does not have access to USB TV-tuners yet, so this HOWTO will not include this topic. Maybe someone else can contribute to the HOWTO regarding this topic.
At the moment (August 2005) the dvb-support for usb-devices is very limited and primarily available for 2.6 series kernel. Unfortunately the 2.6 kernel has no stable fatx support so it will not run on a dual-boot Xbox. If you are using Cromwell or some other BIOS you can compile and install a 2.6 kernel in order to get dvb-support for usb-devices.
Preparing the Xbox
Digital Audio Output (SPDIF)
If you own a Dolby Digital receiver or something similar this point is a must. Basically you will have to follow the instructions in the ALSA compiling section of the Xebian HOWTO in order to enable SPDIF output. Once the SPDIF output is enabled you might also want to set the default output to it in order to play everything through the SPDIF.
NOTE: I had a hard time with the configuration of ALSA and the intel8x0 module (had the same problems on my Desktop-PC with the nforce2) maybe someone who has more experience can contribute here.
NOTE: Recompiling the ALSA kernel module doesn't appear necessary in Xebian 1.1.4. I got it working by only following the instructions below.
You will have to create the "/etc/asound.conf" configuration file first. Just type:
$ su $ touch /etc/asound.conf $ vi /etc/asound.conf
Now put these lines into the file:
pcm.!default {
type hw
card 0
device 2
}
You could also create a more complex configuration and do some resampling by using the dmix plugin but I suggest to do things the easy way. See the intel8x0 wiki (http://opensrc.org/alsa/index.php?page=intel8x0) and the intel8x0 documentation on alsa-project.org (http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=Nvidia&card=.&chip=nForce&module=intel8x0) for more details if you are interested.
To make MythTV utilise SPDIF, you need to change the output device from "/dev/dsp" to "/dev/adsp":
Go to "Utilities/Setup" > "Setup" > "General". On the "Audio" page, change the audio output device to "/dev/adsp". It's also a good idea to enable AC3/DTS passthrough. This will enable 5.1 channel sound where available, and also offload the audio decoding overhead to your external amplifier (in theory improving playback performance). Please note that AC3/DTS passthrough bypasses the mixer, so everything will be sent to your amp at a set volume (but your amp most likely has a volume control knob).
To make mplayer utilise SPDIF, edit "/etc/mplayer/mplayer.conf"
Find the line which begins with "ao="
Change it to:
ao=oss:/dev/adsp,alsa1x,
This will cause mplayer to utilise /dev/adsp through OSS by default. If it fails for any reason, it will fall back onto ALSA.
Wireless LAN
First of all the Xbox USB-controller only supports USB 1.1, this means you will have a pretty low transfer rate to your USB-devices. Because of this I can't tell if it makes sense to buy a 54g WLAN USB-stick, but since you can use the USB-stick also on other PCs it might be a good idea.
I bought a cheaper 802.11b device, the D-Link DWL-122. It works perfectly using the wlan-ng kernel-module and the configuration utilities provided by the Linux WLAN project (http://www.linux-wlan.org/). Also have a look at the list of supported WLAN devices (http://www.linux-wlan.org/docs/wlan_adapters.html.gz).
I had problems with compiling the latest release of the wlan-ng drivers, so you might want to fetch a aerlier release. The version 0.2.1-pre25 worked. Fetch your release here: Linux-WLAN-ng Download (ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/) Compiling the modules shouldn't be much of a problem:
$ su $ ./configure $ make $ make install
The README file provides detailed information on how to build the modules. If you have problems with the configuration remember to set all options in the corresponding configuration file to the correct values. My stick refused to work for example because the wrong channel number was set under the Ad-hoc settings.
Altough the wireless-tools don't work with the wlan-ng modules, some of the provided utilities are pretty useful. You can install them by using apt-get:
$ apt-get update $ apt-get install wireless-tools
Further information about WLAN and Linux can be found at the WLAN information page provided by HP (http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/).
Network configuration
I know, it's popular these days to buy a router and share the internet connection through NAT and IP-forwarding, but it also raises some security issues. I suggest using a proxy like squid (http://www.squid-cache.org/) instead. In order to make command shell programs use the proxy you will have to set the according environmental variables in your /etc/profile file.
$ su $ vi /etc/profile
Now add the lines:
export http_proxy='http://192.168.0.1:8181' export ftp_proxy='http://192.168.0.1:8181'
or whatever the IP and port of your proxy is.
You will have to use static IP-addresses in order to make the whole client server model work. If you use a WLAN adapter you should deactivate the eth0 device and make the wlan0 device available instead.
$ vi /etc/network/interfaces
Add the following lines:
auto wlan0
iface wlan0 inet static
address 192.168.0.4
netmask 255.255.255.0
gateway 192.168.0.1
auto lo
iface lo inet loopback
#auto eth0
#iface eth0 inet static
# address 192.168.0.3
# netmask 255.255.255.0
# gateway 192.168.0.1
This is only one possible configuration, fetch whatever IP-address you like or just adopt the example. If you don't want to enter the IP-address everytime you have to access the xbox also edit the file /etc/hosts on every machine in the network. This could look something like this:
127.0.0.0 localhost 192.168.0.1 desktop-pc.mydomain.net desktop-pc 192.168.0.4 xbox.mydomain.net xbox
Your network configuration should be ready now.
Configuring the Media Server
This chapter describes how to setup your Desktop-PC to serve as a media server not only for the Xbox but for your whole local network.
Directory structure
The basic idea behind this chapter is to advise you to store your data in some kind of intelligent order. The benefit of the whole afford will be that you'll be able to find everything without the help of database tools, an id3-tag parser and similar tools. This will be especially useful when you don't have access to a jukebox-like media-player which is the case with freevo. There is a "Album" plugin which enables this kind of functionality but it is not a very elegant solution to just copy all files into one single directory. Just do the work once and keep everything tidy, you won't regret it. A good directory structure for a media center could look something like this:
/mountpoint |- movies |-- divx-movies |-- svcd-movies |-- dvd-movies | |- music |-- artists |-- genres |-- compilations | |- pictures |-- family-pics | |- capture |-- new-videos |-- new-music |_
This is only a raw proposal, but I guess you got the idea behind it.
Setting up the network share
Once you have copied all files to the new harddrive and after creating the necessary directory structure you will have to make everything available on the local network. We will use NFS in order to accomplish this task. If you own machines with Microsoft Windows you can also make the share available through smb.
Integration of windows clients: Using Samba
Setting up and configuring samba can be one big pain in the arse believe me. If you run windows on your Desktop-PC (which I don't recommend) things are pretty easy and straight forward as long as everything works out of the box. Just enable "Windows File Sharing" and make the whole drive available. If you have problems check microsoft's so called "knowledge base articles".
On Linux machines you will have to get samba either as a package for your distribution or compile the latest release yourself. Once correctly installed with the necessary startup script installed in /etc/init.d you will only have to edit the config file /etc/samba/smb.conf and startup the smb-daemon.
$ sudo vi /etc/samba/smb.conf
Here is a possible configuration. Replace the bold entries with your values.
[global] workgroup = myworkgroup server string = %h (Samba %v) netbios name = mycomputer printing = cups printcap name = cups printcap cache time = 750 cups options = raw printer admin = @ntadmin, root, administrator username map = /etc/samba/smbusers map to guest = Bad User security = user encrypt passwords = yes passdb backend = smbpasswd domain master = yes local master = yes preferred master = yes os level = 65 guest account = nobody [tmp] comment = Temporary files path = /tmp read only = yes browseable = no guest ok = yes [myNetworkShare] comment = Shared Network Drive path = /pathToMyShare writeable = yes browseable = yes valid users = myusername guest ok = no [printers] comment = Printer share path = /var/tmp printable = yes browseable = no guest ok = yes
This configuration implements a user based authentication. You could also allow access to everyone on the local network but that's pretty insecure, so only do this if you are sure noone unauthorized will have access to your local network.
The value of "valid users" in the "myNetworkShare" section is the user allowed to access the share. Since the used authentication method is based on a local username map-file (/etc/samba/smbusers) you will have to add the corresponding user with the command smbpasswd -a myusername.
NOTE: If your share won't appear on the network try flushing the netbios cache by restarting the nmb daemon. Just type: /etc/init.d/nmb restart
For Linux clients: Using NFS
NFS (Network File System) is a very solid piece of software and the preferred way to make your share available on your network. Basically you will only have to add the mountpoint of the new harddrive to /etc/exports and determine which hosts should have access to the share. (i.e. your Xbox) Have a look at this detailed HOWTO: NFS HOWTO (http://nfs.sourceforge.net/nfs-howto/)
Setting up video streaming
We will be using VLC for video streaming in this HOWTO. You could also use the command line version VLS as soon as you gained enough experience with the whole concept of VideoLAN (http://www.videolan.org/). First of all you will have to fetch VLC as a package or get the source and compile it yourself. If you can't find the package for your distribution try searching for "VideoLAN".
A nice way to make all your videos available on the network will be to create some kind of "Video on Demand" service. VideoLAN is a mighty piece of software and enables you to stream nearly everything you can imagine trough the network, even whole DVDs. You may want to have a look at the VideoLAN documentation before going on, since this is a pretty complex topic. Keep the documentation available as a reference while reading on.
- The VideoLAN Documentation (http://www.videolan.org/doc/)
Here is how we will setup the service:
- Create a playlist including video files
- Enable video-streaming through http
- Initialize the VLC web-interface in order to control VLC remotly using a browser
The playlist is a simple *.m3u file and looks like this: (replace bold items with your settings)
#EXTM3U
#EXTVLCOPT:audio-track=1
#EXTVLCOPT:sout=#transcode{vcodec=mp2v,vb=3072,scale=1}: \
duplicate{dst=std{access=http,mux=ts,url=IPofYourDesktopPC:1234}}
dvdsimple:///mountpoint/movies/DVD1@1
#EXTVLCOPT:audio-track=0
#EXTVLCOPT:sout=#transcode{vcodec=mp2v,vb=3072,scale=1}: \
duplicate{dst=std{access=http,mux=ts,url=IPofYourDesktopPC:1234}}
dvdsimple:///mountpoint/movies/DVD2@1
#EXTVLCOPT:audio-track=0
#EXTVLCOPT:sout=#transcode{vcodec=mp2v,vb=3072,scale=1}: \
duplicate{dst=std{access=http,mux=ts,url=IPofYourDesktopPC:1234}}
dvdsimple:///mountpoint/movies/DVD3@1
NOTE: The backslash "\" indicates a line break. This means you will be writing the two lines seperated by the "\" into one single line.
This will stream a whole dvd-folder saved on your share to your xbox. You will have to add every video to a playlist and either open the playlist through the web-interface or directly on your desktop-PC. There are a bunch of additional settings available for streaming, so if you are unsure on how to generate the *.m3u file just use the "Streaming Wizard" which comes with VLC and save the playlist after creating an entry with the wizard. After saving the file you can investigate it by using any editor. (vim, emacs, kedit or whatever you like)
Now we will use the web-interface to control VLC. Enable the web-interface by selecting "settings" - "add interface" and finally "Web Interface". You can also do this when starting up VLC by typing:
$ vlc -I http
The web-interface will now be available by accessing http://IPofYourDesktop-PC:8080
Unfortunately the web-interface of VLC is only very basic at the time of the writing of this document, maybe someone can create a set of more user-friendly html-pages or write a python plugin for freevo. Nevertheless if the items are located in an already opened playlist the web-interface will deliver the whole playlist and start streaming the file as soon as you click on the link.
Once you have clicked on the link VLC will start streaming the video file. On client side you can either open the stream using VLC or any other media-player capable of displaying the streams codec, for example mplayer or xine. The scope of this document also includes the integration of video streaming into freevo, so this will be our preferred option of opening the stream. More about this later on.
Configuring the Xbox
Mounting remote filesystems at boot time
Here is the easy part of the configuration: (replace the bold formatted text with your settings)
$ su $ mkdir /mnt/myMountpoint $ vi /etc/fstab
# /etc/fstab # Add this line if you want to use samba //mycomputer/myNetworkShare /mnt/myMountpoint smbfs \ rw,username=myusername,password=mypasssword,user,uid=live,gid=live 0 0 # Add this line if you are using nfs myDesktopPCsIPaddress:/pathToMyExport /mnt/myMountpoint nfs rw 0 0
NOTE: The backslash "\" indicates a line break. This means you will be writing the two lines seperated by the "\" into one single line.
NOTE: The settings here have to correspond with the setting you have chosen when configuring the samba server on your Desktop-PC.
Configuring freevo
Finally we get to the core topic of this document. This chapter will describe how to configure freevo and make the Xbox a full grown media center.
Basic configuration
First of all you should use xine as the default player for freevo. I tried out mplayer and xmms. Latter has the best performance of the three players when it comes to playing audio files. Unfortunately the plugin isn't very stable, sometimes the player stops when changing to the next song. mplayer is a good media-player but the performance is very bad on the Xbox, changing from one song to another takes some time. xine is simply the multi-talent of all three media-playerns and delivers the best compromise between performance and functionality. You can play Audio CDs, DVDs, Streams, Videos and Audio files of all kinds without any problems. Don't forget to install the "w32codecs" packages in order to enable the playback of all file-types:
$ apt-get install w32codecs
Now let's have a look at the main configuration file of freevo:
$ sudo vi /etc/freevo/local_conf.py
The following listing only show the variables which are of interest for our configuration, so these are NOT the whole contents of the configuration file.
# /etc/freevo/local_conf.py
# Start in fullscreen
START_FULLSCREEN_X = 1
# Raise performance by caching images
CACHE_IMAGES = 1
# TV is not part of this HOWTO yet feel free to contribute
plugin.remove('tv')
# deactivate mplayer and use xine instead
plugin.remove('video.mplayer')
plugin.activate('video.xine')
plugin.remove('audio.mplayer')
plugin.activate('audio.xine')
# Activate all standard plugins
plugin.activate('idlebar')
plugin.activate('audio.playlist')
plugin.activate('audio.vux')
plugin.activate('df')
plugin.activate('video.imdb_info')
plugin.activate('video.mover')
plugin.activate('video.details')
# cdparanoia won't work because of a conflict with the dvd-rom kernel driver and
# scsi-emulation support in the xbox kernel (you can't compile the dvd-rom driver
# as a module for some reason) use the other version of the plugin (http://freevo.sourceforge.net/addons/) or leave it deactivated
plugin.remove('audio.cdbackup')
# Playlist setting, treat every item as part of a playlist and enable random playlists
DIRECTORY_CREATE_PLAYLIST = [ 'audio', 'image']
DIRECTORY_ADD_RANDOM_PLAYLIST = [ 'audio', 'image']
# Setting up Xine
XINE_VO_DEV = 'xv'
XINE_AO_DEV = 'alsa'
This is only the first part of the configuration, we'll go more into detail when configuring the menus and plugins.
Configuring the menu items
Now we will integrate the network-share we have mounted into the freevo menus. We're still editing /etc/freevo/local_conf.py: (replace the bold formatted text with your settings)
# /etc/freevo/local_conf.py
# Movie menu
VIDEO_ITEMS = [ ('movies on myNetworkShare', '/mnt/myMountpoint/movies') ]
# Audio menu
AUDIO_ITEMS = [ ('music on myNetworkShare', '/mnt/myMountpoint/music') ]
# Pictures menu
IMAGE_ITEMS = [ ('pictures on myNetworkShare', '/mnt/myMountpoint/pictures') ]
Plugin configuration
This is a very interesting point. Since freevo is designed very modular there are a bunch of plugins which are only waiting to be configured and activated. We will use standard plugins like the weather plugin and some goodies like the RSS-newsfeed plugin, the amazon cover-search plugin and others.
In order to get an overview of the available plugins go to the plugin-page of the freevo-wiki (http://freevo.sourceforge.net/cgi-bin/doc/Plugins).
Video Plugins
The IMDB (The Internet Movie Database (http://www.imdb.com/)) plugin will allow you to search for information about your DVD-movies in a web-database. In order to use this feature you will have to activate the corresponding plugin.
# /etc/freevo/local_conf.py
plugin.activate('video.imdb')
# list of regexp to be ignored on a disc label
IMDB_REMOVE_FROM_LABEL = ('season[\._ -][0-9]+', 'disc[\._ -][0-9]+',
'd[\._ -][0-9]+', 'german')
# list of words to ignore when searching based on a filename
IMDB_REMOVE_FROM_SEARCHSTRING = ('the', 'a')
# When searching for a movie title in imdb, should the result be
# autoaccepted if it is only one hit?
# 0 = show menu even if it is only one hit (gives you an opportunity to cancel)
# 1 = autoaccept
IMDB_AUTOACCEPT_SINGLE_HIT = True
To use this plugin, select a movie press 'e' or 'enter' button on the remote and you will see an option to search info about this movie for the selected movie. A active internet conection is required of course.
Audio Plugins
The Detached Audio plugin allows you to use the media center although music is still playing. This means you will be able to look through your music library or watch pictures while music is playing in the background. The track information like title, album and artist will be displayed at the lower right corner of the screen.
# /etc/freevo/local_conf.py
plugin.activate('audio.detach')
You can use the detach feature by pressing the "display" key or "d" on your keyboard.
The Cover Search plugin enables the ability to search for cover-art on amazon. The cover will be saved in the corresponding directory where your music is located and it will be displayed whenever you play your music. In order to make the plugin work access http://www.amazon.com/webservices and register there. Amazon will send you a key by mail which enables you to use the webservices.
Replace YOUR_KEY with the key amazon sent you after registration.
# /etc/freevo/local_conf.py
plugin.activate( 'audio.coversearch', args=('YOUR_KEY',) )
In order to search for a cover you have to press the "Enter" key or "e" on your keyboard. A menu will show in which you have the possibility to do a cover-search on amazon.
Now we will activate the Webradio feature. This is done by creating a special playlist. This playlist could look like this:
<?xml version="1.0" ?>
<freevo>
<container title="Web Radio" type="webradio">
<container title="Charts">
<audio title="Club 977 The Hitz Channel">
<url>http://64.236.34.196:80/stream/1074</url>
<info>
<description>CLUB 977 The Hitz Channel</description>
</info>
</audio>
</container>
<container title="80s Music">
<audio title="Club 977 The 80s Channel">
<url>http://64.236.34.196:80/stream/1040</url>
<info>
<description>CLUB 977 The 80s Channel</description>
</info>
</audio>
</container>
<info>
<description>Radio stations on the net</description>
</info>
</container>
</freevo>
Save this xml-file as webradio.fxd somewhere suitable on your network-drive. Now you have to modify the according line in /etc/freevo/local_conf.py. As usual you have to replace the bold items with your own settings.
# modify this line you added during the menu-item configuration
AUDIO_ITEMS = [ ('music on myNetworkShare', '/mnt/myMountpoint/music'),
('WebRadio', '/mnt/myMountpoint/music/fxd/webradio.fxd') ]
This is only an example. If you plan extensive use of webradio you might want to consider downloading a shoutcast plugin (http://freevo.sourceforge.net/addons/) at the freevo-site.
Picture Plugins
Astronomy Picture Of the Day (APOD)
This plugin will let you download and view the current astronomy picture of the day. The images are saved in the specified directory and can be directly accessed from within the APOD menu. Replace the bold settings with your custom values.
# /etc/freevo/local_conf.py
plugin.activate('image.apod', args=('/mnt/myMountpoint/pictures/apod',))
I had some problems using the network-share with the plugin, so if it won't show up within the images menu-item try using a directory located on your Xbox.
Other useful plugins
If you want you can also use several additional plugins available for the so called idle-bar. This is simply the free space located on the top of the screen.
# /etc/freevo/local_conf.py plugin.activate( 'idlebar' ) # weather plugin # go to http://www.nws.noaa.gov/tg/siteloc.shtml to get your four-letter code plugin.activate( 'idlebar.weather', level=<LEVEL>, args=('<4 letter location code>', ) ) # clock display # %A - Full weekday name. # %a - Abbreviated weekday name. # %B - Full month name # %b - Abbreviated month name # %I - Hour (12-hour clock) as a decimal number [01,12]. # %H - Hour (24-hour clock) as a decimal number [00,23]. # %M - Minute as a decimal number [00,59]. # %m - Month as a decimal number [01,12]. # %b - Name of Month # %d - Day of the month as a decimal number [01,31]. # %p - Locale's equivalent of either AM or PM. # %y - Year without century as a decimal number [00,99]. # %Y - Year with century as a decimal number. plugin.activate( 'idlebar.clock', level=50, args=('%a %H:%M')) # display proc-stats, CPU and RAM usage plugin.activate('idlebar.system.procstats',level=20,args=(Mem,Cpu,Prec))
freevo web-interface and web-remote
First of all we have to activate the built-in webserver of freevo (i.e. the web-interface) and the network based remote-control server. Latter is necessary to make the web-remote work.
# /etc/freevo/local_conf.py
plugin.activate('www')
# port for the webserver to listen
# we use 8080 to avoid conflicts with the apache
WWW_PORT = 8080
# username and password to connect to the internal webserver
WWW_USERS = { "user1" : "password",
"user2" : "password" }
The integrated web-interface will allow you to browse the contents of your music-, video- and image-libraries and it enables you to schedule tv-recordings through the integrated recordserver. You can access the web-interface by entering http://IPofYourXbox:5580 in the address line of your preferred browser, Additionaly you can enable a network-based remote-control system which will allow you to control freevo from your browser.
# /etc/freevo/local_conf.py ENABLE_NETWORK_REMOTE = 1 REMOTE_CONTROL_HOST = '127.0.0.1' REMOTE_CONTROL_PORT = 16310
Now fetch the web-remote here: feemote download at freevo.sourceforge.net (http://freevo.sourceforge.net/addons/index.php?action=downloadfile&filename=freemote-0.3.tar.gz&directory=Plugins&PHPSESSID=53ad9cf522fa1a283894fce40aa40ddc&PHPSESSID=53ad9cf522fa1a283894fce40aa40ddc)
We still have to install an apache webserver with php support in order to get the web-remote working.
$ su $ apt-get install apache2 $ apt-get install php4 $ apt-get install libapache2-mod-php4
Before you continue: Please check the Apache 2.0 documentation (http://httpd.apache.org/docs/2.0/) and adjust the config-file for your needs. Now copy the contents of the freemote-archive to your htdocs directory. (usually /var/www, but you can change this) You will have to edit control.php and adjust the host and port settings before freemote will work.
# foo/htdocs/freemote/control.php // Set Hostname or IP Address of your Freevo server $freevoaddress = "localhost"; //$freevoaddress = "10.0.0.106"; // Set UDP Port Number that your Freevo server is configured to use $freevoport = 16310;
NOTE: Freemote can run on any webserver in your network, so if you already have a configured webserver on your Desktop-PC consider installing freemote there. You will only have to adjust the "host"-setting in local_conf.py and control.php
You can now access the web-remote through http://IPofYourXbox/freemote/freemote.htm once freevo is running. Now you are able to control freevo through your web-browser. There is also support for macros, check the included README.
Integration of video-streaming
Once your video on-demand service is running by using vlc as decribed above the only thing left to do is accessing the video stream through freevo. In order to achieve this we will use the *.fxd file format as we already did for the webradio configuration.
NOTE: Since this is still very basic at the moment (August 2005) there is no way to control vlc or vls through freevo, so you will have to start the video stream manually before you can access it or use the basic vlc web-interface. Maybe someone will write a freevo-plugin which enables control of VideoLAN through freevo.
<?xml version="1.0" ?>
<freevo>
<movie title="Video Streaming">
<video>
<url id="p1">
http://IPofYourDesktopPC:1234
<playlist/>
</url>
</video>
<info>
<description>udp video-streaming using vlc or vls</description>
</info>
</movie>
</freevo>
Save the file somewhere suitable on your network-drive as videostreaming.fxd. Now we will add this as a menu-item. Customize the bold formatted variables with your settings.
# /etc/freevo/local_conf.py
# modify this line you added during the menu-item configuration
VIDEO_ITEMS = [ ('movies on myNetworkShare', '/mnt/myMountpoint/movies'),
('Video Streams', '/mnt/myMountpoint/movies/fxd/videostreaming.fxd') ]
To watch a movie via network-streaming you will have to open the playlist on your desktop-computer using vlc and start playback there. Once playback is started go to "Watch a movie" and select "Video Streams".
The *.fxd file is only a basic version, you could add any video-stream you like. (if xine or mplayer support the codec) See the freevo fxd file documentation (http://freevo.sourceforge.net/cgi-bin/doc/FXDFiles) for details.
Starting freevo together with the window-manager
Add the following lines to your .xinitrc
# /home/live/fluxstartup.sh /usr/bin/freevo &
NOTE: Depending on the configuration you use, it is possible that you have to add the launch command for freevo to "~/.xinitrc" instead of the "fluxstartup.sh" script. If so, the line has to be changed to: "exec /usr/bin/freevo &"
Power Management Settings
Disable the DPMS screensaver
This will disable the screensaver, just in case you want the title information and album cover displayed on you TV-set all the time. Add this line to your ".xinitrc" instead of "fluxstartup.sh" if you will not login as the user "live".
# /home/live/fluxstartup.sh xset -display :0.0 -dpms s off &
Concluding notes
Currently there are two missing aspects which would make the Xbox the perfect media-center:
- Extensive support for usb-dvb-devices and usb-tv-tuners
- Complete freevo-integration of VideoLAN through a plugin
The first aspect should be fixed as soon as a 2.6 series kernel is available for dual-boot Xboxes. People with a modchip or Cromwell do not have this problem and can already enjoy dvb-support. The latter aspect will require some work on both sides. It seems like the VideoLAN remote-control-interface is not pretty practical yet for setting up video on-demand services. It will be necessary to improve this feature and create a user-friendly gui by writing a freevo-plugin.
If you are interested to do so have a look at: http://freevo.sourceforge.net/cgi-bin/doc/DevelopPlugins
References
- Xebian HOWTO
- Multimedia Player HOWTO
- Freevo project-page (http://freevo.sourceforge.net/)
- Freevo wiki (http://freevo.sourceforge.net/cgi-bin/doc/Index)
- WLAN Howto (http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/)
- Official Samba Howto (http://www.samba.org/samba/docs/man/Samba3-HOWTO/)
- NFS Howto (http://nfs.sourceforge.net/nfs-howto/)
- VideoLAN documentation (http://www.videolan.org/doc/)
- Apache 2.0 documentation (http://httpd.apache.org/docs/2.0/)

