

				mp3c Reference
				--------------

				  for V0.29


			(C) 2006 Bill Maas (Pro Forma)







Contents:

1. General info
2. Usage info
   2.1 Batch mode
   2.2 Interactive Mode
3. Configuration info
   3.1 Options Menu
   3.2 Config file
4. Commandline args for external programs

Appendix A  Config file
Appendix B  Sources





                   MP3c - an automated audio-cd -> mp3 converter



1. General info

Program:			frontend for MP3 rippers/encoders
				Ncurses-based TUI (Interactive Mode)
Language:			C
Maintainer:			Matthias Hensler <wsp@gmx.de>
				http://www.wspse.de
Get:				http://www.wspse.de/WSPse/Linux-MP3c.php3
				ftp://ftp.wspse.de/pub/linux/wspse
Packages:			rpm, tarball
Documentation:			README (txt), manpage
CVS Repository			:pserver:cvs@wspse.de:/public
				repository: mp3c
				password:   anonymous

Compile-time config:		--enable-oggdefaults      [encode OGG files]
				--prefix=<prefix>      [default: /usr/local]
Installed files:		${prefix}/bin/mp3c
				${prefix}/man/man1/mp3c.1.gz
Config files:			~/.mp3crc   [initially generated by program]
				/usr/etc/mp3crc

Requires:			cd ripper           (cdparanoia, cdda2wav,..)
				mp3-encoder             (bladeenc, oggenc,..)
				Optional:
				program to set up MP3-ID tags       (mp3info)
				access to a CDDB-server



2. Usage info


2.1 Batch mode

Commandline:	mp3c  [-i <configfile>] [-b <batchfile> [-t <tmpfile/dir>]]
		[-d <cdrom-device>] [-v] [-n]

Commandline Options (batch mode):

[none]				run interactivly
-i|-initfile <file>		alternative configfile
-b|-batchfile <file>		run in batchmode; create shellscript and exit
-t|-tempfile  <file/dir> 	different [directory for] tempfiles (ripped-
				files; only with -b option)
-d|-device <cdrom-device>	CDROM device to use i.o. default
-n|-news			show which things have been changed in a newer
				version of MP3c
-v|-version			show version, program and other informations
				and exit
-h|-help			display help message (in fact, any arg other
				than listed above will accomplish this :)



2.2 Interactive Mode

Screen is divided into TOC of cd (upper part) and status information (lower
part). Selected tracks are highlighted yellow; all tracks are selected by
default. Deselected tracks are displayed white.


2.2.1 Function Keys

F1				online help (also: h)
F2				options menu
F3				encode all selected tracks
F4				encode current track
F5				create batch-script (shell script)
F6				rip all tracks without encoding
F7				rip current track without encoding
F8				delete all selected tracks
F9				delete current track
F12				quit program


2.2.2 Track Selection

Up Arrow, Down Arrow		scroll
PgUp, PgDn			fast scroll
Pos1, End			jump to first/last
Space, Del			select/deselect
*				reverse selection
TAB				select left/right window


2.2.3 Other Control Keys

Letters are case-insensitive unless shown explicitly in uppercase


h				online help
q				close submenu / quit program


Track ops:
v				initialise volume (after inserting new CD)
s				swap artist and title on current track
a				input artist name for current track
t				input title for current track
b				input album name for current track
y				input year for current track
b				input comment for current track
g				input genre for current track
ALT+<key>			perform operation on all selected tracks, e.g.
ALT+s				swap artist and title on all selected tracks
ALT+Shift+<key>			force operation on all selected tracks, even if
				it doesn't make much sense (as with title)
Enter				open Alter menu for current track


CDDB ops:
F				contact CDDB server (e.g. for reloading track
				info after making a mess with keys above :)
l				lock/unlock remote CDDB access
m				save data of current CD in local CDDB
M				transmit data to remote CDDB			


Rip/encode ops:
d				remove dead track entries (displayed in right
				window but temp file no longer exists; with
				delayed encoding)
o				toggle on-the-fly flag


Tracklist ops:
w				export current track to tracklist file
W				export all selected tracks to tracklist file
r				import all tracks from tracklist file



3. Configuration info


3.1 Options Menu

Next the list of configurable options from the Options Menu for V0.29, together
with entry names and example values (not necessarily the Factory Defaults!) in
the configuration file generated from the Options Menu. The descriptions in the
actual Options Menu are a little more verbose than these here.


