/etc/jukebox.conf - jukebox configuration file


The /etc/jukebox.conf file defines default values for the parameters needed by the jukebox software. This means the following commands:

  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


The jukebox configuration file is /etc/jukebox.conf. It's a bourne shell script fragment that defines all of the parameters used by the scripts in the jukebox suite. Keep it simple. Some of the scripts that read the configuration file are not shell. They're perl scripts with minimal parsing.

The configuration file defines the following variables:


Specify the CDROM/CDR/CDRW device to read from using the SCSI notation needed by cdrecord.


Specify the CDR/CDRW device to write to using the SCSI notation needed by cdrecord.


Specify any write options supported by your CDR/CDRW device.


The size (in MB) of the CDR discs that you use to backup your mp3/ogg collection.


The CDR write speed


The CDRW write speed


The CD read speed


The cdda to wav reader software to use. Only cdda2wav and cdparanoia are supported. But jukebox is extensible. To use an unsupported reader, the complete command line must be specified here. Consider adding support any other reader software. It's only a couple of extra lines in two files.


The encoder software to use. This can encode wav files into any format. The only supported encoders are lame, notlame, gogo, bladeenc, oggenc and flac (i.e. mp3, ogg, flac). But jukebox is extensible. To use an unsupported encoder, all command line options must be specified here and the names of the files to encode will be appended before execution. Consider adding support for other encoders. It's only a couple of extra lines in one file.


The average encoding bitrate for mp3 and ogg encoding. The default, 192, is the lowest bitrate that anyone seems to recommend. A smaller bitrate results in lower sound quality and smaller files. A higher bitrate results in higher sound quality and larger files.


The wav to CDR writer software to be used by cdbackup. Only cdrdao and cdrecord are supported. If cdrecord is specified, rip (i.e. cdparanoia or cdda2wav) is used to read the audio CD and burn (i.e. cdrecord) is used to write the tracks to CDR. If cdrdao is specified, then cdrdao is used for both reading and writing.


The driver to be used by cdrdao. This needs to be set if cdrdao can't determine the driver to use by itself.


The source driver to be used by cdrdao. This needs to be set when reading and writing are happening on different devices and cdrdao can't determine the source driver to use by itself.


A colon separated list of directories containing wav/mp3/ogg/flac... track files and table of contents files. This should represent vast amounts of storage dedicated to audio tracks for the jukebox.


A temporary directory with enough space for an entire cd for cdbackup.


A file glob for table of contents file names (must have exactly one '*'). When ripping CDs this is used to construct tocfile names and jukebox uses it to locate tocfiles under the directories in juke_root. Since this glob controls tocfile name creation and access, it's a good idea to never ever change it.


A comma separated list of valid track file name extensions. There should be a corresponding player command specified in juke_player for each format here.

juke_player='wav=play,mp3=mpg321 -q,ogg=ogg123 -q,flac=flac -sdc % | play -t wav -'

A comma separated list of mappings between sound file formats and the programs that play them. The file name extension for the format appears on the left of an equals sign or colon. The player command appears on the right. If there are no commas and no equals signs or colons, the value is interpreted as an mp3 player command. If the player command contains any single ``%'' characters, they are replaced with the name of the track file to be played. Otherwise, the name of the track file to be played is added to the command as its last argument. If the player contains any ``%%'' strings, they are replaced by single ``%'' characters.


The name or IP address of the host running the jukebox network server. It's good if you can create a DNS alias called ``jukebox'' for the jukebox server. The parameter in this file only affects local jukebox clients, not remote clients.


The address to which the jukebox server should bind.


The TCP port on which the jukebox server should listen.


The user as which to run the jukebox server. This needs to be a user with sufficient privileges to use the sound device but with read only access to the filesystem.


The delay (in seconds) between tracks for the jukebox server. This only applies when tracks are played in random order. When played sequentially, the jukebox server doesn't add any extra gap between tracks but it does add a gap before the first track.

When the jukebox is stopped and then immediately started again (e.g. when a new request to play music arrives), problems can occur. I've seen the following errors:

  mpg321: Can't find a suitable libao driver. (Is device in use?)
  ogg123: Could not load default driver and no driver specified in config file. Exiting.

These errors often mean that the permissions of the sound device are preventing access. In this case they seem to mean that the sound device isn't available yet. Perhaps the last process to use it has not finished dying (from a term signal) yet. A non-zero gap seems to alleviate this problem because it causes the jukebox to pause before the first track.


Specifies whether jukebox and jukeboxc should accept long or short command line options. The standard perl module, Getopt::Long, requires the presence of a ``--'' argument before any arguments that begin with ``+'' because it thinks they are options (unless $POSIXLY_CORRECT is set in the environment). Since it is expected that these two scripts will receive many command line arguments that begin with ``+'', the default is to only handle single letter options via the Getopt::Std module. Note that, with either short or long options, ``--'' must be used whenever there are search terms that begin with ``-'' because these really do look like options.


Specifies the style of names that toc2names should generate. There are two naming styles supported. The ``simple'' style has dashes instead of spaces, no upper case characters, very little punctuation and no 8 bit characters. The ``complex'' style preserves spaces, upper case and accented characters.

  simple example:  01-track-title.mp3
  complex example: 01 Track Titlé.mp3


  /etc/jukebox.conf - System wide configuration file
  ~/.jukeboxrc      - User specific configuration file


  rip(1), riptrack(1), mktoc(1), toc2names(1), toc2tags(1),
  cdr(1), cdrw(1), burn(1), burnw(1), cdbackup(1), mp3backup(1),
  jukebox(1), jukeboxc(1), jukeboxc.jar(1), jukeboxd(8),
  jukeboxd-init.d(8), jukebox.conf(5),


raf <>