Encoding to mp2 with twolame and tagging with Mutagen's mid3v2.
Support for toolame has been quietly removed. (Support for mp2
encoding using the FFmpeg/avconv native mp2 encoder is in the
pipeline).
echo "-n No lookup. Don't query CDDB, just create and use template"
echo "-N Noninteractive. Never prompt for anything"
echo "-o <type1[,type2]...>"
-echo " Output file type(s) (vorbis,mp3,flac,spx,mpc,wav,m4a,opus,wv,ape). Defaults to vorbis"
+echo " Output file type(s) (vorbis,mp3,flac,spx,mpc,wav,m4a,opus,wv,ape,mp2). Defaults to vorbis"
echo "-p Pad track numbers with 0's (if less than 10 tracks)"
echo "-P Use UNIX pipes to read+encode without wav files"
echo "-r <host1[,host2]...>"
-p artist="$TRACKARTIST" -p album="$DALBUM" -p title="$TRACKNAME" -p track=${TRACKNUM:-$1} \
-p year="$CDYEAR" -p genre="$CDGENRE" ${COMMENTOUTPUT:+-p comment="$COMMENTOUTPUT"}
;;
+ mp2)
+ # Using Mutagen's mid3v2 for tagging with id3v2.4.0. Interesting enough vlc, MPlayer and XMMS ignore
+ # these tags but they are read by Audacious, Xine, Aqualung, mediainfo, ffplay, ffprobe. Curious...
+ run_command tagtrack-$OUTPUT-$1 nice $ENCNICE "$MID3V2" -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" \
+ -y "$CDYEAR" -g "$CDGENRE" -T "${TRACKNUM:-$1}/$TRACKS" ${TPE2:+--TPE2 "$TPE2"} ${COMMENTOUTPUT:+--comment="$COMMENTOUTPUT"} \
+ "$ABCDETEMPDIR/track$1.mp2"
+ ;;
aac)
run_command tagtrack-$OUTPUT-$1 true
;;
case "$OUTPUT" in
mp3)
case "$MP3ENCODERSYNTAX" in
- lame|toolame)
+ lame)
(
cd "$ABCDETEMPDIR"
TRACKFILES=
case "$2" in
%local*%)
case "$MP3ENCODERSYNTAX" in
- lame|toolame|gogo) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER $MP3ENCODEROPTS "$IN" "$OUT" ;;
+ lame|gogo) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER $MP3ENCODEROPTS "$IN" "$OUT" ;;
bladeenc) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER $MP3ENCODEROPTS -quit "$IN" "$OUT" ;;
l3enc|xingmp3enc) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER "$IN" "$OUT" $MP3ENCODEROPTS ;;
mp3enc) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER -if "$IN" -of "$OUT" $MP3ENCODEROPTS ;;
ape)
$RUN_COMMAND nice $EFFECTIVE_NICE $APENCODER "$IN" "$OUT" $APENCODEROPTS
;;
+ mp2)
+ $RUN_COMMAND nice $EFFECTIVE_NICE $MP2ENCODER $MP2ENCODEROPTS "$IN" "$OUT"
+ ;;
aac)
# aac container is only used to catch faac encoded files where faac
# is compiled without mp4 support (with libmp4v2).
MPCENCODERSYNTAX=default
WVENCODERSYNTAX=default
APENCODERSYNTAX=default
+MP2ENCODERSYNTAX=default
AACENCODERSYNTAX=default
NORMALIZERSYNTAX=default
CUEREADERSYNTAX=default
# program paths - defaults to checking your $PATH
# mp3
LAME=lame
-TOOLAME=toolame
GOGO=gogo
BLADEENC=bladeenc
L3ENC=l3enc
# ape
APENC=mac
APETAG=apetag
+# mp2
+TWOLAME=twolame
# m4a
FAAC=faac
NEROAACENC=neroAacEnc
ID3=id3
ID3V2=id3v2
+MID3V2=mid3v2
EYED3=eyeD3
VORBISCOMMENT=vorbiscomment
METAFLAC=metaflac
# Options for programs called from abcde
# mp3
LAMEOPTS=
-TOOLAMEOPTS=
GOGOOPTS=
BLADEENCOPTS=
L3ENCOPTS=
# Monkey's Audio Console (mac) chokes without a mode setting
# so we set one here.
APENCOPTS='-c4000'
+# mp2
+TWOLAMENCOPTS=
# m4a
FAACENCOPTS=
NEROACENCOPTS=
# This option is basically for Debian package dependencies:
# List of preferred outputs - by default, run with whatever we have in the path
-DEFAULT_OUTPUT_BINARIES=vorbis:oggenc,flac:flac,mp3:toolame,mp3:lame,mp3:bladeenc,spx:speex,m4a:faac:opus
+DEFAULT_OUTPUT_BINARIES=vorbis:oggenc,flac:flac,mp3:lame,mp3:bladeenc,spx:speex,m4a:faac:opus
# List of preferred cdromreaders - by default, run whichever we have in the path
DEFAULT_CDROMREADERS="cdparanoia icedax cdda2wav libcdio pird"
mpc:*) MPCENCODEROPTSCLI="$( echo $OUTPUT | cut -d: -f2- )" ;;
wv:*) WVENCODEROPTSCLI="$( echo $OUTPUT | cut -d: -f2- )" ;;
ape:*) APENCODEROPTSCLI="$( echo $OUTPUT | cut -d: -f2- )" ;;
+ mp2:*) MP2ENCODEROPTSCLI="$( echo $OUTPUT | cut -d: -f2- )" ;;
m4a:*|aac:*) AACENCODEROPTSCLI="$( echo $OUTPUT | cut -d: -f2- )" ;;
esac
done
[ "$APENCODERSYNTAX" = "default" ] && APENCODERSYNTAX=mac
[ "$DOTAG" = "y" ] && NEEDAPETAG=y
;;
+ mp2)
+ [ "$MP2ENCODERSYNTAX" = "default" ] && MP2ENCODERSYNTAX=twolame
+ [ "$DOTAG" = "y" ] && NEEDMID3V2=y
+ ;;
aac)
[ "$AACENCODERSYNTAX" = "default" ] && AACENCODERSYNTAX=faac
[ "$DOTAG" = "n" ]
MP3ENCODEROPTS="${MP3ENCODEROPTSCLI:-$LAMEOPTS}"
MP3ENCODER="$LAME"
;;
- toolame)
- MP3ENCODEROPTS="${MP3ENCODEROPTSCLI:-$TOOLAMEOPTS}"
- MP3ENCODER="$TOOLAME"
- ;;
gogo)
MP3ENCODEROPTS="${MP3ENCODEROPTSCLI:-$GOGOOPTS}"
MP3ENCODER="$GOGO"
APENCODER="$APENC"
;;
esac
+case "$MP2ENCODERSYNTAX" in
+ twolame)
+ MP2ENCODEROPTS="${MP2ENCODEROPTSCLI:-$TWOLAMENCOPTS}"
+ MP2ENCODER="$TWOLAME"
+ ;;
+esac
case "$AACENCODERSYNTAX" in
# Some elaborate 'if' work to keep backward compatibility for those
# who don't realise that AACENCOPTS does not work with abcde from
# Make sure a buncha things exist
for X in $CDROMREADER $CDDISCID ${NEEDTAGGER+$TAGGER} $MP3ENCODER \
$OGGENCODER $OPUSENCODER $FLACENCODER $SPEEXENCODER $MPCENCODER \
- $AACENCODER $WVENCODER $CDDBTOOL $APENCODER \
+ $AACENCODER $WVENCODER $CDDBTOOL $APENCODER $MP2ENCODER \
${NEEDHTTPGET+$HTTPGET} ${NEEDDISTMP3+$DISTMP3} \
${NEEDCOMMENTER+$VORBISCOMMENT} ${NEEDMETAFLAC+$METAFLAC} \
${NEEDNORMALIZER+$NORMALIZER} ${NEEDEJECT+$EJECT} \
${NEEDMPCGAIN+$MPCGAIN} ${NEEDCUEREADER+$CUEREADER} \
${NEEDWVGAIN+WVGAIN} ${NEEDAPETAG+$APETAG} \
${NEEDCUE2DISCID+$CUE2DISCID} ${NEEDNEROAACTAG+$NEROAACTAG} \
- ${NEEDGLYRC+$GLYRC} ${NEEDWINE+$WINE} ${NEEDATOMICPARSLEY+$ATOMICPARSLEY}
+ ${NEEDGLYRC+$GLYRC} ${NEEDWINE+$WINE} ${NEEDATOMICPARSLEY+$ATOMICPARSLEY} \
+ ${NEEDMID3V2+$MID3V2}
do
checkexec "$X"
done
.TH abcde 1
.SH NAME
abcde \- Grab an entire CD and compress it to Ogg/Vorbis, MP3, FLAC, Ogg/Speex, AAC,
-WavPack, Monkey's Audio (ape) and/or MPP/MP+(Musepack) format.
+WavPack, Monkey's Audio (ape), MPP/MP+(Musepack) and/or MP2 format.
.SH SYNOPSIS
.B abcde
.I [options] [tracks]
tagging or commenting it, is very involved.
.BR abcde
is designed to automate this. It will take an entire CD and convert it into
-a compressed audio format - Ogg/Vorbis, MPEG Audio Layer III, Free Lossless
+a compressed audio format - Ogg/Vorbis, MPEG Audio Layer III (MP3), Free Lossless
Audio Codec (FLAC), Ogg/Speex, MPP/MP+(Musepack), M4A (AAC) wv (WavPack),
-Monkey's Audio (ape) or Opus format(s).
+Monkey's Audio (ape), Opus or MPEG Audio Layer II (MP2) format(s).
With one command, it will:
.TP
.B *
.TP
.B *
Compress to Ogg/Vorbis, MP3, FLAC, Ogg/Speex, MPP/MP+(Musepack), M4A, wv (WavPack),
-Monkey's Audio (ape) and/or Opus format(s), all in one CD read
+Monkey's Audio (ape), Opus format(s) and/or MP2, all in one CD read
.TP
.B *
Comment or ID3/ID3v2 tag
Specifies the style of encoder to use for the FLAC encoder. At this point only
\'flac\' is available for FLAC encoding.
.TP
+.B MP2ENCODERSYNTAX
+Specifies the style of encoder to use for the MPEG-1 Audio Layer II (MP2) encoder.
+At this point only \'twolame\' is available for MP2 encoding.
+.TP
.B SPEEXENCODERSYNTAX
Specifies the style of encoder to use for Speex encoder. At this point only
\'speexenc\' is available for Ogg/Speex encoding.
.TP
.B PATHNAMES
The following configuration file options specify the pathnames of their
-respective utilities: LAME, TOOLAME, GOGO, BLADEENC, L3ENC, XINGMP3ENC, MP3ENC,
+respective utilities: LAME, GOGO, BLADEENC, L3ENC, XINGMP3ENC, MP3ENC,
VORBIZE, OGGENC, FLAC, SPEEXENC, MPCENC, WAVEPACK, APENC, OPUSENC, ID3, EYED3,
METAFLAC, CDPARANOIA, CD_PARANOIA, CDDA2WAV, PIRD, CDDAFS, CDDISCID, CDDBTOOL,
EJECT, MD5SUM, DISTMP3, VORBISCOMMENT, NORMALIZE, CDSPEED, MP3GAIN, VORBISGAIN,
MPCGAIN, MKCUE, MKTOC, CUE2DISCID (see option "\-X"), DIFF, HTTPGET, GLYRC,
-IDENTIFY, DISPLAYCMD, CONVERT, QAAC, WINE, FHGAACENC, ATOMICPARSLEY and FFMPEG.
+IDENTIFY, DISPLAYCMD, CONVERT, QAAC, WINE, FHGAACENC, ATOMICPARSLEY, FFMPEG,
+TWOLAME and MID3V2.
.TP
.B COMMAND-LINE OPTIONS
If you wish to specify command-line options to any of the programs \fBabcde\fR uses,
-set the following configuration file options: LAMEOPTS, TOOLAMEOPTS, GOGOOPTS,
+set the following configuration file options: LAMEOPTS, GOGOOPTS,
BLADEENCOPTS, L3ENCOPTS, XINGMP3ENCOPTS, MP3ENCOPTS, VORBIZEOPTS, WAVEPACKENCOPTS, APENCOPTS,
OGGENCOPTS, FLACOPTS, SPEEXENCOPTS, MPCENCOPTS, FAACENCOPTS, NEROAACENCOPTS, FDKAACENCOPTS,
OPUSENCOPTS, ID3OPTS, EYED3OPTS, MP3GAINOPTS, CDPARANOIAOPTS, CDDA2WAVOPTS, PIRDOPTS,
CDDAFSOPTS, CDDBTOOLOPTS, EJECTOPTS, DISTMP3OPTS, NORMALIZEOPTS, CDSPEEDOPTS, MKCUEOPTS,
VORBISCOMMMENTOPTS, METAFLACOPTS, DIFFOPTS, FLACGAINOPTS, VORBISGAINOPTS, HTTPGETOPTS,
GLYRCOPTS, IDENTIFYOPTS, CONVERTOPTS, DISPLAYCMDOPTS, QAACENCOPTS, FHGAACENCOPTS,
-ATOMICPARSLEYOPTS and FFMPEGENCOPTS.
+ATOMICPARSLEYOPTS, FFMPEGENCOPTS and TWOLAMENCOPTS.
.TP
.B CDSPEEDVALUE
Set the value of the CDROM speed. The default is to read the disc as fast as
Specifies the encoding format to output, as well as the default extension and
encoder. Defaults to "vorbis". Valid settings are "vorbis" (or "ogg")
(Ogg/Vorbis), "mp3" (MPEG-1 Audio Layer III), "flac" (Free Lossless Audio
-Codec), "spx" (Ogg/Speex), "mpc" (MPP/MP+ (Musepack), "m4a" (AAC or ALAC),
-"wv" (WavPack"), "wav" (Microsoft Waveform) or "opus" (Opus Interactive Audio Codec). Values
-like "vorbis,mp3" encode the tracks in both Ogg/Vorbis and MP3 formats. For example
+Codec), "mp2" (MPEG-1 Audio Layer III), "spx" (Ogg/Speex), "mpc" (MPP/MP+ (Musepack),
+"m4a" (AAC or ALAC),"wv" (WavPack"), "wav" (Microsoft Waveform) or "opus"
+(Opus Interactive Audio Codec). Values like "vorbis,mp3" encode the tracks in both
+Ogg/Vorbis and MP3 formats. For example:
.br
OUTPUTTYPE=vorbis,flac
.br
For each value in OUTPUTTYPE, \fBabcde\fR expands a different process for encoding,
tagging and moving, so you can use the format placeholder, OUTPUT, to create
different subdirectories to hold the different types. The variable OUTPUT will
-be 'vorbis', 'mp3', 'flac', 'spx', 'mpc', 'm4a', 'wv', 'ape' and/or 'wav', depending on the
+be 'vorbis', 'mp3', 'flac', 'spx', 'mpc', 'm4a', mp2, 'wv', 'ape' and/or 'wav', depending on the
OUTPUTTYPE you define. For example
.br
OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}._${TRACKFILE}'
.BR cd-paranoia (1)
.BR icedax (1),
.BR cdda2wav (1),
+.BR twolame (1),
+.BR mid3v2 (1),
.BR pird (1),
.BR dagrab (1),
.BR normalize-audio (1),
.BR oggenc (1),
.BR vorbize (1),
.BR flac (1),
-.BR toolame (1),
.BR speexenc (1),
.BR mpcenc (1),
.BR faac (1),
# mac - for APENCODERSYNTAX
# faac, neroAacEnc, fdkaac, qaac, fhgaacenc, ffmpeg - for AACENCODERSYNTAX
# opusenc - for OPUSENCODERSYNTAX
-# default is a valid option for oggenc, lame, flac, speexenc, mpcenc, wavpack, faac and opus.
-# Currently this affects the default location of the binary, the variable
-# to pick encoder command-line options from, and where the options are
-# given.
+# twolame - for MP2ENCODERSYNTAX
+# default is a valid option for oggenc, lame, flac, speexenc, mpcenc, wavpack,
+# faac, opus and twolame. Currently this affects the default location of the
+# binary, the variable to pick encoder command-line options from, and where
+# the options are given.
#MP3ENCODERSYNTAX=default
#OGGENCODERSYNTAX=default
#FLACENCODERSYNTAX=default
#APENCODERSYNTAX=default
#AACENCODERSYNTAX=default
#OPUSENCODERSYNTAX=default
+#MP2ENCODERSYNTAX=default
# Specify the syntax of the normalize binary here - so far only 'normalize'
# is supported.
# Encoders:
#LAME=lame
-#TOOLAME=toolame
#GOGO=gogo
#BLADEENC=bladeenc
#L3ENC=l3enc
#NEROAACENC=neroAacEnc
#FDKAAC=fdkaac
#OPUSENC=opusenc
+#TWOLAME=twolame
# Note that if you use avconv rather than FFmpeg give the
# path to avconv here (e.g. FFMPEG=/usr/bin/avconv):
# FFMPEG=ffmpeg
# Taggers, rippers, replaygain etc:
#ID3=id3
#ID3V2=id3v2
+#MID3V2=mid3v2
#EYED3=eyeD3
#CDPARANOIA=cdparanoia
#CD_PARANOIA=cd-paranoia
# A good option is '-V 0' which gives Variable Bitrate Rate (VBR) recording
# with a target bitrate of ~245 Kbps and a bitrate range of 220...260 Kbps.
#LAMEOPTS=
-#TOOLAMEOPTS=
#GOGOOPTS=
# Bladeenc still works with abcde in 2015, and the last release of bladeenc
# was in 2001! Settings that will produce a great encode are: '-br 192'
# consider using '--vbr 4' for a decent quality encode.
#FHGAACENCOPTS=
+# OPUS
+# For the encoder options look at: 'opusenc -h'
+#OPUSENCOPTS=
+
+# MP2
+# Currently uses only twolame, for options look at: 'twolame --help',
+# a highly recommended setting is "--bitrate 320".
+#TWOLAMENCOPTS=
+
# FFmpeg or avconv can be used for several audio codecs:
# 1. Encoding to WavPack (FFmpeg only: avconv does not have a native encoder).
# Consider setting the following with a compression_level between 0-8:
# 2. Encoding to ALAC (both FFmpeg and avconv have a native encoder).
# Consider using the following for both FFmpeg and avconv:
# FFMPEGENCOPTS="-c:a alac"
-
#FFMPEGENCOPTS=
-# OPUS
-# For the encoder options look at: 'opusenc -h'
-#OPUSENCOPTS=
-
# mp3 tagging:
# There are three ways to tag MP3 files:
# 1. id3v1 (with id3)
abcde 2.7.1
+ * Support added for encoding to MPEG-1 Audio Layer II (mp2)
+ with twolame. Tagging with mid3v2.
* Encoding to WavPack with FFmpeg. Some slight changes to WavPack
syntax with backward compatibility built in for abcde 2.7.
* Encoding to m4a container with FFmpeg or avconv. This allows