Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Free command-line MP3 encoder UNIX
In case some of you didn't know, OSX users have access to the latest and greatest in MP3 encoding software - LAME ... absolutely free! Just download the latest version from CVS or simply get the latest daily release. After downloading, just decompress the archive, switch to the terminal and change to the directory of the source, type "su" to become root, then do:
./configure
make
make install
Then type 'rehash' or restart the term and that's all! For help using LAME, use the command lame --longhelp. For very high quality mp3s (see www.r3mix.net), use the command:
lame --r3mix -q0 --id3v2-only --tt "[insert title here]" --ta "[insert artist here]"[space]
"/Volumes/Audio CD/Track [XX].aiff" "/Users/[username]/Desktop/[outputfilenamehere].mp3"
Replace [space] with an actual space character and enter the command on one line; make the appropriate substitutions for track title and artist, the track number (replace [XX] with the actual number), your username, and the output file name.

[Editor's note: A previous hint explained how to download a precompiled version of LAME; the above instructions will create a much newer version. You'll need the Developer Tools installed to build LAME.]
    •    
  • Currently 3.00 / 5
  You rated: 2 / 5 (4 votes cast)
 
[28,897 views]  

Free command-line MP3 encoder | 12 comments | Create New Account
Click here to return to the 'Free command-line MP3 encoder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
What ripper?
Authored by: TTop on Oct 30, '01 03:46:11PM

What's a good ripper to use for OS X? I don't think cdparanoia or cdda2wav will work, and I don't really know what the OS X alternative is.



[ Reply to This | # ]
What ripper?
Authored by: TTop on Oct 30, '01 04:36:13PM

I should clarify that I'd like a command-line interface ripper.



[ Reply to This | # ]
cdslayer is my pick.
Authored by: stonefish on Nov 02, '01 10:29:59PM

A while back I heard of a good cd-ripping command-line utility called cdslayer. It's essentially a Perl script that given an mp3 encoder (in this case LAME), will rip a CD completely and *then* convert it to mp3. The upside to this is that the CD will be ripped to an AIFF file about three times as fast as ripping into an MP3, allowing you to rip another CD while the script is still converting the AIFF to mp3. This is good for when you are converting a lot of CDs back to back, but will work with just one, also. A cursory search on Google will find it easily.



[ Reply to This | # ]
cdslayer is my pick.
Authored by: mzajac on Dec 10, '01 09:01:06PM

I did find cdslayer as well as newer versions of ripit.pl, on which it is based.

I couldn't get it to work since it seems to require a separate command-line CD ripper program, like dagrab, cdda2wav, tosha, cdd or cdparanoia. Where can I find one of these for Mac OS X?



[ Reply to This | # ]
iTunes 2? (Re: What ripper?)
Authored by: sjonke on Nov 01, '01 12:21:41PM

iTunes 2 is scriptable, however I have no documentation on how to use it that way. Note that you can run applescript from the command-line or within a shell script via /usr/bin/osascript. Also note that iTunes 2 can be set to automatically rip and then eject when done CDs upon insert which may or may not be what you are looking for. Nifty.



[ Reply to This | # ]
Incidentally... (Re: iTunes 2?)
Authored by: sjonke on Nov 01, '01 12:24:51PM

Incidentally, a little bird told me that. ;)



[ Reply to This | # ]
iTunes 3 and LAME encoder
Authored by: rv8 on Oct 04, '02 09:09:13AM

There is an Apple Script available that lets you use iTune as a GUI front-end to the LAME encoder. The album, track name and genre get sent to LAME so they are put in ID3 tags, and the encoded song gets automatically added to the iTunes Library. I've been playing with this the last few days, and it works great, once I tracked down a bug. See:

http://www.versiontracker.com/moreinfo.fcgi?id=13048&db=mac

Note - there may still be a bug in this script, or maybe it has been fixed. "There seems to be a glitch in this script, at least when using OS X 10.1.5. Line 271, in the "on makeTrackCommands" section, has a space after the word "Track" that must be escaped. "/Volumes/Audio\\ CD/Track " should be changed to "/Volumes/Audio\\ CD/Track\\ ". The script worked great once I fixed this glitch."



[ Reply to This | # ]
What ripper?
Authored by: osxpounder on Oct 04, '02 03:57:46PM

Do any of you know of an MP3 encoder that encodes the signal coming in from an audio input? A coworker needs to be able to encode live audio input, rather than CDs, to the MP3 format, and he was hoping to find an OSX solution.



[ Reply to This | # ]
Frontend for LAME
Authored by: sota on Nov 02, '01 07:51:38PM

Is there a command line script to ask/enter that information or a GUI frontend for LAME?

I've hunted around and only found Linux tools that want cdparanoia and all that noise (which you don't need on 10.1, LAME will rip the tracks right from the CD and encode, nothing in-between).



[ Reply to This | # ]
Slight correction
Authored by: c15zyx on Dec 11, '01 03:52:05PM

With the advent of iTunes2, it should read Track [XX].cdda instead of Track [XX].aiff so adjust accordingly depending on how the audio cd shows up on your desktop.

If it helps, remove the -q0 switch: this will make lame use a quality setting of 2, which is not as good but should be faster and show no audible difference. If you're desperate for speed, use the switch -ms which uses only stereo frames, but I don't really recommend it.

Also, download the latest version from time to time, lame is changed almost daily :-)

--c15zyx
[author of original post]



[ Reply to This | # ]
didn't work
Authored by: joestalin on Nov 14, '02 10:34:19AM

Tried following the instructions, and indeed got lots of crunching and cryptic comments in the terminal, but the end result is
lame: Command not found.
One quirk was that "su" didn't recognize my password (???), so I did each step as "sudo ./configure", "sudo make" and "sudo make install." Not sure if that would make any difference.



[ Reply to This | # ]
didn't work for me either
Authored by: pbesong on May 03, '06 08:28:21AM

This didn't work for me either. It ran all the code and such but I can't convert anything. I would like to be able to convert files via applescript using the command line. Can't do anything till I get this working, though.

I tried typing "rehash" after running the install and it did not recognize that command. "command not found". Also tried quitting and restarting the Terminal.

Any help here???



[ Reply to This | # ]