A previous hint has instructions for installing LAME.
This is the first version and hasn't been extensively tested by others, so any input would be appreciated.
|
|
|
I have written a simple script to bridge the gap between iTunes and the LAME command line encoder. It will automatically handle ID3 tags, and makes LAME quite a bit easier to use.
A previous hint has instructions for installing LAME. This is the first version and hasn't been extensively tested by others, so any input would be appreciated.
•
[15,502 views]
Hint Options
thanks!
The script makes it easy! Did you notice your not encodeing the total number of tracks into the tags?
thanks!
I just noticed that. LAME doesnt support that tag, but i may try to work around it.
thanks!
Beautiful.
Hmmm.....
For me, the script doesn't seem to work. I ran the script from the Scripts menu in iTunes, and it got to the point where it asked me for the info and made the playlist, then did nothing.
I ran the script from the Script Editor, and came up with a "Folder not available in this operating system version" error when it got to this point:
The part in italics is the part that is highlighted when the error message appears. I am using MacOS 10.1.1, so I'm not sure if this message is entirely valid. What happened? Has anyone else had this problem?
Any suggestions
This has been bothering me occasionally for weeks
More iTunes scripts
There's plenty more about scripting iTunes at Doug's AppleScripts
better lame mp3's
minus one little small problem with the script, everything has gone great. nick did just what i wanted to do, but couldn't get to run right. i'm soo thankful for a X lame encoder with out all the command line boredom. (i've got A LOT of cd's that i want to rip)
Updated
I fixed a few problems. A newer version is availible:
Ripping speed
I'm new to LAME and wondered how much faster ripping with it was compared to using the iTunes. Or is it a matter of sound quality? I wonderd what advantage LAME had over iTunes.
Ripping speed
For most, the primary motivation is quality. Using the "--r3mix -q0" settings, my iBook 500 can barely manage 1x :)
it's quality
lame is a better quality encoder then the fruenhoffer or ogg codecs. if you are interested in most everything there is concerning mp3's, and getting the best out of your time creating mp3's, go here and read up!
it's quality
O'Reilly's MP3: The Definitive Guide is also excellent. ;)
Ripping speed
I've noticed I can rip about .90x play speed with --r3mix with lame 3.89 on a TiBook 550. What I don't understand is why my 1 Ghz P3 can encode the exact same wave file at 5.4x play speed. Windows takes 34 secs and the mac takes 3min 50 secs. I would expect my Mac to be close to Windows, but it's much slower.
Ripping speed
Is the Windows machine ripping the file using the same settings as the mac? The r3mix setting in LAME will severely tax your processor as it tries to make a perfect-sounding file as small as absolutely possible. Default settings for iTunes and most Windows players are usually set for lower quality (therefore more speed).
Ripping speed
I ripped one track using iTunes to a wav file. I copied this file over to my windows box. I used "lame --r3mix infile outfile" to encode it both on the mac and the pc. The pc did it in 30 secs at 5.x speed. The mac took 3.x min at .9x speed.
Ripping speed
Ok. I ran a test with two tracks this morning. I used ExactAudioCopy on a pc to extract 2 wav files from a CD. I transfered the wav files to my mac and here are the results.
Ripping speed
IIRC, the x86 versions of LAME use inline hand-coded assembly
simple interface for the command-line
I have also been slightly annoyed at the steps needed for encoding many files, as i copied the command text into a folder name and used to just paste it into the terminal when i need to encode, saves lots of typing.
: in track error
I get an eror whenever a ":" is in the title of a track I try to encode. Is this a script error or a more general lame error? It just winds up skipping the track, so I have to go back and encode it in another way..
It's not a bug, it's a feature.
It's not a LAME 'problem', per se, but more of a system-wide aversion to using ':' or '/' in a file name. ':' is used in MacOS to denote a directory; For instance, my Music folder is located at My Computer:Documents:Music. That can also be read as My Computer/Documents/Music.
It's not a bug, it's a feature.
This is a classic "Mac vs Unix" file-system problem. The ":" is a Mac directory delimiter, while "/" is the Unix directory delimiter. Want to have some real fun? Go and create a folder in the Finder and name it "Test/This." Now, open the terminal and list where that directory is located. It appears as "Test:This." When mixing Unix with Applescript, these changes become a SEVERE headache. I honestly wish there was a setting in Applescript to make all file references in Unix form.
It's not a bug, it's a feature.
I'd like to see your workaround, however i have updated the script to handle both slash, backslash, and colon. (and probably broke some stuff as well)
http://www.blacktree.com/scripts.html
Mac Unix script
My mac to unix path conversion applescript subroutine is already posted here in MacOSX hints. Your conversion routine will still choke if it comes across a name with quotes, but that is extremely rare in CDs.
Mac Unix script
I thought about that, but since it was already there i just left it in. I was partly worried about things making it back into iTunes to be finished. I am not completely secure about the whole script->shell->script affair. it would be a lot easier though.....
Mac Unix script
oh, and i thought i fixed the issue with quotes. what version are you looking at?
It's not a bug, it's a feature.
I'm running version 1.0.4b of the script and I'm getting errors on a slash.
Wonderous Quality!
Thanks for pointing the way to LAME and making it so easy to use.
Improved quality
as of the time of this post, a new version of lame has just been released, and includes the setting
More '/' Problems
I just ran into a similar problem. Couldn't get it to work at all for a while (even crashed script editor!), but then I figured out where it was failing. The disc I was using (only one I had here at work) was given the genre Electronica/Dance. The slash was giving it fits... or was it because it's not in your genreList?
More '/' Problems
It worked for me whon i tried it (on 0.9.5). I will look into it. I am probably going to bypass lame's tags entirely in the next version, so it should work anyway.
A more robust version
Okay, I picked your script apart, added some stuff I needed, and took
out some of the stuff that I don't. You can get the new script at:
http://homepage.mac.com/james_sorenson/FileSharing.html
Look in the scripts directory for Convert to HQ MP3 with Lame.scpt
Here is what I changed:
(1) Added my own Mac to Unix path conversion.
This one is the most robust one I have made so far (will it ever end?).
You can throw every screwball character at it except high-bit
characters. This includes all punctuations, slashes, colons, tildes,
etc. I still can't figure out high-bit characters, though.
(2) Used iTunes for tag support exclusively. Take a look at how I did
it. Each track you import will make its own applescript containing the
link to the original track and labeled with the track database ID. Once
lame has created the file, it will call this applescript file. That
file will directly copy the tag information from the source track to the
new track. No more worries about weird characters in the tag details!
The applescript files are deleted once all tracks have been processed.
(3) Added the ability to put new files into a genre folder, as well as
artist and album.
(4) Took out stuff for making multiple playlists. I sort everything by
tags.
(5) Added ability to tailor how the new file is named. You can number
what order the artist, album, track, and title are listed in the file
name--separated by dashes.
(6) Added "macfixfile" function to simplify the created file names.
Basically, it makes sure that the new filename will be void of
high-bits, quotes, slashes, and tildes. This just makes it a lot more
compatible with MP3 devices. The tag information inside the file will
be un-touched, though.
Shortcomings:
You cannot delete the original file from the playlist
until the conversion is done, or there will be nothing to get tag
information from! In theory, I could copy all tag information to the
applescript file, but I was too lazy to do it that way.
Here is where I'd put my disclaimer that I hold no responsibility to
what anguish any existing bugs may cause you.
Once again, thanks for showing us how to do this! It's a relief to be
able to use iTunes cddb tag support with lame's MP3 encoder engine!
Jim
A more robust version
It looks like you have a hard coded path left in the code. When I execute, I get an error:
A more robust version
You are correct that I hard-coded some directories. They are stored in the property declarations at the very beginning of the script. I like to have direct control on where my temp files are going. However, it looks like he updated the script to include these abilities anyway, so use his.
New Version (again)
Based on james_sorenson's suggestion, I have bypassed LAME's tags entirely. The new version is at <a href="http://www.blacktree.com/scripts.html">http://www.blacktree.com/scripts.html</a>
Slight modification
Better ability to selectively encode tracks off a CD with this script can be obtained with a very slight modification near the beginning of the on run section:
0.9.9
Getting dangerously close to 1...
RE: 0.9.9
hmmmmmm
RE: 0.9.9
try removing |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.25 seconds |
|