PDA

View Full Version : OT: flac to mp3 driver script



Pat Farrell
2004-05-27, 11:19
This is not rocket science, but since flac comes up as
a vastly better compression scheme than mp3, and
since some folks like mp3s to feed personal players,
burn compliation CDs, etc. it is handy
to convert from flac to mp3.

If you want to do just one, and then create the MP3s on the fly, it is
easy, just run flac and lame together. The appropriate command is:

flac -dcs input.flac | lame --silent --tt "TrackName" --resample
44100 - output.mp3

Which is pretty simple, but doesn't do wild cards, and I never can remember
the proper switches, etc. So I wrote a perl script to drive this command.
See flac2mp3.pl
on my http://www.pfarrell.com/music/slimsoftware.html open source tools
page. It handles wildcards and can send output to a specified
directory. Its only about 10 lines of Perl, outside the documentation
and argument parsing. No rocket science, but handy.

Pat

John Harding
2004-06-13, 12:39
I've got a similar perl script set up, to transcode my source flac files to mp3 for an iPod, but it's meant to keep entire directory trees in sync, as well as convert flac tags to mp3 tags. When I get it cleaned up a bit, I'll make it available for people to grab as well - the nice thing is it does incremental updates, so if I rip a new CD to flac, it only converts that new set of flac files to mp3.

Main thing that bothers me is the limit on genre names imposed by lame.

-John
----- Original Message -----
From: Pat Farrell
To: discuss (AT) lists (DOT) slimdevices.com
Sent: Thursday, May 27, 2004 11:19 AM
Subject: [slim] OT: flac to mp3 driver script


This is not rocket science, but since flac comes up as
a vastly better compression scheme than mp3, and
since some folks like mp3s to feed personal players,
burn compliation CDs, etc. it is handy
to convert from flac to mp3.

If you want to do just one, and then create the MP3s on the fly, it is easy, just run flac and lame together. The appropriate command is:


flac -dcs input.flac | lame --silent --tt
"TrackName" --resample 44100 -
output.mp3

Which is pretty simple, but doesn't do wild cards, and I never can remember the proper switches, etc. So I wrote a perl script to drive this command. See flac2mp3.pl
on my http://www.pfarrell.com/music/slimsoftware.html open source tools
page. It handles wildcards and can send output to a specified
directory. Its only about 10 lines of Perl, outside the documentation
and argument parsing. No rocket science, but handy.

Pat



------------------------------------------------------------------------------