Rewrite chunk queueing.
[paraslash.git] / INSTALL
diff --git a/INSTALL b/INSTALL
index adb75c5c6e02c0f8528485d3fa3d959762b1e801..83d598eabb5b2ce5b2b14eca8937e5a93b13e7d9 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,18 +1,22 @@
-Paraslash install notes
-=======================
+INSTALL
+=======
 
 
+----
 Any knowledge of how to work with mouse and icons is not required.
 
 Any knowledge of how to work with mouse and icons is not required.
 
+---------------------------
 Install all needed packages
 Install all needed packages
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---------------------------
+
 See README for a list of required software. Don't be afraid of the long
 list of unusal libraries: Most of them are only needed for optional
 programs. Autoconf will detect what is installed on your system and
 will only build those executables that can be built with your setup.
 
 See README for a list of required software. Don't be afraid of the long
 list of unusal libraries: Most of them are only needed for optional
 programs. Autoconf will detect what is installed on your system and
 will only build those executables that can be built with your setup.
 
-
+------------------------
 Install server and client
 Install server and client
-~~~~~~~~~~~~~~~~~~~~~~~~~
+-------------------------
+
 Install the package on all machines, you'd like this software to run on:
 
        (./configure && make) > /dev/null
 Install the package on all machines, you'd like this software to run on:
 
        (./configure && make) > /dev/null
@@ -22,9 +26,10 @@ software). Then, as root,
 
        make install
 
 
        make install
 
-
+-----------------------------------
 Setup user list and create rsa keys
 Setup user list and create rsa keys
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-----------------------------------
+
 If you already have your rsa keys, skip this step. If you are new
 to paraslash, you have to generate an rsa key pair for each user you
 want to allow to connect. You need at least one user.
 If you already have your rsa keys, skip this step. If you are new
 to paraslash, you have to generate an rsa key pair for each user you
 want to allow to connect. You need at least one user.
@@ -37,7 +42,7 @@ following commands:
 
        target=~/.paraslash/server.users
        key=~/.paraslash/key.pub.bar
 
        target=~/.paraslash/server.users
        key=~/.paraslash/key.pub.bar
-       perms=DB_READ,DB_WRITE,AFS_READ,AFS_WRITE
+       perms=AFS_READ,AFS_WRITE,VSS_READ,VSS_WRITE
        mkdir -p ~/.paraslash
        echo "user bar $key $perms" >> $target
 
        mkdir -p ~/.paraslash
        echo "user bar $key $perms" >> $target
 
@@ -63,10 +68,13 @@ server_host=client_host):
 
 Finally, tell para_client to connect to server_host:
 
 
 Finally, tell para_client to connect to server_host:
 
-       echo 'hostname server_host' > ~/.paraslash/client.conf
+       conf=~/.paraslash/client.conf
+       echo 'hostname server_host' > $conf
 
 
+-----------------
 Start para_server
 Start para_server
-~~~~~~~~~~~~~~~~~
+-----------------
+
 For the first try, we'll use the default audio file selector, the
 "random" selector which chooses audio files from the given directory
 by random. You have to tell para_server via the --random_dir command
 For the first try, we'll use the default audio file selector, the
 "random" selector which chooses audio files from the given directory
 by random. You have to tell para_server via the --random_dir command
@@ -83,8 +91,9 @@ example) and try
 
 to retrieve the list of available commands and some server info.
 
 
 to retrieve the list of available commands and some server info.
 
+------------------------
 Start streaming manually
 Start streaming manually
-~~~~~~~~~~~~~~~~~~~~~~~~
+------------------------
 
        para_client play
        para_client stat 2
 
        para_client play
        para_client stat 2
@@ -92,52 +101,58 @@ Start streaming manually
 This starts streaming and dumps some information on the current song
 to stdout.
 
 This starts streaming and dumps some information on the current song
 to stdout.
 
-You should now be able to listen to the stream with any player
-capable of reading from stdin. To check this, try the following
-on client_host:
+You should now be able to receive and listen to the stream. To check
+this, try the following on client_host (assuming alsa and an mp3
+stream):
 
 
-       mp3:
+       para_recv -r 'http -i server_host' > file.mp3
+       # (interrupt after a few seconds)
+       ls -l file.mp3 # should not be empty
+       para_filter -f mp3dec -f wav < file.mp3 > file.wav
+       ls -l file.wav # should be much bigger than file.mp3
+       para_write -w alsa < file.wav
 
 
-       para_recv -r 'http -i server_host' | para_filter -f mp3dec -f wav | para_write -w alsa
+If this works, proceed. Otherwise doublecheck what is logged by
+para_server and use the --loglevel option of para_recv, para_filter
+and para_write to increase verbosity.
+
+Next, put the pieces together:
+
+       para_recv -r 'http -i server_host' \
+               | para_filter -f mp3dec -f wav \
+               | para_write -w alsa
        or
        mpg123 http://server_host:8000/
        or
        xmms http://server_host:8000/
 
        or
        mpg123 http://server_host:8000/
        or
        xmms http://server_host:8000/
 
