Help - Search - Members - Calendar
Full Version: Convert FLAC to MP3 via Windows Explorer
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
sizetwo
So this is what I need:

I have my collection as FLAC, in folders named in the following way: Artist - Album (year).

I use Total Commander for all my file organizing needs, and I would like a way to be able to select a large amount of folders, right click, and in the menu that comes up choose to transcode to MP3, choose a new root folder, and output the new folders with the transcoded MP3 files maintaining the folder structure that the original FLAC folders were.

The reason for this is because my car stereo supports only MP3 files on a CD but not FLAC. Also, using Foobar for this is not optimal, as the folder-output is a hassle in that I have to choose a new one for each folder/album.

Is there anything out there, or does anyone have any hints on the best way of doing this ? Keep in mind, it needs to be able to process a lot of folders, without me having to specify the output folder for each album.

Thanks

garym
DbPowerAmp can do all this (call conversion from context menu within explorer and put mp3 files in any sort of directory format you choose). It can do this with your entire FLAC collection without the need for intervention on each album. I simply point at the directory containing all my FLAC subdiretories (artist/album), tell it to convert, and dbpa creates mp3 files (lame) in separate, identically organized directories.
Synthetic Soul
QUOTE(sizetwo @ Jun 8 2008, 13:16) *
Also, using Foobar for this is not optimal, as the folder-output is a hassle in that I have to choose a new one for each folder/album.
Not true. You can do a $replace() on the source path to use the same folder structure on a different root folder.
ech3
I don't have an answer for you about the Windows shell, but I have a very similar setup: flac collection but I need mp3 files for my portable drive (or my car).

This is the method I use to convert my entire collection to mp3 while maintaining the directory structure.

I always convert files from my large USB drive to my portable USB drive. So you may have to change this method slightly if you're using the same drive.

Run this command from the root directory of your flac collection. It copies the entire directory structure (to F:) but doesn't copy any files:

D:\> xcopy *.* "F:\" /T /E

Put this next command into a file "flac2mp3.cmd" and save it anywhere in the path (I save it to c:\windows).

FOR /R %%I IN (*.flac) DO flac -d -c "%%I" | lame -V 5 --vbr-new - "F:%%~pI%%~nI.mp3"

Then open a cmd prompt, change to the root directory of your flac collection and run flac2mp3.

This will recursively sweep through your FLAC collection and convert it to mp3 in the same directory name on the destination drive (F:). Don't forget to change the lame parameters to whatever you want.

This may be tricky if you're using a different directory on the same drive. I've never tried that so I don't know what will happen. The command is written so that the source directory and the destination directory are identical except for the drive letter. You could try replacing the F: with D:\MP3_FILES.
sizetwo
@ech3 and garym: Thanks for tips. I dont mind working in DOS, but Ill check out the options DbPowerAmp offers, and might just become a customer if it does what I need it to do.

Also thanks for pointing out that Foobar can handle the task if needed.
Alexxander
QUOTE(Synthetic Soul @ Jun 8 2008, 15:02) *
QUOTE(sizetwo @ Jun 8 2008, 13:16) *
Also, using Foobar for this is not optimal, as the folder-output is a hassle in that I have to choose a new one for each folder/album.
Not true. You can do a $replace() on the source path to use the same folder structure on a different root folder.
Or just use %directory%, %directoryname% or function $directory(x,n) in converter Output File Names, for example %directory%\%filename% or %directory%\%track - %title% You only have to select ones the output folder, right at the conversion start.
Synthetic Soul
Those would be fine if you only needed to know the parent, or the lowest N directories; however, if your structure changes - e.g.: if there is a multidisc album - then I would suppose that you'd have to be careful.
sizetwo
@Synthetic Soul: Yeah I noticed that also. Either way I bought dbpoweramp (sure spoon is happy) and it does look like it does the job pretty nicely. Although I have some caveats about how the user interface is built up as well as a few other things, but thats for another thread. I guess my question have been solved for now.
smok3
it is possible to write cli batches suitable for total commander that will for example consider right pane as input and left pane as output, however the win cmd can be a big burden with some weird charsets... (and there would probably be additonal problems with metadata)
greynol
I wrote a batch script that transfers tags over to id3v2 using tag.exe if anyone is interested:
CODE
tag %1 2> "%~1.tag"
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Title:" "%~1.tag"`) DO (
SET title=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Artist:" "%~1.tag"`) DO (
SET artist=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Album:" "%~1.tag"`) DO (
SET album=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Year:" "%~1.tag"`) DO (
SET year=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Track:" "%~1.tag"`) DO (
SET track=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Genre:" "%~1.tag"`) DO (
SET genre=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Comment:" "%~1.tag"`) DO (
SET comment=%%Y
)
DEL "%~1.tag"
SET PARAMS=--add-id3v2 --ignore-tag-errors --tt "%title%" --ta "%artist%" --tl "%album%" --ty "%year%" --tn "%track%" --tg "%genre%" --tc "%comment%"

Simply call the batch from within a script used to transcode the file to lame and pass the name and location of the source. It will return the portion of the line to be used to the global variable %PARAMS%.

Synthetic Soul
QUOTE(sizetwo @ Jun 8 2008, 19:24) *
@Synthetic Soul: Yeah I noticed that also. Either way I bought dbpoweramp (sure spoon is happy) and it does look like it does the job pretty nicely. Although I have some caveats about how the user interface is built up as well as a few other things, but thats for another thread. I guess my question have been solved for now.
As you mentioned Explorer integration I think dbPowerAmp was the obvious choice in this situation. I just thought it best to clarify the facts about foobar's potential here, rather than leaving incorrect or unclear statements hanging as valid reasons.
thebrassbrazilian
i am trying to convert flac files to mp3 but when i do the genre does not show up. How do i make the genre show when converting flac to mp3?
stephentw
Folks seem to recommend dbpoweramp for this task a lot and before I buy it I'm wondering if it does exactly what I want, I know it does the directory structure stuff I'm just concerned about the things below other programs seemed to have done and I hope dbpoweramp won't:

I've tried using xrecode but that only seems to support id3v1 which cuts my tags some of the time due to length restrictions.

Tried lamedropxpd which seems pretty cool but only processes a folder at a time so I'd have to manually drop everything onto it and that would take forever.

Tried foobar and that seemed to do something odd, it worked fine but didn't seem to use the same bitrate as the others despite having the same settings (v0) it encoded at a lower bitrate and the filesize was smaller whereas on the other 2 it was identical in both (I know I should be glad of the smaller file but with me using the same settings I'm worried something has gone wrong). I'm wondering if I'm using the wrong version of lame perhaps?
Roseval
Instead of converting you might have a look at transcoding.
This means you select the songs you want to transfer to a MP3 player and the conversion is done on the fly. No need to maintain 2 identical collections in 2 different formats.
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.