NAME

/etc/jukebox.conf - jukebox configuration file


SYNOPSIS

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


DESCRIPTION

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:

cdr_rdev='0,0,0'

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

cdr_wdev='0,0,0'

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

cdr_opt='burnproof'

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

cdr_size='700'

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

cdr_spd='24'

The CDR write speed

cdrw_spd='10'

The CDRW write speed

cdrd_spd='40'

The CD read speed

cdr_rip='cdparanoia'

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.

wav_enc='bladeenc'

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.

enc_bits='192'

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.

cdr_bak='cdrdao'

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.

cdr_drv='generic-mmc'

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

cdr_sdrv='generic-mmc'

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.

juke_root='/mnt/music'

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.

juke_tmp='/mnt/music/tmp'

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

juke_toc='00*.toc'

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.

juke_fmt='wav,mp3,ogg,flac'

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.

juke_host='jukebox'

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.

juke_addr='0.0.0.0'

The address to which the jukebox server should bind.

juke_port='1221'

The TCP port on which the jukebox server should listen.

juke_user='jukebox'

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.

juke_gap='2'

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.

juke_opts='short'

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.

juke_names='simple'

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


FILES

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


SEE ALSO

  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),
  http://raf.org/jukebox/Jukebox-HOWTO


AUTHOR

raf <raf@raf.org>