README ~~~~~~ jukebox - turns your computer and sound system into a jukebox SHORT DESCRIPTION ~~~~~~~~~~~~~~~~~ Transfer all of your cds onto a Linux computer that is connected to a home sound system and turn it into a jukebox that can be controlled using reasonably good searching facilities from anywhere on the home network. A variety of file formats (e.g. wav, mp3, ogg and flac) and a variety of encoders (e.g. bladeenc, lame, notlame, gogo, oggenc and flac) are supported. There is also support for using as yet unknown file formats and encoders. LONG DESCRIPTION ~~~~~~~~~~~~~~~~ This suite of command line scripts transfers your cds onto computer into wav, mp3, ogg or flac format and creates table of contents files that can contain category/preference information as well as artists and titles. This information can be used to name the track files sensibly and to tag mp3, ogg and flac files. Once that's done (and it can take a long time), the computer (preferably connected to a sound system) becomes a virtual jukebox. By default, this jukebox plays the user's favourite tracks continuously in random order but there are also reasonably good searching facilities to select tracks. If you have a home network, you can run a jukebox network server and control it via a graphical or command line client (this is only really useful if the jukebox computer is connected to a common sound system). Other scripts included write files, directories, iso9660 images or wav files to cdr/cdrw, or backup audio cds onto cdr/cdrw, or backup an mp3/ogg collection onto multiple cdrs. This is a simple jukebox system. Everything is written in bourne shell or perl (except the graphical client which is in java-1.2). Everything is plain text (i.e. configuration, tocfiles, playlists). There is no requirement to run huge applications like database servers or web servers (although hosts running the graphical client need a java-1.2+ runtime engine installed). You might need to download a few things but they're small (except java). OLD DESCRIPTION ~~~~~~~~~~~~~~~ These scripts make it easy to read/write/copy audio/data cdr/cdrw discs, store audio cds as wav/mp3/ogg/flac files and then let you use your computer as a virtual jukebox (with reasonably good searching capabilities). You can also run a jukebox server and control it from across a network. FILES ~~~~~ rip - read an audio cd to wav/mp3/ogg/flac... files and create a tocfile riptrack - read selected tracks from an audio cd into wav files mktoc - create a tocfile template for some wav/mp3/ogg/flac... files toc2names - name wav/mp3/ogg/flac... files based on the contents of a tocfile toc2tags - add tags to mp3/ogg/flac files based on the contents of a tocfile cdr - write files/directories or an iso9660 image to cdr cdrw - write files/directories or an iso9660 image to cdrw burn - write wav files onto an audio cdr burnw - write wav files onto an audio cdrw cdbackup - backup an audio cd onto a cdr mp3backup - backup an mp3/ogg collection onto cdr/dvd discs jukebox - play selected music continuously in random order jukeboxd - jukebox network server jukeboxc - command line jukebox network client jukeboxc.jar - graphical jukebox network client jukeboxd-init.d - jukebox network server init script jukebox.conf - config file for the above programs See each program's --help message for further details. REQUIREMENTS ~~~~~~~~~~~~ The jukebox requires some of the following software. Many are alternatives and many are optional. cdrecord - cdr/cdrw/dvd writing software ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ (comes with redhat) used by cdr, cdrw, burn, burnw, cdbackup, mp3backup mkisofs - create iso9660 file systems for writing to cdr/cdrw (comes with cdrecord) (comes with redhat) used by cdr, cdrw, mp3backup cdda2wav - alternative cd digital audio reader software (comes with cdrecord) (comes with redhat) used by rip, riptrack, cdbackup cdparanoia - better cd digital audio reader software http://www.xiph.org/paranoia/ used by rip, riptrack, cdbackup cdrdao - audio cdr writing software http://www.ping.de/sites/daneb/cdrdao.html used by cdbackup lame - wav to mp3 encoder http://www.mp3dev.org/mp3/ used by rip notlame - wav to mp3 encoder http://www.idiap.ch/~sanders/not_lame/ used by rip gogo - wav to mp3 encoder http://homepage1.nifty.com/herumi/gogo_e.html used by rip bladeenc - wav to mp3 encoder http://bladeenc.mp3.no/ used by rip oggenc - wav to ogg encoder (part of vorbis-tools) http://www.vorbis.com/ (comes with redhat) used by rip flac - wav to flac encoder/decoder http://flac.sourceforge.net/ used by rip, jukebox sox/play - wav player (also used to play flac) http://sox.sourceforge.net/ (comes with redhat) used by jukebox mpg321 - mp3 player http://mpg321.sourceforge.net/ used by jukebox ogg123 - ogg player (part of vorbis-tools) http://www.vorbis.com/ (comes with redhat) used by jukebox CDDB_get - perl module to get the cddb info for an audio cd http://armin.emx.at/cddb/ used by mktoc, rip MP3::Info - perl module to add tags to mp3 files http://sourceforge.net/projects/mp3-info/ used by toc2tags, rip vorbiscomment - add tags to ogg files (part of vorbis-tools) (comes with oggenc) (comes with redhat) use by toc2tags, rip metaflac - add tags to flac files (comes with flac) use by toc2tags, rip daemon - turns other processes into daemons http://libslack.org/daemon/ used by jukeboxd jdk-1.2+ - java software development kit http://java.sun.com/ used to compile jukeboxc.jar jre-1.2+ - java runtime engine http://java.sun.com/ used by jukeboxc.jar INSTALL ~~~~~~~ Ensure that at least perl, cdrecord, bladeenc and mpg321 are working. Ensure that you have a lot of hard disc storage set aside for track files. Type "make install" (as root) to install the software under /opt/jukebox. To install somewhere else, type "PREFIX=/usr/local make install". It needs to be root to create a symbolic link to jukebox.conf in /etc. If you don't have a java compiler, download the precompiled jukeboxc.jar file before trying to install jukebox by typing "make getjar" while connected to the net (with wget installed and working). To install the jukebox network server, type "make install-server" (as root) to install the init scripts that start the server on every boot. This should create init scripts for any Linux distribution. To run the server, a jukebox user must be created and permissions must be set to allow it to use the sound device at any time. See the USER section. To run the server via inetd instead, type "make install-inetd" then tell inetd to reload its configuration. To run the server via xinetd instead, type "make install-xinetd" then tell xinetd to reload its configuration. Run "make help" for more information. Read the Jukebox-HOWTO document for much more information. To read the howto, type "make Jukebox-HOWTO && more Jukebox-HOWTO" while connected to the net (with wget installed and working). To read the license, type "make LICENSE && more LICENSE" while connected to the net (with wget installed and working). Don't forget to make sure that the directory in which the manpages are placed is in your $MANPATH variable (or already known to your man program). USER ~~~~ The jukebox network server will not run as root because it is not necessary. A user should be created to own the server processes. This user is specified in jukebox.conf. By default, it is "jukebox". A new group is needed as well for this user to belong to. The sound device needs to be group writable. If your system uses pam_console (e.g. redhat-7.3), type "make install-perm" (as root). This performs the following (if it looks safe to do so): groupadd audio useradd -d /tmp -M -g audio jukebox perl -pi -e 's/^( +)0600( + +)0600( root)$/${1}0660${2}0660${3}.audio/' /etc/security/console.perms This tells pam_console to make the sound device writable by group "audio". The newly created user that will own the server processes is in this group and so will be able to play music whether someone is logged in or not. It will only modify /etc/security/console.perms if it contains: 0600 0600 root which it will change to: 0660 0660 root.audio On Debian systems, /dev/dsp is writable to group "audio" so all you have to do is create the jukebox user in the audio group. useradd -d /tmp -g audio jukebox If your system does not use pam_console and /dev/dsp isn't already group writable, you probably have to do the following: groupadd audio useradd -d /tmp -g audio jukebox chgrp audio /dev/dsp chmod 660 /dev/dsp COPYING ~~~~~~~ jukebox - turns your computer and sound system into a jukebox Copyright (C) 2002 raf This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit http://www.gnu.org/copyleft/gpl.html HISTORY ~~~~~~~ 0.1 (20021208) - Initial version ------------------------------------------------------------------------------ URL: http://raf.org/jukebox/ Date: 20021208 Author: raf