-       ogg:
-
-       para_recv -r 'http -i server_host' | para_filter -f oggdec -f wav | para_write -w alsa
-
-If this works, proceed. Otherwise doublecheck what is logged by
-para_server and use the --loglevel option of para_recv, para_filter
-to increase verbosity.
-
+-----------------------------
 Choose an audio file selector
 Choose an audio file selector
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-----------------------------
+
 paraslash has three different audio file selectors: random (default),
 playlist and mysql.
 
 paraslash has three different audio file selectors: random (default),
 playlist and mysql.
 
-       The random selector chooses files randomly from the given
-       directory.
-
-       The playlist selector allows to send a playlist to para_server
-       via the lpl (load playlist) command. para_server will choose
-       files from the loaded playlist in sequential order.
-
-       The mysql selector stores information about your audio
-       files in a mysql database. It is much more involved than
-       the other two selectors and lets you chose files in many
-       interesting ways. If you like to use the mysql selector,
-       read README.mysql and follow the instructions given there.
-       Return to this document when ready.
+       - The random selector chooses files randomly from the given
+         directory.
+       - The playlist selector allows to send a playlist to para_server
+         via the lpl (load playlist) command. para_server will choose
+         files from the loaded playlist in sequential order.
+       - The mysql selector stores information about your audio
+         files in a mysql database. It is much more involved than
+         the other two selectors and lets you chose files in many
+         interesting ways. If you like to use the mysql selector,
+         read README.mysql and follow the instructions given there.
+         Return to this document when ready.
 
 The current audio file selector can be changed at runtime via
 
        para_client chs new_selector
 
 
 The current audio file selector can be changed at runtime via
 
        para_client chs new_selector
 
-
+---------------------
 Configure para_audiod
 Configure para_audiod
-~~~~~~~~~~~~~~~~~~~~~
+---------------------
+
 In order to automatically start the right decoder at the right time
 and to offer to the clients some information on the current audio
 stream and on paraslash's internal state, you should run the local
 In order to automatically start the right decoder at the right time
 and to offer to the clients some information on the current audio
 stream and on paraslash's internal state, you should run the local
@@ -147,17 +162,24 @@ the audio stream. Try
        para_audiod -h
 
 for help. Usually you have to specify at least server_host as the
        para_audiod -h
 
 for help. Usually you have to specify at least server_host as the
-receiver specifier, like this:
+receiver specifier for each supported audio format, like this:
 
        -r 'mp3:http -i server_host'
 
 The prefered way to use para_audiod is to run it once at system start
 as an unprivileged user. para_audiod needs to create a "well-known"
 
        -r 'mp3:http -i server_host'
 
 The prefered way to use para_audiod is to run it once at system start
 as an unprivileged user. para_audiod needs to create a "well-known"
-socket for the clients to connect to. If you want to change the
-default socket (e.g. because you do not have write access for the
-directory where the socket resides), use the -s option or the config
-file to change the default. Note that in this case you'll also have
-to specify the same value for para_audioc's -s option.
+socket for the clients to connect to. The default path for this
+socket is
+
+       /var/paraslash/audiod_socket.$HOSTNAME
+
+so the /var/paraslash directory should be owned by the user who
+runs para_audiod.
+
+If you want to change location of the default socket, use the -s
+option for para_audiod or the config file ~/.paraslash/audiod.conf
+to change the default. Note that in this case you'll also have to
+specify the same value for para_audioc's -s option.
 
 If para_server is playing, you should be able to listen to the audio
 stream as soon as para_audiod is started.  Once it is running, try
 
 If para_server is playing, you should be able to listen to the audio
 stream as soon as para_audiod is started.  Once it is running, try
@@ -172,31 +194,26 @@ That should dump some information to stdout. Other commands include
        para_audioc term
        para_audioc cycle
 
        para_audioc term
        para_audioc cycle
 
-
+--------------
 Start para_gui
 Start para_gui
-~~~~~~~~~~~~~~
+--------------
+
 para_gui reads the output of "para_audioc stat" and displays that
 information in a curses window. It also allows you to bind keys to
 arbitrary commands. There are several flavours of key-bindings:
 
 para_gui reads the output of "para_audioc stat" and displays that
 information in a curses window. It also allows you to bind keys to
 arbitrary commands. There are several flavours of key-bindings:
 
-       o internal: These are the built-in commands that can not be
-       changed (help, quit, loglevel, version...).
-
-       o external: Shutdown curses before launching the given command.
-       Useful for starting other ncurses programs from within
-       para_gui, e.g. aumix or para_dbadm. Or, use
-
-               para_client mbox
-
-       to write a mailbox containing one mail for each file
-       in the mysql database and start mutt from within para_gui
-       to browse your collection!
-
-       o display: Launch the command and display its stdout in
-       para_gui's bottom window.
-
-       o para: Like display, but start "para_client <specified
-       command>" instead of "<specified command>".
+       - internal: These are the built-in commands that can not be
+         changed (help, quit, loglevel, version...).
+       - external: Shutdown curses before launching the given command.
+         Useful for starting other ncurses programs from within
+         para_gui, e.g. aumix or para_dbadm. Or, use "para_client
+         mbox" to write a mailbox containing one mail for each file
+         in the mysql database and start mutt from within para_gui
+         to browse your collection!
+       - display: Launch the command and display its stdout in
+         para_gui's bottom window.
+       - para: Like display, but start "para_client <specified
+         command>" instead of "<specified command>".
 
 
 That's all, congratulations. Check out all the other optional gimmics!
 
 
 That's all, congratulations. Check out all the other optional gimmics!