Ccxstream - Xbox Media Stream Protocol

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. Once you install ccXStream on your LinkStation all you have to do is configure your XMBC to use the media share.

Compile from source

 * 1) Install the Precompiled C development environment, running on the LS
 * 2) Get the source tarball and compile

wget http://osdn.dl.sourceforge.net/sourceforge/xbplayer/ccxstream-1.0.15.tar.gz tar -xvzf ccxstream-1.0.15.tar.gz cd ccxstream-1.0.15 make 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/

PPC - IPKG
ipkg install ccxstream
 * Install Ipkg on the Linkstation (for end-users) and enable the NSLU2 Feed: Ipkg Package List: PowerPC
 * Install ccxstream

ARM9 - Precompiled Binary
Download: http://downloads.nas-central.org/Users/kaiten/ccxstream-1.0.15_arm9.tgz

Copy it to somewhere on your Live.

Extract: tar -C / -xzvf ccxstream-1.0.15_arm9.tgz

Edit /etc/init.d/ccxstream.sh

Change the SHAREDIR var to point to your media share.

#!/bin/sh # Start/stop the ccxstream daemon. # # Set SHAREDIR to directory you want to share # Set OPTIONS to other command line options you want SHAREDIR=/mnt/disk1/Music OPTIONS="-f -F /var/run/ccxstream.pid" 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 ;; restart)     $0 stop     sleep 2     $0 start      ;;  *)   echo "Usage: $0 start|stop|restart" exit 1 ;; esac exit 0

Save and execute

/etc/init.d/ccxstream.sh start

If your system complains about termcap & readline, they are posted below.

Package Contents: ccxstream-1.0.15_arm9.tgz

./usr/local/bin/ccxstream ./etc/init.d/ccxstream.sh

Only install these if you recieve complaints from your system.

http://downloads.nas-central.org/Users/kaiten/termcap-1.3.1_arm9.tgz http://downloads.nas-central.org/Users/kaiten/libreadline-5.2_arm9.tgz

Code: tar -C / -xzvf termcap-1.3.1_arm9.tgz tar -C / -xzvf libreadline-5.2_arm9.tgz ldconfig -v

README file
COMMAND LINE OPTIONS

EXAMPLE

ccxstream -f -F /var/run/ccxstream.pid -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"

CAUTION

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
/etc/init.d/ccxstream #!/bin/sh # Start/stop the ccxstream daemon. # # Set SHAREDIR to directory you want to share # Set OPTIONS to other command line options you want SHAREDIR=/mnt/disk1/Music OPTIONS="-f -F /var/run/ccxstream.pid" 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 ;; restart)  	$0 stop  	sleep 2  	$0 start        ;;  *)    echo "Usage: $0 start|stop|restart" exit 1 ;; esac 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 /etc/init.d/ccxstream