Option				Config file

cdrom-device			cd_dev = "/dev/cdrom"
cddb-server			cddb_serv = "freedb.freedb.org:8880"
cddb-mailaddress		cddb_email = "freedb-submit@freedb.org"
smtp-server			smtp_serv = "localhost:smtp"
my-mailaddress			my_email = "me@mydomain"
cddb-directory			cddb_loc = "~/.cddb"
remote-cddb-access		rem_cddb = 0
mp3-directory			mp3_dir = "./"
pattern				mp3_pattern = "%7-%8.ogg"
pattern-mode			mp3_pattern_mix = "%3/%1-%2.ogg"
space-replace-character		space_rep_char = "_"
case-change			case_chg = 0
to-upper-mode			pat_upc = 1
illegal characters		ill_chars = "~[]()!*?""
what to do with ill chars	rem_ill_char = 1
protect pattern masks		pattern_protect = 1
slash replace character		slash_rep_char = "-"
handling of allowed characters	eased_char_hand = 0
m3u-playlist-pattern		m3u_pattern = "%1-%3.m3u"
m3u-dest-dir			m3u_dir = "0"
creation mode of m3u		m3u_patmix = "%3.m3u"
how to create m3u-entries	m3u_rel_name_type = 2
auto-save-flag			auto_save = 0
encode on-fly default		def_on_fly = 0
rip all tracks before encoding	rip_enc_ord = 0
fancy-colour			fancy_color = 0
cdripper program		rip_nf_prg = "cdparanoia -d "%1" %2 "%3""
				rip_of_prg = "cdda2wav -D "%1" -t %2 -O wav \
					      -paranoia -"
encoder program			enc_nf_prg = "bladeenc "%1" "%2""
				enc_of_prg = "oggenc -b 192 -l "%3" -d "%5" \
					      -c "%6" -N "%a" -a "%c" -t "%d" \
					      -o "%2" -"
program for setting mp3 tags	mp3_info_prg = "0"
mp3-comment			mp3_comment = "gen by WSPse-MP3c %8 [%b/%c]"
string for unknown genre	unknown_genre = "Unknown"
open tray			open_tray = 1
size of FIFO-buffer		of_fifo = 512
temp-file			tmp_file = "/tmp/WSPse-MP3Creat.wav"
del tmp-files on exit		del_tmp_on_exit = 1
exportfile			def_exp_file = "./.mp3c-exported"
clear delflag			clear_del_on_exp = 1
parallel sessions		para_sessions_allowed = 1
requester			use_dir_request = 1

For a brief explanation of these options see the well-commented configuration
file.

General switches in the Options Menu:

Load defaults
Load Presets (OGG/oggenc)
Load Presets (MP3/lame)
Load Config
Save Config
Exit Optionmenu

Not configurable from the Options Menu:

mp3c_version = "0.29"
frame_mult = 214
cddb_genre_list = "blues,classical,country,data,folk,jazz,misc,newage,reggae,
rock,soundtrack"


3.2 Config file

See Appendix A for an example ~/mp3crc configuration file



4. Commandline args for external programs

Shown here as found on Matthias Hensler's web page:
	http://www.wspse.de/WSPse/Linux-MP3c.php3
(in fact, just copied).

* LAME
Option 	Value
CDripper Non-fly (like usual)	cdparanoia -d "%1" %2 "%3"
CDripper On-fly			cdparanoia -p -d "%1" %2 -
MP3encoder Non-fly		lame --preset standard --tt "%d" --ta "%c" \
				     --tl "%3" --ty "%5" --tc "%6" --tn "%a" \
				     --tg "%4" "%1" "%2"
MP3encoder On-fly		lame --preset standard --tt "%d" --ta "%c" \
				     --tl "%3" --ty "%5" --tc "%6" --tn "%a" \
				     --tg "%4" - "%1"
Tagprogram 			0
FIFO (wow LAME is really fast) 	4096 - 8192

* Ogg Vorbis
Option 	Value
Encoder Non-fly 		oggenc -b 192 -l "%3" -d "%5" -c "comment=%6" \
				       -N "%a" -a "%c" -t "%d" -o "%2" "%1"
Tagprogram 			0

* BladeEnc
Option 	Value
CDripper Non-fly (like usual) 	cdparanoia -d "%1" %2 "%3"
CDripper On-fly (like usual) 	cdparanoia -d "%1" %2 -
MP3encoder Non-fly 		bladeenc "%1" "%2"
MP3encoder On-fly 		bladeenc STDIN "%1"

