Ccxstream - Xbox Media Stream Protocol

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 13:20, 30 August 2007 by Ramuk (Talk | contribs)

Jump to: navigation, search

The XBMS Protocol

XBMSP (XBox Media Stream Protocol) or XBMS for short is another way of sharing media, supposedy it is faster than Samba. It is capable of streaming all types of media and gives the option of sharing individual folders or entire drives. XBMS is very bandwith efficient and it is a routable network-protocol which means that it is also ideal if you wish to stream over the internet, (just make sure you open the TCP/IP network-port 1400 in your firewalls on both both the server-side and the client side). For linux XBMSP support is provided by ccXStream.[1] Once you install ccXStream on your LinkStation all you have to do is configure your XMBC to use the media share.[2]

Installing ccxstream

Compile from source

  1. Install the Precompiled C development environment, running on the LS
  2. Get the source tarball and compile
tar -xvzf ccxstream-1.0.15.tar.gz
cd ccxstream-1.0.15
cp ccxstream /usr/local/bin
mkdir /usr/doc/ccxstream
cp  COPYRIGHT /usr/doc/ccxstream/
cp  ChangeLog /usr/doc/ccxstream/
cp  PORTING /usr/doc/ccxstream/
cp  README /usr/doc/ccxstream/
cp  TODO /usr/doc/ccxstream/
cp  xbmsp-xml.txt /usr/doc/ccxstream/
cp  xbmsp.txt /usr/doc/ccxstream/


ARM9 - Precompiled Binary



-l address Listen only given local address. Only one -l flag can be given. By default all local interface addresses are listened.
-p port Listen given port (default is 1400).
-r directory Use diven document root (default is current dir). If -S flags are present, it's often the best choice to use an empty directory as a document root. With option -r -user can create a virtual root directory into which the directories can be added with -S flag.
-u user Run as given user. Give up the user privileges and run with as given user instead. You need to have root privileges in order to use this flag.
-P password Require password authentication from the client. Only clients supplying the given password can use the server. The client can also pass an user name in the authentication

step, but it's ignored.

-L Follow symbolic links in the data directories. Normally symbolic links are not followed because of security reasons. This option overrides the default and more secure option.
-f Fork process to background.
-F pidfile Save pid number to given file. This is especially usable if the server is running in the daemon mode (-f).
-S mountpoint=dir Show dir in the root of the fileserver as mountpoint. Multiple -S flags can be present.


ccxstream -f -F /var/run/ -P s3cre7 -r /u/documents -S video=/u/videos -S audio=/u/mp3 

Run server in background and show directory /u/documents as a root directory of the server. In addition show directory /u/videos in as directory video and directory /u/mp3 as directory audio in the document root. All clients need to authenticate with password "s3cre7"


For security reasons symbolic links are not followed. Document root can however be a symbolic link. If you want to use symbolic link to point to a shared directory (-S flag) you can circumvent the symbolic link by adding /. to the end of the path. If for example /u/videos is actually a symbolic link pointing to a real video directory, you can use flag -S video=/u/videos/. instead of plain -S video=/u/videos that would not work with a symlink.

Create a startscript


 # Start/stop the ccxstream daemon.
 # Set SHAREDIR to directory you want to share
 # Set OPTIONS to other command line options you want
 OPTIONS="-f -F /var/run/"
 test -f /usr/local/bin/ccxstream || exit 0
 case "$1" in
 start) echo -n "Start services: ccxstream"
 	/usr/local/bin/ccxstream -r $SHAREDIR  $OPTIONS
 stop)	echo -n "Stop services: ccxstream"
 	killall ccxstream
 	$0 stop
 	sleep 2
 	$0 start
 *)    echo "Usage: $0 start|stop|restart"
       exit 1 
 exit 0

Ccxstream daemon

Change the script you just created into a executable file

chmod a+x /etc/init.d/ccxstream

Add to startup and shutdown if you want it to start on system startup

cd /etc/rc.d/rc2.d
ln -s ../init.d/ccxstream S75ccxstream
cd ../rc0.d
ln -s ../init.d/ccxstream K02ccxstream
cd ../rc6.d
ln -s ../init.d/ccxstream K02ccxstream

Start the ccxstream daemon

  1. ccXStream 1.0.15 for Linux
  2. Xbox Media Center Online Manual:How to Configure XBMS on XBMC