Based on configuration file or command line parameters, offers the following functionality:
- Encode - The program looks for .WAV files and will encode them using .FLAC
- Decode - The program looks for .FLAC files and will decode them to .WAV
- MP3 - The program looks for .FLAC files, intermediately decodes them to .WAV, then uses lame to encode the .WAV to .MP3 and removes the .WAV file
- ReFLAC - The program looks for .FLAC files and re-encodes them to .FLAC
- Test - The program looks for .FLAC and tests the files for validity
Taking the following types of input:
- Directory - Command Line Parameter DIR. If used, the program will look in this directory and all subdirectories for files and perform the Mode action on those files
- File List - Command Line Parameter FILELIST. formatted as 1 file per line with full path and filename, the program will iterate through each file and perform the mode action. File - Command Line Parameter
- FILE. It will allow the program to act on an individual file.
This program is just a wrapper around functionality available in other programs. It makes use of the following executables:
- FLAC v1.2.1 Makes use of flac.exe and metaflac.exe, these programs can be obtained from <a href="http://flac.sourceforge.net/" target="_blank">http://flac.sourceforge.net/</a> on the Download page, click on the link to download FLAC for Windows (command-line tools only).
- Tag v2.0.52 Makes use of Tag to identify and remove ID3v2 tags. This program can be obtained from <a href="http://synthetic-soul.co.uk/tag/" target="_blank">http://synthetic-soul.co.uk/tag/</a>
- Lame v3.97 LAME is an MPEG Audio Layer III (MP3) encoder licensed under the LGPL. It can be downloaded from <a href="http://lame.sourceforge.net" target="_blank">http://lame.sourceforge.net</a>
- metamp3 v.092b5 MetaMP3 is used to copy tags from FLAC files to MP3 files when in MP3 mode <a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=49751" target="_blank">http://www.hydrogenaudio.org/forums/index....showtopic=49751</a>
- imgResize v1.00 This program is distributed (with source) with Reflacer. This program is a simple VB .Net application to accept an image file, and resize it.
Change Log09/13/2008 v2.03- Fixed bug when resizing images in MP3 mode
- Rewrote code to allow FLACReplayGain to use multiple processors
08/14/2008 v2.02- Added FLACReplayGain as an option for the MODE parameter
- Will now skip FLACReplayGain if Synchronize=Y and all files already contain Replay Gain
- Added FLACRGParams parameter for metaflac replay gain parameters
- Fixed a issue that could cause cross-thread contamination
- Fixed bug in Resize code that would cause errors if the original image was smaller than desired size
- Added PAUSE parameter
- Fixed bug that caused an error when process completes and GUI status window is open
08/06/2008 v2.01- Fixed ReFLAC lock up bug
- Fixed early exit (before all operations were complete)
- Fixed issue where FLAC results weren't written to screen/log
- Added FLACReplayGain parameter and functionality
06/03/2008 v2.00- First VisualBasic Version
- Added tray icon with status information
03/08/2008 v1.04- MULTIPROCESSOR parameter added (jamesbaud)
- Fixed possible issue with comparison of directories when using DIR parameter
- Added ability to add FLAC tags when encoding based on Filename Mask and File
- TAGMASK parameter added (jamesbaud)
- TAGFILE parameter added (jamesbaud)
- Added report at the end of the run that shows counts of the operations performed
02/22/2008 v1.03- Added support for metamp3 for copying tags
- Added METAMP3PROGRAM & METAMP3PARAMS command line/config file parameter
- New file Reflacer.tag, used to map FLAC tags to MP3
- Added TAGGER command line/config file parameter, choose between Tag or metamp3
- The %ScriptDir% variable can now be used for any command line/config file parameters
- Added ability to use a file or FLAC picture in MP3 conversion
- IMAGESOURCE parameter allows hierarchy to use when searching for an image
- Introduction of imgResize.exe (simple VB app to resize an image file)
- RESIZEIMAGE parameter turns imgResize on or off
- Added IRPROGRAM & IRPARAMETERS to support imgResize
- Fixed potential error where path to the programs contained a space
- Temp directory is now used for all temporary processing files
- Code Change - all variables have been switched to Hungarian notation
02/09/2008 v1.02- Fixed bug with the Logo being written to the screen in an error state
- If using DIR and TARGETDIR, a list of files that are in TARGETDIR but not in DIR will be logged
- Added COPYFILEMASKS command line/config file parameter (Demetris)
- Will now create TARGETDIR if it does not exist (Demetris)
- Will now handle TARGETDIR being a child of DIR (will not recurse TARGETDIR) (probedb)
- When specify variables for LOGDIR, may use ^ instead of % (easier in batch files)
- Fixed bug with displaying TARGETDIR parameter
- Fixed bug that occurred when decoding a flac file failed in MP3 mode
02/06/2008 v1.01- Changed name from Re-FLACer
- Fixed bug when directory to be created was more than 1 level deep
- Added wrappers around FileSystemObject calls
- Moved code around to make it easier to read
- Added LOGDIR command line/config file parameter (Demetris)
- Added single File Processing (FILE parameter)
- Added FLAC command line parameters (Demetris)
02/02/2008 v1.00The home page for the software is on Google Code (http://code.google.com/p/reflacer).
Original discussions of Reflacer are here:
http://www.hydrogenaudio.org/forums/index....showtopic=50993 (http://www.hydrogenaudio.org/forums/index.php?showtopic=50993)
how come reflacer is able to create slightly smaller flac files than foobar using the same source file and same flac.exe? reflacer uses --best and foobar uses -8, but that is the same thing right?
also, i noticed in reflacer's log file that it says it detects flac v1.2.0 even though i am pointing it to flac v1.2.1b (which is the only flac.exe on my computer). the encoded files even say they are v1.2.1 in foobar/mr questionman but reflacer thinks it used v1.2.0 and therefore the version check setting will skip re-encoding v1.2.0 files to v1.2.1.
how come reflacer is able to create slightly smaller flac files than foobar using the same source file and same flac.exe? reflacer uses --best and foobar uses -8, but that is the same thing right?
To the best of my knowledge, --best is the same as -8
also, i noticed in reflacer's log file that it says it detects flac v1.2.0 even though i am pointing it to flac v1.2.1b (which is the only flac.exe on my computer). the encoded files even say they are v1.2.1 in foobar/mr questionman but reflacer thinks it used v1.2.0 and therefore the version check setting will skip re-encoding v1.2.0 files to v1.2.1.
Here's a little explanation of how version numbers are determined from the program and the .flac file:
The is a function in Reflacer (GetFLACProgramVersion) that simply runs the flac.exe program with the "-v" parameter and parses the output (which for my exe file is "flac 1.2.1"), it then takes the last part of this string and uses it as the version of the program.
To determine the version of the .flac file (function GetFLACEncodeVersion), metaflac is run with the "--show-vendor-tag" parameter. The returned data (for example "reference libFLAC 1.2.1 20070917") is then parsed, and the third value from the string is used as the version number of the file.
how come reflacer is able to create slightly smaller flac files than foobar using the same source file and same flac.exe? reflacer uses --best and foobar uses -8, but that is the same thing right?
also, i noticed in reflacer's log file that it says it detects flac v1.2.0 even though i am pointing it to flac v1.2.1b (which is the only flac.exe on my computer). the encoded files even say they are v1.2.1 in foobar/mr questionman but reflacer thinks it used v1.2.0 and therefore the version check setting will skip re-encoding v1.2.0 files to v1.2.1.
You can change the parameter from --best to -8 in the configuration file, which is what I did, for my own peace of mind, even though they are the same. See:
http://flac.sourceforge.net/documentation_...ncoding_options (http://flac.sourceforge.net/documentation_tools_flac.html#encoding_options)
how come reflacer is able to create slightly smaller flac files than foobar using the same source file and same flac.exe? reflacer uses --best and foobar uses -8, but that is the same thing right?
I'm pretty sure this is caused with foobar piping the audio in to flac with out making an intermediate wav file, if i recall correctly it makes more seekpoints if the file is piped in to Flac thats why the file is a little bigger. I'm sure there was a thread about it on HA.
how come reflacer is able to create slightly smaller flac files than foobar using the same source file and same flac.exe? reflacer uses --best and foobar uses -8, but that is the same thing right?
I'm pretty sure this is caused with foobar piping the audio in to flac with out making an intermediate wav file, if i recall correctly it makes more seekpoints if the file is piped in to Flac thats why the file is a little bigger. I'm sure there was a thread about it on HA.
If this is true, can reflacer offer the same option to not make an intermediate wav file, if we want the flac file to have more seekpoints?
If this is true, can reflacer offer the same option to not make an intermediate wav file, if we want the flac file to have more seekpoints?
You don't need to create more seekpoints, it just that when piping with foobar it creates more seekpoints than are needed.
If this is true, can reflacer offer the same option to not make an intermediate wav file, if we want the flac file to have more seekpoints?
You don't need to create more seekpoints, it just that when piping with foobar it creates more seekpoints than are needed.
Sorry if I seem clueless about this.
Are you saying foobar creates unnecessary seekpoints?
Sorry if I seem clueless about this.
Are you saying foobar creates unnecessary seekpoints?
Yes, but only when piping. If you set foobar to create an intermediate file instead of piping, the filesizes should match.
How about an option to encode to M4A keeping the tag & image file.
How about an option to encode to M4A keeping the tag & image file.
This has a few implications... I don't have anything against using other codecs/formats... I just didn't plan on including anything other than MP3 in the original script.
The problem I run into is that I'm limited in what I can do in a script and still be able to read and debug the code. In order to add the amount of code that would be required to suport multiple codecs, I'd really have to separate the code out into classes (Could be done in VBScript, but there isn't much point). I'd have to move the code to Visual Basic. If I did, I would still target the .Net Framework 2.0...
The whole point of VBScript was to allow for making tweaks here and there... if the community doesn't mind moving to an EXE (I would still use external EXEs for encoding, decoding, and tagging; I don't have any interest in trying to pull in external code), I can explore that.
I am currently working on some enhancements to run multiple scripts on a multi-processor/core machine and some tagging when encoding from a WAV based on directory/filenames.
Hi, I think this is great. It would be great if more codecs could be added as well. I do not know any VBScript, nor whether it would be feasible to maybe allow a user to supply his/her own encoder & command-line, similar to foobar?
I cooked up something in Autohotkey a while back, under XP, and am now using Vista so some day some re-coding. It transcodes mostly lossless. I have not really looked at a config file hmm configuration for something like this, but it really would work better as the user does what he likes, and it saves us from some decisions. I was also encodeing to mp3 and using Metamp3.exe.
To do multi-core encoding, I had only run two concurrent threads. Actually, three, which balanced out to two. This was pretty difficult to figure out, for me. I think a user could simply specify number of concurrent threads?
What I really liked, and might be nice in your app, is that I used a sort of title-formatting for output directories. It read (using TAG.exe) specified tags, such as 'year' or could provide the encoding date, etc, as part of the created directory structure. Maybe a good feature? I had also planned to allow option of copying other filestypes present, such as jpg/png. This is one of the main things I'd like to see in such a program, and would be simple. My mp3 from flac directory is lacking a lot of the album art due to my laziness in copying it.
I use dbpoweramp convertor some (quite a bit, actually) but I was able to provide for myself some special features this way, and copy those features from it which I like. Right now I really use foobar quite a bit.
I think TAK would be great for adding. If you decide to go that route. Anyway, you'd be welcome to see what it does as far as the directory-creation, if you like. Or I'm sure you'd have your own ideas.
Looking again at your notes, it looks like you've done some of my ideas already.
Thanks, and Respectfully,
Nice program. Wpuld it be possible to add a mode to convert Flac images with Cue to individual MP3 files?
You can already use a splitter for that (foobar, or Medieval Cue Splitter), then any converter (dBpowerAMP for instance) will do the FLAC->MP3 conversion of the generated files. All this takes just a few clicks.
You can already use a splitter for that (foobar, or Medieval Cue Splitter), then any converter (dBpowerAMP for instance) will do the FLAC->MP3 conversion of the generated files. All this takes just a few clicks.
Thanks!! Medieval Cue Splitter is just what I needed.
Damn this is exactly what I was looking for!
Couple of questions.
1. Is there any limit to the # of songs you can convert at once? Ive got around 50000 flac files that were all done previous to 1.2.1b.
2. Can the image resizer be used to take an existing folder.jpg and and change it to say 300X300? I tried last night but it did not seem to work. Maybe the imageresizer only resizes when imbedding into MP3?
Could someone quickly edit a CFG file to do those 2 things if its possible?
I just want to ReFLAC everything into the same directory, same output structure/name/tags using the best FLAC parameters for archiving and normalize all of my covert art into 300X300 images (or 250X250).
My folder structuce is E:\Music\Artist - Album\*.flac
Thanks!
P.S. You need a donate link
1. Is there any limit to the # of songs you can convert at once? Ive got around 50000 flac files that were all done previous to 1.2.1b.
No, that was one of the problems I had with other programs that performed a similar job. It's reading the directory structure as it goes to pick up the next file... no limit there
2. Can the image resizer be used to take an existing folder.jpg and and change it to say 300X300? I tried last night but it did not seem to work. Maybe the imageresizer only resizes when imbedding into MP3?
No, that's just a quick and dirty image resizer I built. Its only used when you're putting the image into an MP3. And based on the command line I built in, it can't name the image result file the same as the source. If I end up converting this to an EXE, the separate image resize program will go away. I may be able to add the image resize into a later version... give me an idea of what you're looking for...
I wouldn't touch images that are already in the FLAC file, just individual files that are in the directory. Would you specify something like the CopyFileMasks parameter to indicate the image files that should be resized, specify a max size... I wouldn't think you'd want to up-size images that are smaller that the one specified.
Could someone quickly edit a CFG file to do those 2 things if its possible?
I just want to ReFLAC everything into the same directory, same output structure/name/tags using the best FLAC parameters for archiving and normalize all of my covert art into 300X300 images (or 250X250).
Once you have the other exe files setup in the CFG file, it's ust a matter of changing the MODE=REFLAC and DIR=[your directory].
I'm not sure if you have a dual core/dual processor machine, if you do, you may want to wait a little while... I hope to release a "multi-threaded" (or as multi-threaded as I can get in VBScript) version in the near future.
No, that's just a quick and dirty image resizer I built. Its only used when you're putting the image into an MP3. And based on the command line I built in, it can't name the image result file the same as the source. If I end up converting this to an EXE, the separate image resize program will go away. I may be able to add the image resize into a later version... give me an idea of what you're looking for...
I wouldn't touch images that are already in the FLAC file, just individual files that are in the directory. Would you specify something like the CopyFileMasks parameter to indicate the image files that should be resized, specify a max size... I wouldn't think you'd want to up-size images that are smaller that the one specified.
I dont believe any of my art is saved into the FLAC tags. I only have a folder.jpg saved in each folder (roughly 4000 CD folders).
Id like to have some sort of uniformity to my covers. Some are 120X120, some are 300X300 and some are 500X500 or bigger (or much smaller in some cases). Some are as small as 4k where others are 200-700k. Id like them all to be say 250X250 and perhaps no more than 5-50k in size. Because some of the images are so large/big my music players sometimes take a while to load the thumbs. The covers alone together are a few hundred MB.
I was just going to use a batch image resizer for this, but I figured if ReFLAC could do it while Im reflacing everything, why not?
I may just spend some evening and try to find better cover art. Any suggestions on an automated program that can handle a lot of albums at once?
Thanks!
I'm not sure if you have a dual core/dual processor machine, if you do, you may want to wait a little while... I hope to release a "multi-threaded" (or as multi-threaded as I can get in VBScript) version in the near future.
Its a dual-core yes, but I plan for it to run overnight as its only a media server and not a general use machine.
I may just spend some evening and try to find better cover art. Any suggestions on an automated program that can handle a lot of albums at once?
I use Album Cover Art Downloader v1.6, it's home page is no longer available... I haven't tried it yet, but it looks like
AlbumArtDownloader XUI is a replacement for it written in .Net 3.0... it's available here: http://www.hydrogenaudio.org/forums/index....showtopic=57392 (http://www.hydrogenaudio.org/forums/index.php?showtopic=57392)
Use iTSfv. For getting crystal-clear artwork it's the best there is, period.
It also includes an AlbumArtDownloader XUI plugin to use only when iTSfv itself can't find the art.
There is a thread on it on HA forums.
Last but not least, McoreD, the developer of iTSfv, is just like the nicest guy on earth. Give it/him a try.
Reflacer v1.04 has been released, you can get it here: http://code.google.com/p/reflacer/ (http://code.google.com/p/reflacer/)
Here are the changes for this version:
03/08/2008 v1.04- MULTIPROCESSOR parameter added (jamesbaud)
- Fixed possible issue with comparison of directories when using DIR parameter
- Added ability to add FLAC tags when encoding based on Filename Mask and File
- TAGMASK parameter added (jamesbaud)
- TAGFILE parameter added (jamesbaud)
- Added report at the end of the run that shows counts of the operations performed
Running into a bug with the multiprocessor.
Reflacer.vbs(121, 20) (null): 0x80041014
If I comment out that line (Declares the variable objWMIService) and set the MultiProcessor toggle to 'N', the script works fine.
WinXP SP2. Running as an administrator. Using latest (1.04) reFLACer.
kmitch,
Thank you! This is a terrific program.
One question: could you incorporate an option to the ReFLAC mode that will simply overwrite the source file in the source directory, as opposed to putting the reencoded file in a new directory? (For example, as Synthetic Soul's script does.)
Thank you,
David
kmitch,
Thank you! This is a terrific program.
One question: could you incorporate an option to the ReFLAC mode that will simply overwrite the source file in the source directory, as opposed to putting the reencoded file in a new directory? (For example, as Synthetic Soul's script does.)
Thank you,
David
If you set the TARGETDIR to blank, or set the TARGETDIR = DIR, the file will be reflaced to the same filename.
If you set the TARGETDIR to blank, or set the TARGETDIR = DIR, the file will be reflaced to the same filename.
OK, that was easy. Again, thank you so much, this rocks.
I am using v1.04 of this excellent tool to upgrade about 200GB of 1.1.3 FLACs to 1.2.1 and have encountered a problem.
Some FLAC files are being skipped. It says they are being processed in the main output but the sub-window for the cores of my CPU are not processing all the files supposedly being allocated to that thread. The complete.lst file also skips the files.
A segment of my complete.lst reads:
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\02 - My Secret Bliss.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Aerosmith\Big Ones\16 - Dude (Looks Like A Lady) - Live.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\04 - Sene (Working The Land).flac
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\06 - Anatomic.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\03 - Mojave.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\05 - Beautiful Rain.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\07 - Mother.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Air\Talkie Walkie\01 - Venus.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\08 - Dhol Dogs.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Air\Talkie Walkie\02 - Cherry Blossom Girl.flac
D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\09 - Drake.flac
I have checked above and below this area of the log and there is no sign of the missing track 1 of the Anatomic album. The output file does not exist.
The main window outputs:
Create Folder F:\NewFLAC\A\Afro Celt Sound System
Create Folder F:\NewFLAC\A\Afro Celt Sound System\Anatomic
CP1: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\01 - When I Still Needed You.flac
CP1: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\02 - My Secret Bliss.flac
CP2: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\03 - Mojave.flac
CP1: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\04 - Sene (Working The Land).flac
CP2: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\05 - Beautiful Rain.flac
CP1: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\06 - Anatomic.flac
CP1: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\07 - Mother.flac
CP2: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\08 - Dhol Dogs.flac
CP2: D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\09 - Drake.flac
Copying D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\Afro Celt Sound System - Anatomic.m3u
Copying D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\Anatomic.CUE
Copyuing D:\Filez\Stuff\Music\Files\FLAC\A\Afro Celt Sound System\Anatomic\cover.jpg
But the core 1 window never processes track 1.
As I'm running on both cores of my AMD CPU it is completely hammering my system. Could it be this overloading causing it to skip? I have manually set the CSCRIPT.EXE process priorities to Low to improve the responsiveness of my system. It doesn't prevent files being skipped though.
Any ideas?
Some FLAC files are being skipped. It says they are being processed in the main output but the sub-window for the cores of my CPU are not processing all the files supposedly being allocated to that thread.
The "Multi-Threading" in that version is a very rudimentary attempt at multi-threading. I will be releasing a new version that has been rewritten in Visual Basic that is an executable in the next week or so. This new version doesn't add much as far as functionality goes, but it does use real multi-threading.
--K
does this transfer metadata like comments, album name, artist name etc?
does this transfer metadata like comments, album name, artist name etc?
Yes.
Hello.
Thank you for a great script.
I have one suggestion:
I use a folderstructure as following: X:\"Artist"\"Album"\"Track #". "Title"
Would it be possible to add an option for adding albumgain for all files in one folder when "reflacing"?
(I have several hundred "old" albums using old flac versions and not using albumgain)
Also, is it possible to make a log file for each folder after reflacing or recoding to Mp3?
Keep up the good work!
keep up the good work, can't wait for vb version!
Version 2.0 has just been released. This version is an executable Visual Basic program.
This version has the same functionality as the script, the only additional functionality is a tray icon. While it's processing, if you click on the icon, a status window will open, clicking it again will close the status window.
Enjoy!
http://code.google.com/p/reflacer/ (http://code.google.com/p/reflacer/)
I'm using vista 64-bit and version 2 hangs:
Searching D:\Music\#\!!!
D:\Music\#\!!!\2000 - !!!\01 - The Step.flac
I checked the folder it's encoding too and there's the temp file 01 - The Step.flac.tmp,fl-ac+en'c half way written, so it seems like it would be a problem with flac but this doen't happen with the vbs script version. So it's very confusing to me.
It'd also be great to bring FlacGetV.exe into the mix :-) for re-encoding.
Very nice idea. I also have a couple of VBScripts that I've developed and use for essentially the same thing. Like yours they utilize external EXEs - flac, metaflac, LAME, metamp3, touch.
I have mine as two different scripts:
2flac.vbs - Will "re-flac" Flacs, encode WAVs to Flac, and transcode APE files to Flac. I use it mostly to re-encode downloaded Flacs to my desired compression level and to transcode APEs. Integrated into Windows Explorer with a couple simple registry additions, just right-click the folder and select '2flac'.
flac2mp3.vbs - Transcodes Flac folder (or entire tree) to Mp3. Used for keeping a mirror Mp3 library of my Flac library for portable players. Unlike 2flac, which most often puts the output files in the same folder, flac2mp3 will have a separate output folder. I run it nightly to pick up any new or edited Flacs and mirror them in the Mp3 library. It examines file timestamps to determine if a Flac file is new or changed and it skips any where the Mp3 and the Flac have the same mtime.
- Tag v2.0.52 Makes use of Tag to identify and remove ID3v2 tags.
If this is for the Flac files, I found this wasn't necessary. I occasionally run into Flacs with id3v2 tags (damned EAC). If you attempt to use Flac's native re-encoding you'll get an error. But you can examine the program's exit code and then use the conventional (slower) process of decoding to WAV and then encoding the WAV to Flac.
' If installed Flac version is >= 1.1.3, use native re-encoding
If FlacVersion >= "1.1.3" Then
exitcode = shell.Run("""" & flac & """ " & flacoptions & " -f -s -o """ & ofile & """ """ & ifile & """", 0, True)
End If
' If older Flac version, or if the above attempt failed, use old method
If (FlacVersion < "1.1.3") Or (exitcode <> 0) Then
Set tags = GetFlacTags(ifile)
tmpwavfile = fso.BuildPath(fso.GetParentFolderName(ofile), fso.GetBaseName(ofile) & ".wav")
exitcode = shell.Run("""" & flac & """ -d -f -s -o """ & tmpwavfile & """ """ & ifile & """", 0, True)
Wav2Flac tmpwavfile, ofile, tags
End if
I just tried out version 2 and it crashes on my system (Vista 32 SP1). Reflacer.exe opens but I immediately get a "Reflacer has stopped working" error and I have to end it. I tried running with administrator priveleges, and running under compatibility modes with previous Windows version, to no avail...
This is with the same script I use with 1.04, which works great.
Thanks
david
I just tried out version 2 and it crashes on my system (Vista 32 SP1). Reflacer.exe opens but I immediately get a "Reflacer has stopped working" error and I have to end it. I tried running with administrator priveleges, and running under compatibility modes with previous Windows version, to no avail...
This is with the same script I use with 1.04, which works great.
Thanks
david
I don't have a PC with Vista, so I don't have a way to debug the issue you're encountering.
I really appreciate the work put into this tool.
That being said, I think a problem that FLAC has is that there is no dedicated GUI tool for more casual users to use. The closest thing is the FLAC Frontend which is very outdated and doesn't allow any FLAC->FLAC actions (updating version, adding replaygain, etc).
I believe it was asked earlier in the thread, but are there any plans to add albumgain to a folder with existing FLAC files? (see post 31)
thanks for the cool script/app.
i have Vista 32-Bit and had issues with v2.0 as well. it locks up randomly during file processing and errors out randomly.
i've been playing with 1.04 for a week or so, which works fine as long as I turn parallel processing off.
i have a lot of custom tags in my flac files that i've been unsuccessful in getting reflacer/metamp3 to work correctly. however i'm not really concerned that much, because i can easily use Mp3Tag to manually copy/paste the flac tags to the mp3 files.
what i'm curious about is if there would be an easy way to manually edit the script to turn off the v1.04 script's tag read/write parsing and the image resizing functionality?
an even better option would be if you could consider it as an option in the reflacer.cfg file?
in effect, what i'm trying to do is use your script or exe to strictly parse the directory structure, doing only the flac to mp3 transcoding plus the "additional file masks to copy". skipping the tag processing entirely.
i have a lot of custom tags in my flac files that i've been unsuccessful in getting reflacer/metamp3 to work correctly. however i'm not really concerned that much, because i can easily use Mp3Tag to manually copy/paste the flac tags to the mp3 files.
Which tags exactly? You can't get them to work by adding information to the Reflacer.tag file?
what i'm curious about is if there would be an easy way to manually edit the script to turn off the v1.04 script's tag read/write parsing and the image resizing functionality?
an even better option would be if you could consider it as an option in the reflacer.cfg file?
in effect, what i'm trying to do is use your script or exe to strictly parse the directory structure, doing only the flac to mp3 transcoding plus the "additional file masks to copy". skipping the tag processing entirely.
One of the things you can try is to comment out the path to the Tag program (TagProgram) by adding a ' to the beginning of the line. This should keep it from performing any tag processing. The other thing you could do is leave Reflacer.tag empty, or place some tags in the file that don't exist in your FLAC files.
v2.01 has just been released on Google Code: http://code.google.com/p/reflacer/ (http://code.google.com/p/reflacer/)
Here's what was fixed/added with this version:
== 08/06/2008 _v2.01_ ==
* Fixed ReFLAC lock up bug
* Fixed early exit (before all operations were complete)
* Fixed issue where FLAC results weren't written to screen/log
* Added FLACReplayGain parameter and functionality
Check out the Reflacer.txt file for more information/limitations of FLACReplayGain. I may have to think about adding a FLACReplayGain mode, but that would be more involved.
cool...
sorry, i missed your reply to my post on the 28th. i definitely appreciate the reply.
i did try adding the tag types i use to the reflacer.tag file and didn't have much luck.
specifically it was having trouble with multi-value tags, i use tags like "style", "mood", "situation" (theme), etc
they normally have multiple txxx frames for the same tag name with different values.
if i remember correctly it had some trouble with tags i added with spaces in the name, such as a TXXX for "Album Artist" which is fairly common for foobar2000 users.
i did mess around with a bunch of different variations in the reflacer.tag file, the only ones i could get to work reliably were the default tag frames that you provided.
tag.exe was able to read the tag frames properly when i ran it manually on my test files from the command line.
i was able to stop the image resizing simply by commenting it out, if it doesn't work i'll do the same for the tagging.
either way, i'll try the new version tonight or tomorrow to see if it works better with vista.
just got a chance to try v2.01 on my Vista 32-bit build, I still ran into the random lockup's during the decode step, it looked like something happened with flac.exe near the end of the file. if i ended the flac.exe process, the reflacer.exe console window would dump a bunch of status txt and say decode failed, then move on to the next file.
I think I was able to resolve it by adding the following parameter to the cfg:
' flac parameters to use for decoding
FLACDecodeParams=--force --decode --totally-silent
Since adding the --totally-silent option, I have successfully tested 2 runs with 7 albums and 93 flac's. Once using the MultiProcessor=Y option and once using the MultiProcessor=N modes.
I'll try to test more and provide additional feedback. Any way to turn on a debug option to see what's happening in the background when it fails?
just got a chance to try v2.01 on my Vista 32-bit build, I still ran into the random lockup's during the decode step, it looked like something happened with flac.exe near the end of the file. if i ended the flac.exe process, the reflacer.exe console window would dump a bunch of status txt and say decode failed, then move on to the next file.
I think I was able to resolve it by adding the following parameter to the cfg:
' flac parameters to use for decoding
FLACDecodeParams=--force --decode --totally-silent
Since adding the --totally-silent option, I have successfully tested 2 runs with 7 albums and 93 flac's. Once using the MultiProcessor=Y option and once using the MultiProcessor=N modes.
I'll try to test more and provide additional feedback. Any way to turn on a debug option to see what's happening in the background when it fails?
Not really. I think the code is locking up in the call to FLAC.exe. When it locks up, can you see flac.exe running, but taking up no CPU? When I launch flac, I'm creating a hidden window and attaching to the STDERR and STDOUT streams from the command. This is what was causing the issue with reFLACing files, but I didn't experience an issue with MP3s/decodes.
I got around the issue for reflacing by piping STDOUT and STDERR to a temporary file. Can you try running the same process to reflac without version skipping and let me know if you experience any lock ups? While that process is running, you'll see a file in the TEMP directory with the output from the process. I may have to switch all of my external calls to this way of capturing the output.
Not really. I think the code is locking up in the call to FLAC.exe. When it locks up, can you see flac.exe running, but taking up no CPU? When I launch flac, I'm creating a hidden window and attaching to the STDERR and STDOUT streams from the command. This is what was causing the issue with reFLACing files, but I didn't experience an issue with MP3s/decodes.
I got around the issue for reflacing by piping STDOUT and STDERR to a temporary file. Can you try running the same process to reflac without version skipping and let me know if you experience any lock ups? While that process is running, you'll see a file in the TEMP directory with the output from the process. I may have to switch all of my external calls to this way of capturing the output.
Yes, I think that may be the answer. flac.exe definitely locks with 0% CPU.
here's the results of my testing:
ReFLAC mode w/o the "--totally-silent" option:
v2.00 - same lock up's as MP3 mode
v2.01 - successfully processes all files, but errored out after final file was processes
v2.02alpha - successfully processes all files and closes without any errors
MP3 mode w/o the "--totally-silent" option:
v2.01 & v2.02alpha flac.exe lock's up
MP3 mode w/ the "totally-silent" option:
v2.01 & v2.02alpha successfully complete
So, maybe by piping the STDOUT & STDERR to txt files for MP3 mode will solve the problem.
Reflacer v2.02 has been released here (http://code.google.com/p/reflacer/). I know it hasn't been that long since the previous version was released, but I wanted to correct the issues users were having with multi-processor processing.
Below are the things that were added or fixed in this version:
== 08/14/2008 _v2.02_ ==
* Added FLACReplayGain as an option for the MODE parameter
* Will now skip FLACReplayGain if Synchronize=Y and all files already contain Replay Gain
* Added FLACRGParams parameter for metaflac replay gain parameters
* Fixed a issue that could cause cross-thread contamination
* Fixed bug in Resize code that would cause errors if the original image was smaller than desired size
* Added PAUSE parameter
* Fixed bug that caused an error when process completes and GUI status window is open
How do I use this program exactly? I've edited the config file, run the .exe and it's giving me critical errors.
What are the basics that I need in a config file to reflac all my FLAC's to the latest version? There's a hell of alot of options in the default config it's confusing.
I'm getting an error when running the .exe: "The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.
How do I use this program exactly? I've edited the config file, run the .exe and it's giving me critical errors.
What are the basics that I need in a config file to reflac all my FLAC's to the latest version? There's a hell of alot of options in the default config it's confusing.
Make sure you have downloaded the other programs first (flac/metaflac, tag, metamp3, lame). Either put them within the relfacer folder structure or point the config file parameters to them somewhere else:
- FLACProgram=%ScriptDir%\FLAC\bin\flac.exe
- MetaFLACProgram=%ScriptDir%\FLAC\bin\metaflac.exe
- TagProgram=%ScriptDir%\Tag\Tag.exe
- Metamp3Program=%ScriptDir%\metamp3\metamp3.exe
- LAMEProgram=%ScriptDir%\lame\lame.exe
Then choose the mode:
Choose the directory you want to read (or the filelist or file): ** Only do one and comment out the others with an apostrophe ' ** (If your directory has spaces, I'm not sure if you are supposed to put quotes around or not...I couldn't get it to work like that, so I moved my root music directory to one with no spaces.)
- Dir=C:\Music
- 'FileList=
- 'File=
Choose the target directory, where you want the files to be saved: (blank means copy to the same directory...assuming if you are reflacing, it will overwrite...I have only done 'mp3' and 'decode' modes)
Everything else can be left alone if you want, or you can tweak them, but the ones above are the ones you need to primarily look at/change.
Hope that helps!
First of all, I think this program is awesome! It is extremely helpful. I am about to go through and archive all of my CDs on my home computer (I have ripped to mp3 or wma before, but I want a real archive). However, for my laptop, I wanted to have mp3 or wma (didn't care) copies [storage issue]. I have used several conversions tools before, but nothing that moved tags across...I love my tags and my album art!
That being said, I have one problem I'm running into with tagging--specifically with the album art. I have flac'd a couple of CDs for testing. I have all of the tags in there, as well as album art embedded into the flac file. When I run reflacer in mp3 mode, it all runs as expected and tags as expected, EXCEPT I get the following error message in the log:
1-ERROR: you may only specify one FLAC file when using '--export-picture-to'
I have tried using DIR as well as FILE and have had no luck. The files convert to mp3 and all the tags are there, except the album art.
I have embedded the images into the flac file using MediaMonkey. They are listed as cover art, so I put 'FLAC:3' in the config file. I have tried all the following lines:
- ImageSource=File:folder.jpg|File:.folder.png|FLAC:3
- ImageSource=FLAC:3
- ImageSource=FLAC:0 (When I use this one, I don't get the error, but I don't get the picture, so I'm guessing that FLAC:3 is correct.)
Any help is appreciated.
I think I found my issues, I didn't have .NET framwork installed.
Version 2.03 has been released.
== 09/13/2008 _v2.03_ ==
* Fixed bug when resizing images in MP3 mode
* Rewrote code to allow FLACReplayGain to use multiple processors
This version fixes the issue that smw was encountering.
Kmitch, thank you very much for this script!
I have two questions:
(1) Is it possible to force reflacer to update the date and time of the reflac'd files? If so, how?
(2) I seem to be having trouble with some long directory names in the .cfg. Should directories with spaces include "" around them?
Thank you.
Apparently the script has a problem with certain non-FLAC files when reflac'ing. When the script encountered an .MKV file just now on my system, it gave an unhandled exception error and stopped:
Unhandled Exception: System.Data.ConstraintException: Column 'SrcDirectory, SrcF
ilename' is constrained to be unique. Value 'C:\Downloads\! Keep\Sample (Seaso
n 3), Episode 06.mkv' is already present.
at System.Data.UniqueConstraint.CheckConstraint(DataRow row, DataRowAction ac
tion)
at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRo
w eRow, DataRowAction eAction, Boolean fireEvent)
at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord
, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Ex
ception& deferredException)
at System.Data.DataTable.InsertRow(DataRow row, Int32 proposedID, Int32 pos,
Boolean fireEvent)
at System.Data.DataRowCollection.Add(DataRow row)
at Reflacer.DSetControl._AddFileToTable(String Filename)
at Reflacer.ProcessMaster.ProcessFolder(DirectoryInfo Folder)
at Reflacer.ProcessMaster.ProcessFolder(DirectoryInfo Folder)
at Reflacer.ProcessMaster.ProcessFolder(DirectoryInfo Folder)
at Reflacer.ProcessMaster.ProcessFiles()
at Reflacer.Reflacer.Main(String[] CommandLineArgs)
Any ideas?
A different Windows x64 installation gave me this error today with Reflacer:
Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: reflacer.exe
Problem Signature 02: 2.3.0.0
Problem Signature 03: 48c140f3
Problem Signature 04: System.Data
Problem Signature 05: 2.0.0.0
Problem Signature 06: 47577a33
Problem Signature 07: 7f6
Problem Signature 08: 29
Problem Signature 09: System.InvalidOperationException
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 1033
Does Reflacer work on Vista x64?
(1) Is it possible to force reflacer to update the date and time of the reflac'd files? If so, how?
No, the only time date/times are modified are if you create MP3s, Reflacer uses the time stamp to determine if changes have been made to the FLAC file to re-encode the MP3 in synchronize mode.
(2) I seem to be having trouble with some long directory names in the .cfg. Should directories with spaces include "" around them?
No, the program should place the quotes around the filenames when calling FLAC. Long directory names could cause issues if they cause the command to be too long for windows to handle.
Apparently the script has a problem with certain non-FLAC files when reflac'ing. When the script encountered an .MKV file just now on my system, it gave an unhandled exception error and stopped:
Looks like a bug, I've got a few more to address that were posted on Google Code, but am working on another project at the moment. When I get that one stable, I'll take another look at Reflacer.
Does Reflacer work on Vista x64?
I don't have a Vista x64 environment to test in. I can't really tell from the error message where the problem might lie.
Hello,
I just did a test and ReFLAC'ed a directory of files I had previously clean ripped with EAC+FLAC (just to see if there would be any differences) I received the error shown in the attached screen shot.
Hope this helps.
Thanks!
(http://img105.imageshack.us/img105/1995/screenshot1232613891sa2.png)
hmmm, just reripped and tried again and this time ReFLACer completed normally. Weird.
Hmm, I've tried this again and it crashes....MSs error says something about system.io directory not found but there's nothing in the log file.
Any thoughts? Rogue characters or something??
This is still crashing....it crashes whether in Test or ReFLAC. It only happens on certain files but isn't writing anything useful to the logs....any ideas?
The songs themselves play fine.
Hey everyone,
is there a single executable that allows a user to simply drag-and-drop a folder of FLAC files onto and get a folder of mp3s in V0-2 quality? I know Foobar is a great way to take care of conversions but it's not ideal for an elderly friend of mine... .
Thanks.
Hey everyone,
is there a single executable that allows a user to simply drag-and-drop a folder of FLAC files onto and get a folder of mp3s in V0-2 quality? I know Foobar is a great way to take care of conversions but it's not ideal for an elderly friend of mine... .
Thanks.
Try File Blender (http://sector-seven.net/software/fileblender)?