* XingMP3enc
Option 	Value
CDripper Non-fly (like usual) 	cdparanoia -d "%1" %2 "%3"
MP3encoder Non-fly 		xingmp3enc "%1" "%2" -V85 -O1 -C0
On-fly				currently XingMP3enc cannot encode from stdin

* cdda2wav
Option 	Value
CDripper Non-fly 		cdda2wav -D "%1" -t %2 -P 0 -O wav %3
CDripper On-fly 		cdda2wav -D "%1" -t %2 -P 0 -O wav -

* MP3tag
Option 	Value
MP3-Info 			mp3tag -a "%1" -s "%2" -l "%3" -g %4 -y "%5" \
				       -e "%6" -f "%7"

	----------------------------------------------------------------



Appendix A - Configuration file

Next is a dump of ~/.mp3crc. Most entries have a counterpart in the Options
Menu started from Interactive Mode. The file contains a lot of useful comments.

~/.mp3crc

# WSPse's MP3-Creator (Configfile)
# automaticly created, but you may edit this file manually.
# [13.01.2006 19:03] - program version: 0.29
# {mp3c-0.29 (NLS) - ENGLISH (Apr 25 2004) Default:OGG}

# version number (to detect updates and inform about news)
mp3c_version = "0.29"

# cdrom-device
cd_dev = "/dev/cdrom"

# CDDB-server [host:port] (more servers maybe seperated by commas)
# use "0" to disable server-access
# note: cddb.cddb.com:8880 is not longer usable
cddb_serv = "freedb.freedb.org:8880"

# local CDDB database
cddb_loc = "~/.cddb"

# if remote CDDB access is allowed
rem_cddb = 0

# mailaddress to which CDDB should be sent (more addresses maybe seperated
# by commas)
cddb_email = "freedb-submit@freedb.org"

# relaying smtp-server who handle my emails [host:port]
smtp_serv = "localhost:smtp"

# my email address for authorizing [user@host]
my_email = "me@localhost"

# directory for mp3-files
mp3_dir = "./"

# program for ripping cd-tracks (to file)
#  %1 = cdrom device
#  %2 = track (numeric)
#  %3 = outputfile
rip_nf_prg = "cdparanoia -d "%1" %2 "%3""

# program for ripping cd-tracks (to stdout)
#  %1 = cdrom device
#  %2 = track (numeric)
rip_of_prg = "cdda2wav -D "%1" -t %2 -O wav -paranoia -"

# program for encoding wav->mp3 (from file to file)
#   %1 = inputfile
#   %2 = outputfile
#   %3 = albumname
#   %4 = MP3 genre by number
#   %5 = year
#   %6 = comment
#   %7 = filename
#   %8 = MP3 genre by name
#   %a = tracknumber
#   %b = tracknumber (with leading zeros)
#   %c = artistname
#   %d = title
enc_nf_prg = "bladeenc "%1" "%2""

# program for encoding wav->mp3 (from stdin to file)
#  %1 = outputfile
#  %3 = albumname
#  %4 = MP3 genre by number
#  %5 = year
#  %6 = comment
#  %7 = filename
#  %8 = MP3 genre by name
#  %a = tracknumber
#  %b = tracknumber (with leading zeros)
#  %c = artistname
#  %d = title
enc_of_prg = "oggenc -b 192 -l "%3" -d "%5" -c "%6" -N "%a" -a "%c" -t "%d" -o "%2" -"

# program for creating mp3 info
#  use mp3_info_prg = "0" to disable usage of tagprogram
#  %1 = artistname
#  %2 = title
#  %3 = albumname
#  %4 = genre (by number)
#  %5 = year
#  %6 = comment
#  %7 = filename
#  %8 = genre (by name)
#  %a = tracknumber
#  %b = tracknumber (with leading zeros)
mp3_info_prg = "0"

# string which replaced %8 in mp3_info_prg, if genre is unknown
unknown_genre = "Misc"

# size of fifo-buffer for on the fly encoding (KB)
of_fifo = 512

# pattern for mp3-filename-creation
#  %1 = artistname
#  %2 = title
#  %3 = albumname
#  %4 = genrestring
#  %5 = year
#  %6 = tracknumber
#  %7 = tracknumber (with leading zeros)
#  %8 = cddb-id
mp3_pattern = "%7-%8.ogg"

