Help - Search - Members - Calendar
Full Version: Reflacer
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
kmitch
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 Log

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.00
  • Initial release
The home page for the software is on Google Code.
kmitch
Original discussions of Reflacer are here:
http://www.hydrogenaudio.org/forums/index....showtopic=50993
rubix
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.
kmitch
QUOTE(rubix @ Feb 28 2008, 04:35) *

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

QUOTE(rubix @ Feb 28 2008, 04:35) *

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.
jamesbaud
QUOTE(rubix @ Feb 28 2008, 01:35) *

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
A_Man_Eating_Duck
QUOTE(rubix @ Feb 28 2008, 22:35) *

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.
jamesbaud
QUOTE(A_Man_Eating_Duck @ Feb 28 2008, 14:26) *

QUOTE(rubix @ Feb 28 2008, 22:35) *

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?
A_Man_Eating_Duck
QUOTE(jamesbaud @ Feb 29 2008, 11:35) *
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.
jamesbaud
QUOTE(A_Man_Eating_Duck @ Feb 28 2008, 15:02) *

QUOTE(jamesbaud @ Feb 29 2008, 11:35) *
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?
A_Man_Eating_Duck
QUOTE(jamesbaud @ Feb 29 2008, 12:05) *
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.
tylast
How about an option to encode to M4A keeping the tag & image file. wink.gif
kmitch
QUOTE(tylast @ Feb 28 2008, 19:12) *

How about an option to encode to M4A keeping the tag & image file. wink.gif


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.
noorotic
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. blink.gif smile.gif 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. smile.gif 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. smile.gif 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,
bilbo
Nice program. Wpuld it be possible to add a mode to convert Flac images with Cue to individual MP3 files?
Jose Hidalgo
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.
bilbo
QUOTE(Jose Hidalgo @ Mar 3 2008, 10:40) *

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.
Tirade
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 smile.gif
kmitch
QUOTE(Tirade @ Mar 4 2008, 07:39) *
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

QUOTE(Tirade @ Mar 4 2008, 07:39) *

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.

QUOTE(Tirade @ Mar 4 2008, 07:39) *

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.
Tirade
QUOTE(kmitch @ Mar 4 2008, 14:00) *


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? smile.gif

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!

QUOTE

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.
kmitch
QUOTE(Tirade @ Mar 4 2008, 14:50) *

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
Jose Hidalgo
Use iTSfv. For getting crystal-clear artwork it's the best there is, period. cool.gif

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. wink.gif
kmitch
Reflacer v1.04 has been released, you can get it here: 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
Heliologue
Running into a bug with the multiprocessor.

CODE

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.
dagordon
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
QUOTE(dagordon @ Mar 10 2008, 16:23) *

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.
dagordon
QUOTE(kmitch @ Mar 10 2008, 20:22) *

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.
mattross
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?
kmitch
QUOTE(mattross @ Apr 12 2008, 12:58) *

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
CoyoteSmith
does this transfer metadata like comments, album name, artist name etc?
kmitch
QUOTE(CoyoteSmith @ Apr 23 2008, 07:39) *

does this transfer metadata like comments, album name, artist name etc?


Yes.
Balnes
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!
likeatree
keep up the good work, can't wait for vb version!
kmitch
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/
likeatree
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.
JJZolx
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.

QUOTE(kmitch @ Feb 22 2008, 20:12) *

[*]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.

CODE

    ' 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
dagordon
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
kmitch
QUOTE(dagordon @ Jul 2 2008, 18:42) *

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.
agentk7
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)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.