flac encode multiple files as a group / album |
![]() ![]() |
flac encode multiple files as a group / album |
Sep 5 2008, 23:14
Post
#1
|
|
|
Group: Members Posts: 74 Joined: 26-January 07 Member No.: 40033 |
...so i encoded some albums with flac by way of eac...later to realize that eac fed them one-at-a-time to the encoder...hence the replay gain info is wrong for the album gain/peek
i know i can fix this with metaflac, but the whole process seems harder than it should be, in lieu of that i have decided to just rip the .wav files with eac and find an alternate method to encode multiple tracks with flac as a group/album problem is i can't find any up-to-date program to do this, and i surely don't want to type out every single run at the command line, could this be done with a batch file? something simple i could just place in the album's folder and run, sure i would have to change some options in the batch file every time, but i would not have to enter a dozen file names at the command line any help is greatly appreciated |
|
|
|
Sep 6 2008, 08:37
Post
#2
|
|
|
Group: Members Posts: 82 Joined: 3-February 08 Member No.: 51007 |
i know i can fix this with metaflac, but the whole process seems harder than it should be, If you consider reripping etc. easier than running metaflac --add-replaygain *.flac on your already encoded files, then feel free to procede otherwise. Anyway, you likely are facing multiple directories, and having to process many directories with this command can become tedious. You can automate running this command with some more advanced shell commands. Alternatively, as a Windows user, Foobar could automatically do the job, provided your tags are OK. That said, you are probably pointing to a valid issue with EAC. I never remarked it myself because I have always been handling replaygain outside of the ripping program. -edit- QUOTE something simple i could just place in the album's folder and run, sure i would have to change some options in the batch file every time, but i would not have to enter a dozen file names at the command line If that is sufficient for you, then the above command is just fine and better: no need to change options. Just change to the directory in a command terminal window and paste the command. This post has been edited by chromium: Sep 6 2008, 15:45 |
|
|
|
Sep 6 2008, 13:14
Post
#3
|
|
|
Group: Banned Posts: 69 Joined: 20-July 07 Member No.: 45497 |
At the command prompt type help and you'll get the list of all commands. You need the command for so, type for /? and you'll get (part of all you'll get follows): Runs a specified command for each file in a set of files. FOR %variable IN (set) DO command [command-parameters] %variable Specifies a single letter replaceable parameter. (set) Specifies a set of one or more files. Wildcards may be used. command Specifies the command to carry out for each file. command-parameters Specifies parameters or switches for the specified command. To use the FOR command in a batch program, specify %%variable instead of %variable. Variable names are case sensitive, so %i is different from %I. If Command Extensions are enabled, the following additional forms of the FOR command are supported: FOR /D %variable IN (set) DO command [command-parameters] If set contains wildcards, then specifies to match against directory names instead of file names. FOR /R [[drive:]path] %variable IN (set) DO command [command-parameters] Walks the directory tree rooted at [drive:]path, executing the FOR statement in each directory of the tree. If no directory specification is specified after /R then the current directory is assumed. If set is just a single period (.) character then it will just enumerate the directory tree. You might want to use the command in this form also: FOR /F ["options"] %variable IN (`command`) DO command [command-parameters] Now, DO command for you is DO flac with the appropriate parameters Encoding: flac [<general-options>] [<encoding/format-options>] [INPUTFILE [...]] Next, flac needs INPUTFILE If you will process the files in one directory only then use this syntax: FOR %X IN (*.wav) DO flac [command-parameters] "%X" If you think of processing the files in a tree then use this syntax: FOR /R [[drive:]path] %X IN (*.wav) DO flac [command-parameters] "%X" "%X" - the quotation marks are needed to pass long file names including spaces. The flac encoding options you need are: --replay-gain Calculate ReplayGain & store in FLAC tags and of course -8, --compression-level-8, --best P.S. The file names are generated by: (set) were set is *.wav or (`command`) were command is DIR /b for a single directory or DIR /b /s for a tree This post has been edited by SpasV: Sep 6 2008, 13:27 |
|
|
|
Sep 6 2008, 14:23
Post
#4
|
|
|
Group: Members Posts: 826 Joined: 29-September 04 Member No.: 17374 |
Foobar2000 is the answer, no reason to bother with command line scripting.
|
|
|
|
Sep 8 2008, 05:19
Post
#5
|
|
|
Group: Members Posts: 74 Joined: 26-January 07 Member No.: 40033 |
thank each of you for your help, it is greatly appreciated
@SpasV what am i doing wrong with my batch file? this doesn't work CODE FOR %%X IN (*.wav) DO "G:\Program Files\flac\flac.exe" [--best -V -P 1048576 --picture=| | | | "G:\Program Files\flac\ok computer.jpg" --replay-gain -T "TITLE=" -T "ALBUM=" -T "ARTIST=" -T "PERFORMER=" -T "DATE=" -T "LOCATION=" -T "GENRE=" -T "SUB GENRE=" -T "TRACK NUMBER=" -T "TOTAL TRACKS=" -T "DISC NUMBER=" -T "TOTAL DISCS="] "%%X" all of my paths are correct and the batch file is run from the directory with the .wav files i want to modify i'm not so confident in the syntax of my FOR command, or the purpose of the variable(%%X) thanks again |
|
|
|
Sep 8 2008, 07:27
Post
#6
|
|
|
Group: Members Posts: 260 Joined: 30-May 08 From: UK Member No.: 53927 |
You might want to try Autoflac to automate your process, including doing the replay gain calculations at the same time as you rip and encode to flac. It does album replay gain, and you will avoid the need to introduce the intermediate wav stage.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 02:40 |