# pattern fro mp3-filename-creation for sampler cds
#  same pattern like in mp3_pattern
mp3_pattern_mix = "%3/%1-%2.ogg"

# mode for handling spaces in filenames
#  0: spaces allowed, 1: spaces will be converted to specified replace character
#  2: spaces will be killed
pat_mode = 1
space_rep_char = "_"

# appereance of filename case
#  0: as it is in CDDB entry
#  1: convert to lowercase (first letter will be uppercase if pat_upc = 1
#  2: convert to uppercase
case_chg = 0

# convert first letter of filename to uppercase
#  0: no, 1: yes
pat_upc = 1

# illegal characters which aren't allowed in filenames
# (converted to '_' if mode != 2, else killed
ill_chars = "~[]()!*?""

# what to do with illegal characters, should they be removed?
# (otherwise convert to '_' or space, depending on pat_mode)
#  0: no, use pat_mode, 1: yes, remove
rem_ill_char = 1

# protect pattern from substitution operations?
#  0: no, 1: yes
pattern_protect = 1

# character which should replace slashes in album, artist, title
# (only one character allowed, use "0" to accept slashes in these
   fields, which causes strange directory creation)
slash_rep_char = "-"

# non-strict character handling
# 0: only printable chars allowed, 1: eased allowed chars
eased_char_hand = 0

# default comment for mp3-files
#  %1 = artistname
#  %2 = title
#  %3 = albumname
#  %4 = genrestring
#  %5 = year
#  %6 = tracknumber
#  %7 = tracknumber (with leading zeros)
#  %8 = version-string of MP3c
#  %9 = cddb-id
#  %a = actual day (is set when encoding starts, or batchfile created)
#  %b = actual month
#  %c = actual year (2 digits)
#  %d = actual year (4 digits)
#  %e = weekday (3 letters)
#  %f = month (3 letters)
#  %g = actual hour
#  %h = actual minute
#  %i = minute-part of track-length
#  %j = second-part of track-length
mp3_comment = "gen by WSPse-MP3c %8 [%b/%c]"

# fancy color for windows (0: never, 1: sometimes, 2: ever)
fancy_color = 0

# autosave configuration on exit (0: no, 1: yes)
auto_save = 0

# default flag (0: default non-fly, 1: default on-fly)
def_on_fly = 0

# rip-encode order (0: rip one track, then encode; 1: rip all tracks,
#                   then encode)
rip_enc_ord = 0

# open tray after encoding (0: no, 1:yes)
open_tray = 1

# tmpfile (for non-on-the-fly convert)
tmp_file = "/tmp/WSPse-MP3Creat.wav"

# what to do with tempfiles on exits
# 0: nothing, 1: delete marked, 2: delete all
del_tmp_on_exit = 1

# default exportfile for ripped tracks
def_exp_file = "./.mp3c-exported"

# if deleteflag should cleared on export (0: no, 1: yes)
clear_del_on_exp = 1

# framemultiplikator (to calculate size)
frame_mult = 214

# pattern for m3u-playlist, use "0" to disable
#  %1 = artistname
#  %2 = title
#  %3 = albumname
#  %4 = genrestring
#  %5 = year
#  %6 = tracknumber
#  %7 = tracknumber (with leading zeros)
#  %8 = cddb-id
m3u_pattern = "%1-%3.m3u"

# pattern for m3u-playlist for sampler cds, use "0" to disable
#  same pattern like in m3u_pattern
m3u_patmix = "%3.m3u"

# directory for m3u-playlist, or "0" to use mp3-dir
m3u_dir = "0"

# how to build the filename for m3u-list
#  0 = full path
#  1 = relative to m3u-maindir
#  2 = relative to m3u-file
m3u_rel_name_type = 2

# existing CDDB genres, do not change manually
cddb_genre_list = "blues,classical,country,data,folk,jazz,misc,newage,reggae,rock,soundtrack"

# allow parallel running sessions of MP3c
para_sessions_allowed = 1

# use internal directory requester
use_dir_request = 1


Appendix B - Sources

Sources of info about mp3c are:

- Matthias Hensler's mp3c web site: http://www.wspse.de/WSPse/Linux-MP3c.php3
- the source tarball contains extensive documentation about mp3c usage and
  CDDB


Arnhem, Jan 18 2006
