Skip to content

Instantly share code, notes, and snippets.

@mxcl
Created June 5, 2009 11:28
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save mxcl/124242 to your computer and use it in GitHub Desktop.
Save mxcl/124242 to your computer and use it in GitHub Desktop.
Simplest functional FLAC to MP3 converter script you can make
@mxswd
Copy link

mxswd commented Sep 12, 2011

So some flac files don't have a genre.

I changed args to

args=%Q[--tt "#{TITLE}" --ta "#{ARTIST}" --tl "#{ALBUM}" --tn "#{TRACKNUMBER}"]
args += "--tg \"#{GENRE}\"" if defined?(GENRE)

This might be useful.

@dhinus
Copy link

dhinus commented Feb 22, 2012

I merged the change by maxpow4h, and found out it was missing a space.
The second line should be:

args += " --tg \"#{GENRE}\"" if defined?(GENRE)

@mxcl
Copy link
Author

mxcl commented Feb 22, 2012

Thanks, merged.

@teoljungberg
Copy link

What is the output mp3 bitrate?

@mxcl
Copy link
Author

mxcl commented Feb 22, 2012

--alt-preset standard is high bitrate VBR with bells and whistles. Read the manpage for details.

@dhinus
Copy link

dhinus commented Feb 22, 2012

There's a very good page on LAME bitrates here:
http://wiki.hydrogenaudio.org/index.php?title=LAME

Personally I use -V2 that is just the new syntax for --alt-preset standard

@msoap
Copy link

msoap commented Mar 25, 2012

I fixed --tl option for album tag (was --t1)
and added --ty for year tag

https://gist.github.com/2193212

@rayray
Copy link

rayray commented Jun 27, 2012

Fixed album option (as noted by msoap) and added options for V2..V0 and 320CBR. Made the default V0.

https://gist.github.com/2998853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment