In my quest for the perfect mp3 rip i have hit a few snags. I created this batchfile as a workaround--please tell me what you think, and if you can solve the remaining
problems! (go easy on me, this is the most complicated thing i've programmed, other than a convoluted autoexec.bat i made years ago!)
Sublame.txt:
SUBLAME 0.01a by Adam Golding
-----------------------------
The Problems:
--Concerning --nogap
-LAME's experimental --nogap option is not supported by EAC
-WinLame supports it but:
-winlame only uses a special lame dll, which is rarely updated
-winlame does prevent LAME from applying --nogap to tracks from
different albums
-winlame does not recurse subdirectories automatically
-(otherwise WinLame was an impressive front end!)
-WinLame does not have encoding log
-all2lame supports it but:
-all2lame's "album separator[s]" have to be manually inserted
-all2lame has no option to delete source files after encoding
-all2lame also does not recurse subdirectories automatically
-all2lame also appears to have a bug that prevents you from adding
many files at once (you have to add them in groups of 20 or so)
-all2lame also has no encoding log
-other frontends?
-no other frontends appear to support --nogap
--Concerning EAC
-EAC creates .log, .cue, and .m3u files, but gives no options for
naming them or placing them in directories. Using these options
for the files themselves will separate these files from the albums
they correspond to.
-EAC does not create .cue sheets which are compatible with its own
index-based extraction.
A Partial Solution:
I have no programming experience, so I have resorted to a crude batch
file. This file will not work on some older windows/dos systems, because
I learned all of the commands from WindowsXP doccumentation.
sublame.bat:
The assumption is that you've used EAC to name files with something
like %D\%Y - %C\%N$%T$%A$%I, with a directory for each album. (The
filename is like that so you can pass all the info from EAC to a
tagger (which will tag and rename your files) while keeping the
path and filname as short as possible.)
sublame.bat performs the following steps:
1. Starting in the current directory, it will compress each directory
as one album using lame --nogap. You will have to put options in
the .bat file.
2. sublame will delete all wav files in the tree.
3. sublame will move log, cue, and m3u files in the starting dir to
the first subdirectory that contains their filename in the
directory name, thus reuniting them with their albums.
4. sublame will rename these files to match the directory name, so
for example
"1969 - Abbey Road\Abbey Road.log" becomes
"1969 - Abbey Road\1969 - Abbey Road.log"
5. I cannot determine how to fix the .cue files for index-based
extraction, nor can I find a way to log lame.exe's output! Someone
help! (the cue fix woult have to run after the tagger renames the
files)
6. At this point you need to run a tagging program to extract the tags
from the filename and to rename the files. Then you need to run
VBRfix (the visual basic version recurses subdirectories) to fix the
playback times. (Note: VBR fix introduces a very small gap in winamp,
but nothing in foobar2000.)
SUBLAME 0.01a by Adam Golding
-----------------------------
The Problems:
--Concerning --nogap
-LAME's experimental --nogap option is not supported by EAC
-WinLame supports it but:
-winlame only uses a special lame dll, which is rarely updated
-winlame does prevent LAME from applying --nogap to tracks from
different albums
-winlame does not recurse subdirectories automatically
-(otherwise WinLame was an impressive front end!)
-WinLame does not have encoding log
-all2lame supports it but:
-all2lame's "album separator[s]" have to be manually inserted
-all2lame has no option to delete source files after encoding
-all2lame also does not recurse subdirectories automatically
-all2lame also appears to have a bug that prevents you from adding
many files at once (you have to add them in groups of 20 or so)
-all2lame also has no encoding log
-other frontends?
-no other frontends appear to support --nogap
--Concerning EAC
-EAC creates .log, .cue, and .m3u files, but gives no options for
naming them or placing them in directories. Using these options
for the files themselves will separate these files from the albums
they correspond to.
-EAC does not create .cue sheets which are compatible with its own
index-based extraction.
A Partial Solution:
I have no programming experience, so I have resorted to a crude batch
file. This file will not work on some older windows/dos systems, because
I learned all of the commands from WindowsXP doccumentation.
sublame.bat:
The assumption is that you've used EAC to name files with something
like %D\%Y - %C\%N$%T$%A$%I, with a directory for each album. (The
filename is like that so you can pass all the info from EAC to a
tagger (which will tag and rename your files) while keeping the
path and filname as short as possible.)
sublame.bat performs the following steps:
1. Starting in the current directory, it will compress each directory
as one album using lame --nogap. You will have to put options in
the .bat file.
2. sublame will delete all wav files in the tree.
3. sublame will move log, cue, and m3u files in the starting dir to
the first subdirectory that contains their filename in the
directory name, thus reuniting them with their albums.
4. sublame will rename these files to match the directory name, so
for example
"1969 - Abbey Road\Abbey Road.log" becomes
"1969 - Abbey Road\1969 - Abbey Road.log"
5. I cannot determine how to fix the .cue files for index-based
extraction, nor can I find a way to log lame.exe's output! Someone
help! (the cue fix woult have to run after the tagger renames the
files)
6. At this point you need to run a tagging program to extract the tags
from the filename and to rename the files. Then you need to run
VBRfix (the visual basic version recurses subdirectories) to fix the
playback times. (Note: VBR fix introduces a very small gap in winamp,
but nothing in foobar2000.)
sublame.bat:
@echo off
echo.
echo.
echo SUBLAME 0.01a by Adam Golding
echo -----------------------------
echo.
echo this program operates recursively and includes DELETING and RENAMING as
echo part of its operation, so PROCEED AT YOUR OWN RISK. It is also in alpha
echo and may malfunction.
echo.
echo see sublame.txt for instructions.
echo.
echo.
echo.
echo.
echo Press CTRL+C to cancel.
pause
setlocal enabledelayedexpansion
pushd .
: all2lame commands
: -----------------
: These commands are performed by go.bat generated in
: ALL2LAME -- I don't think they are necessary since filenames are not
: written to the batch file in this case.
:
: S:
: cd "S:\Path"
: win2dos rs.bat
:nogap
: this section does a --nogap encode on *.wav in a directory tree, staring
: in ., and treats each directory as one album (so LAME does not apply --nogap
: across albums--although, for trivia, Klaatu's first 2 albums should run
: seamlessly together, so you would need to alter this to rip them.)
: curent directory scanning: enable this to include the current directory
: call :nogap .
for /D /R %%i in (*.*) do call :nogapsub "%%i"
goto :cuelog
:nogapsub
cd %1
set Q=
for %%i in (*.wav) do set Q=!Q! "%%i"
:LAME options
:put options after lame.exe below.
lame.exe --nogap %Q%
: these are some options i am toying around with.
: -t -T -nogaptags -p --replaygain-accurate --clipdetect --verbose --priority 0 --nogapout --preset standard
del *.wav
goto :eof
:cuelog
: this section moves *.cue, *.log & *.m3u from . into the first directory in
: the tree which contains their filename. At the same time, it renames the
: files to match the name of the directory they were moved to. Add /Y to
: "do move" to supress prompt on overwriting existing files.
popd
for %%i in (*.cue,*.log,*.m3u) do call :cuelogsub "%%i" "*%%~ni*" "%%~xi"
goto :eof
:cuelogsub
for /F "delims==" %%i in ('dir /s /ad /b %2') do move %1 "%%i\%%~nxi%~3"
goto :eof
Thanks!