Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simplest functional FLAC to MP3 converter script you can make
@mxswd

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Owner Author

mxcl commented Feb 22, 2012

Thanks, merged.

@teoljungberg

This comment has been minimized.

Copy link

teoljungberg commented Feb 22, 2012

What is the output mp3 bitrate?

@mxcl

This comment has been minimized.

Copy link
Owner Author

mxcl commented Feb 22, 2012

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

@dhinus

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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
You can’t perform that action at this time.