Difference between revisions of "Ccxstream - Xbox Media Stream Protocol"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m (New page: {{Articles|Mediaserver}} ===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...)
 
(ARM9 - Precompiled Binary)
 
(5 intermediate revisions by one user not shown)
Line 3: Line 3:
  
 
===The XBMS 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.<ref>[http://sourceforge.net/project/shownotes.php?release_id=191190&group_id=87054  ccXStream 1.0.15 for Linux]</ref>  Once you install ccXStream on your LinkStation all you have to do is configure your XMBC to use the media share.<ref>[http://www.xboxmediacenter.com/wiki/index.php?title=Windows_ccx_gui_%28xbms%29#How_to_Configure_XBMS_on_XBMC Xbox Media Center Online Manual:How to Configure XBMS on XBMC]</ref>
+
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.<ref>[http://sourceforge.net/project/shownotes.php?release_id=191190&group_id=87054  ccXStream 1.0.15 for Linux]</ref>  Once you install ccXStream on your LinkStation all you have to do is configure your [[XBMC - Using Xbox Media Center with the LinkStation|XMBC]] to use the media share.<ref>[http://www.xboxmediacenter.com/wiki/index.php?title=Windows_ccx_gui_%28xbms%29#How_to_Configure_XBMS_on_XBMC Xbox Media Center Online Manual:How to Configure XBMS on XBMC]</ref>
====Ccxstream - compile from source====
+
 
 +
===Installing ccxstream===
 +
====Compile from source====
 
# Install the [[Precompiled C development environment, running on the LS]]
 
# Install the [[Precompiled C development environment, running on the LS]]
 
# Get the source tarball and compile
 
# Get the source tarball and compile
Line 22: Line 24:
 
  cp  xbmsp.txt /usr/doc/ccxstream/
 
  cp  xbmsp.txt /usr/doc/ccxstream/
  
====README file====
+
====PPC - IPKG====
 +
 
 +
*Install [[Ipkg on the Linkstation (for end-users)]] and enable the NSLU2 Feed: [[Ipkg Package List: PowerPC]]
 +
*Install ccxstream
 +
ipkg 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<br>
 +
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'''
 
'''COMMAND LINE OPTIONS'''
  
Line 75: Line 146:
 
<tt>-S video=/u/videos</tt> that would not work with a symlink.
 
<tt>-S video=/u/videos</tt> that would not work with a symlink.
  
 +
===Scripts===
 
====Create a startscript====
 
====Create a startscript====
 
'''''/etc/init.d/ccxstream'''''
 
'''''/etc/init.d/ccxstream'''''

Latest revision as of 10:28, 22 October 2007


Contents

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

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

-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.

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.

Scripts

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


Cite error: <ref> tags exist, but no <references/> tag was found