Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Help me with a batch script for WAV and FLAC to MP3 conversion (Read 5915 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help me with a batch script for WAV and FLAC to MP3 conversion

I would like to have a batch script for converting wav and flac files to mp3 using preset lame switches, copy flac tags and put the resulting files in a folder within the original folder. I'd also like to be able to just drag a folder or file on top of that script to execute it.

Is that something that can be done? If it is, could someone at least make me an outline of such script?

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #1
I would do that with foobar2000.

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #2
I know, but I'd prefer to do it without any software, just a batch script

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #3
What OS?

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #4
flac -d *.flac

for f in *.wav; do lame -V 0 "$f" "${f%.wav}.mp3"; done

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #5
Win 7.

And how about keeping tags? I suppose I need metaflac for that?

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #6
No clue. I use foobar.

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #7
I was going to say that little script wouldn't preserve tags.

Only thing I can think of really quick is use metaflac to read tags, parse and store them in variables, then use flac to decode and pipe to lame called with those tags defined on it's command line.

I could write that if I cared enough, but I rarely use mp3 and if I do I generally batch convert using soundconverter or soundkonverter.


Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #9
OK, I've found these FLAC Transcoder scripts and edited them to work with latest lame and recommended compression settings and it works really well.
The only problem is that LAME just won't use UTF-16 encoding in tags even when I add "--id3v2-only --id3v2-utf16" as switches.

Help me with a batch script for WAV and FLAC to MP3 conversion

Reply #10
Is there a way to specify to write image as front cover when using --ti "file" switch?
By default it saves it as "other".