PDA

View Full Version : Converting FLAC into mp3s



max.spicer
2005-04-11, 13:36
What's the easiest way to convert from FLAC to MP3s on Linux (Debian Sarge)? I have music stored in FLAC format that I need a separate copy of in MP3 format for a portable device. A solution involving something like 'flac -d <file> | <good mp3 encoder>' would do as I could then script it, but the ideal world be a tool where I could say "Oy, you! Take these flac files and put them here as mp3s would you? There's a good chap!" Command-line is another requirement as my box doesn't run x and has no head.

Ta muchly!

PS It's too late for whatever that encoder it is that encodes to multiple formats - I've done my ripping.

JJZolx
2005-04-11, 16:55
What OS does your personal machine run? Just because the music server is running Linux doesn't mean the conversion needs to be done there. So long as you can access the directories from a Windows box.

I'm in the process of developing a Windows VBS script, "flac2mp3.vbs" that will be run from the command line and can mirror a flac file, complete directory, or entire directory tree to files in mp3 format. It uses flac.exe and then metaflace.exe (to extract tag info) and lame.exe.

If your server runs Linux, but you have a Windows machine on the network then this might be feasible for you. There are undoubtedly also other existing options for you if you do the conversion on a Windows machine.
________
silver surfer reviews (http://vaporizer.org/reviews/silver-surfer)

Pat Farrell
2005-04-11, 19:01
On Mon, 2005-04-11 at 13:36 -0700, max.spicer wrote:
> What's the easiest way to convert from FLAC to MP3s on Linux (Debian
> Sarge)? I have music stored in FLAC format that I need a separate copy
> of in MP3 format for a portable device. A solution involving something
> like 'flac -d <file> | <good mp3 encoder>' would do as I could then
flac -d * | lame -
will work just fine
What else do you need?

You might want to look at my flac2mp3.pl file
on http://www.pfarrell.com/music/slimserver/slimsoftware.html
it handle wildcards and a couple of extra stuff, nothing
that you can't do with shell commands, but it does make it easier

Pat


--
Pat pfarrell (AT) pfarrell (DOT) com
HTTP://www.pfarrell.com

max.spicer
2005-04-12, 02:03
What OS does your personal machine run? Just because the music server is running Linux doesn't mean the conversion needs to be done there. So long as you can access the directories from a Windows box.
My main personal machine is XP. I do run Samba on the server so can indeed access shares from the PC. However, my server is on all night, has two processors and does nothing. I'm also unconvinced about the need to transfer almost 100GB of data across the network and back (although it would be done at night so I guess it doesn't really matter).

max.spicer
2005-04-12, 02:05
flac -d * | lame - will work just fine
What else do you need?
I'm guessing that that wouldn't preserve metadata.

pfarrell
2005-04-12, 08:27
On Tue, 2005-04-12 at 02:05 -0700, max.spicer wrote:
> Pat Farrell Wrote:
> > flac -d * | lame - will work just fine
> > What else do you need?
> I'm guessing that that wouldn't preserve metadata.

true.

You would need some combination of metaflac to extract the data
and whatever id3 tagger you like for reinserting it.

--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

rramstad
2005-04-21, 16:48
If you run Linux, or want to run Cygwin/X with Perl on Windows, this software is getting pretty useful...

http://www.seatofthepants.net/?_d=_s2

It does three things that are really useful... first, it will copy most tags from FLAC to mp3 when doing the initial transcoding. Second, if the file hasn't changed, it doesn't do anything. (Some scripts will just always convert everything in a given directory.) Third, it will check to see if just the tags have changed, and if so, just update the tags (not do the conversion again).

It has some shortcomings, notably if a directory is moved, or deleted, there can be stuff in the mp3 output directory which isn't really supposed to be there... but it does about 90% of what I need a script to do...