From a Windows command shell cd to the directory containing the source wav file directory:
J:\>cd J:\Raw Audio\Dream Theater\Six Degrees Of Inner Turbulence
J:\Raw Audio\Dream Theater\Six Degrees Of Inner Turbulence>dir/b
cover.jpg
dreamtheater_sixdegreesofinnertur_748.jpg
Equipment.txt
info.txt
save.csv
Six Degrees Of Inner Turbulence (Disc 1, Raw).wav
Six Degrees Of Inner Turbulence (Disc 1, Raw).wav.reapeaks
Six Degrees Of Inner Turbulence (Disc 2, Raw).wav
Six Degrees Of Inner Turbulence (Disc 2, Raw).wav.reapeaks
Six Degrees Of Inner Turbulence.RPP
Six Degrees Of Inner Turbulence.RPP-bak
tracklist.csv
Tracklist.xls
WAV
This parent directory should contain the album artwork file, "cover.jpg", and the info.txt file containing the id3 tag information:
J:\Raw Audio\Dream Theater\Six Degrees Of Inner Turbulence>cat info.txt
Artist: The Dream Theater
Album: Six Degrees Of Inner Turbulence
Year: 2001
Genre: Progressive Metal
*
01 The Glass Prison
02 Blind Faith
03 Misunderstood
04 The Great Debate
05 Disappear
06 I. Overture
07 II. About To Crash
08 III. War Inside My Head
09 IV. The Test That Stumped Them All
10 V. Goodnight Kiss
11 VI. Solitary Shell
12 VII. About To Crash (Reprise
13 VIII. Losing Time / Grand Finale
Blank lines in info.txt are ignored. In this example I have used blank lines to deliniate the sides of the double album.
cd to the directory containing the source wave files:
J:\Raw Audio\Dream Theater\Six Degrees Of Inner Turbulence>cd WAV
J:\Raw Audio\Dream Theater\Six Degrees Of Inner Turbulence\WAV>dir/b
01 The Glass Prison.wav
02 Blind Faith.wav
03 Misunderstood.wav
04 The Great Debate.wav
05 Disappear.wav
06 I. Overture.wav
07 II. About To Crash.wav
08 III. War Inside My Head.wav
09 IV. The Test That Stumped Them All.wav
10 V. Goodnight Kiss.wav
11 VI. Solitary Shell.wav
12 VII. About To Crash (Reprise.wav
13 VIII. Losing Time _ Grand Finale.wav
cover.jpg
The "-h" switch to the encode.pl script will print out the script help:
J:\Raw Audio\Dream Theater\Six Degrees Of Inner Turbulence\WAV>encode.pl -h
encode.pl v6.19 (2016-11-27 Paul Rolan Perkes)
Usage:
encode.pl [-c n ] [-v n] [*.wav]
Examples (defaults):
encode.pl
encode.pl -v 0 *.wav (default)
encode.pl -c 128 test.wav
encode.pl -w -o "../RAW" *.flac
-S use standard options: -l -f -m -p
-V print version number
-h print help {this}
-o dir set output directory to dir (default "../MP3/")
-m encode wav to mp3
-c n lame constant bitrate n
-v n lame variable bitrate quality n [0..9] (default 0)
-f encode wav to flac
-F n set flac compression level to n [0..8] (default 8)
-z encode wav to aac
-Z n aac average bitrate n (default 320)
-g encode wav to ogg vorbis
-G set ogg quality [-2..10] (default 8)
-w decode flac to wav
-W decode mp3 to wav
-T n use up to n threads (default 6)
-C str use string str for id3 comment tag
-l use "Encoded from LP Record by Paul R. Perkes" as id3 comment tag
and append " [LP]" to album name
-k use "Encoded from Cassette Tape by Paul R. Perkes" as id3 comment tag
and append " [CASS]" to album name
-B str use string str for albumartist (TPE2) id3 tag
-K tag album as a compilation (TCMP)
-X perform verification {flac only, VERY slow}
-d debug mode - turn off silent encoding/decoding {verbose}
-M debug mode - print out encoding commands
-t test mode - don't actually encode/decode
-a str append string str to output filenames
-q operate silently (quiet)
-A extract artist from track name "artist - track name"
-p copy mp3's to "D:/My Music/Artist/$tag{Artist}/$tag{Album}/"
-P dir copy mp3's to root directory dir (implies -p)
-R str use argument str as the artist name for mp3 destination (implies -p)
-i img use image file img
For encodig assumes the existence of:
../info.txt
../cover.jpg
The following command will encode the wav files to flac, mp3 and aac files with the default encoding settings. The "-l" switch tells the script that the source is from an LP record and that the default LP comment tag should be used and "[LP]" should be added to the album name. I do this to keep track of which mp3's in my library were encoded from LP records and so that there won't be any conflict with digital albums of the same name that were purchased or encoded from CDs.
J:\Raw Audio\Dream Theater\Six Degrees Of Inner Turbulence\WAV>encode.pl -lfmz
================================================================================
encode.pl v6.19 (2016-11-27 Paul Rolan Perkes)
================================================================================
start: Sun Nov 27 06:27:38 2016
processing using up to 6 threads
using image file = "../cover.jpg"
reading "../info.txt"
Artist = The Dream Theater
Album = Six Degrees Of Inner Turbulence [LP]
Year = 2001
Genre = Progressive Metal
Comment = Encoded from LP Record by Paul R. Perkes
01 The Glass Prison
02 Blind Faith
03 Misunderstood
04 The Great Debate
05 Disappear
06 I. Overture
07 II. About To Crash
08 III. War Inside My Head
09 IV. The Test That Stumped Them All
10 V. Goodnight Kiss
11 VI. Solitary Shell
12 VII. About To Crash (Reprise
13 VIII. Losing Time / Grand Finale
--------------------------------------------------------------------------------
flac encoding...
file pattern = *.wav
flac 1.3.1
flac compression level = 8
output directory = ../24-bit FLAC/
encoding: 01 The Glass Prison.wav --> 01 The Glass Prison.flac
encoding: 02 Blind Faith.wav --> 02 Blind Faith.flac
encoding: 03 Misunderstood.wav --> 03 Misunderstood.flac
encoding: 04 The Great Debate.wav --> 04 The Great Debate.flac
encoding: 05 Disappear.wav --> 05 Disappear.flac
encoding: 06 I. Overture.wav --> 06 I. Overture.flac
encoding: 07 II. About To Crash.wav --> 07 II. About To Crash.flac
encoding: 08 III. War Inside My Head.wav --> 08 III. War Inside My Head.flac
encoding: 09 IV. The Test That Stumped Them All.wav --> 09 IV. The Test That Stumped Them All.flac
encoding: 10 V. Goodnight Kiss.wav --> 10 V. Goodnight Kiss.flac
encoding: 11 VI. Solitary Shell.wav --> 11 VI. Solitary Shell.flac
encoding: 12 VII. About To Crash (Reprise.wav --> 12 VII. About To Crash (Reprise.flac
encoding: 13 VIII. Losing Time _ Grand Finale.wav --> 13 VIII. Losing Time _ Grand Finale.flac
flac compressed size = 75.9%
flac encoding time = 43 seconds
throughput = 36.9 MB/sec
--------------------------------------------------------------------------------
mp3 encoding...
file pattern = *.wav
LAME 64bits version 3.99.5
lame bitrate = -V 0
output directory = ../MP3/
encoding: 01 The Glass Prison.wav --> 01 The Glass Prison.mp3
encoding: 02 Blind Faith.wav --> 02 Blind Faith.mp3
encoding: 03 Misunderstood.wav --> 03 Misunderstood.mp3
encoding: 04 The Great Debate.wav --> 04 The Great Debate.mp3
encoding: 05 Disappear.wav --> 05 Disappear.mp3
encoding: 06 I. Overture.wav --> 06 I. Overture.mp3
encoding: 07 II. About To Crash.wav --> 07 II. About To Crash.mp3
encoding: 08 III. War Inside My Head.wav --> 08 III. War Inside My Head.mp3
encoding: 09 IV. The Test That Stumped Them All.wav --> 09 IV. The Test That Stumped Them All.mp3
encoding: 10 V. Goodnight Kiss.wav --> 10 V. Goodnight Kiss.mp3
encoding: 11 VI. Solitary Shell.wav --> 11 VI. Solitary Shell.mp3
encoding: 12 VII. About To Crash (Reprise.wav --> 12 VII. About To Crash (Reprise.mp3
encoding: 13 VIII. Losing Time _ Grand Finale.wav --> 13 VIII. Losing Time _ Grand Finale.mp3
mp3 compressed size = 11.7%
mp3 encoding time = 45 seconds
throughput = 35.3 MB/sec
--------------------------------------------------------------------------------
aac encoding...
file pattern = *.wav
FAAC 1.28
aac bitrate = -b 320
output directory = ../AAC/
encoding: 01 The Glass Prison.wav --> 01 The Glass Prison.m4a
encoding: 02 Blind Faith.wav --> 02 Blind Faith.m4a
encoding: 03 Misunderstood.wav --> 03 Misunderstood.m4a
encoding: 04 The Great Debate.wav --> 04 The Great Debate.m4a
encoding: 05 Disappear.wav --> 05 Disappear.m4a
encoding: 06 I. Overture.wav --> 06 I. Overture.m4a
encoding: 07 II. About To Crash.wav --> 07 II. About To Crash.m4a
encoding: 08 III. War Inside My Head.wav --> 08 III. War Inside My Head.m4a
encoding: 09 IV. The Test That Stumped Them All.wav --> 09 IV. The Test That Stumped Them All.m4a
encoding: 10 V. Goodnight Kiss.wav --> 10 V. Goodnight Kiss.m4a
encoding: 11 VI. Solitary Shell.wav --> 11 VI. Solitary Shell.m4a
encoding: 12 VII. About To Crash (Reprise.wav --> 12 VII. About To Crash (Reprise.m4a
encoding: 13 VIII. Losing Time _ Grand Finale.wav --> 13 VIII. Losing Time _ Grand Finale.m4a
aac compressed size = 11.6%
aac encoding time = 64 seconds
throughput = 24.8 MB/sec
--------------------------------------------------------------------------------
end: Sun Nov 27 06:30:10 2016
total processing time = 152 seconds
13 flac files written to "../24-bit FLAC/" with 75.9% compressed size.
13 mp3 files written to "../MP3/" with 11.7% compressed size.
13 aac files written to "../AAC/" with 11.6% compressed size.
Perl exited with active threads:
0 running and unjoined
39 finished and unjoined
0 running and detached
The default encoding options are flac compression level 8 (the best compression level), mp3 variable bitrate quality 0 (the best variable quality) and aac average bitrate of 320 (the best quality). The script prints out detailed progress information and encoding statistics.