[Mac OS X] MuseScore can't open LAME library for MP3 export

• Feb 8, 2015 - 03:47
Reported version
2.2
Type
Functional
Severity
S4 - Minor
Status
closed
Project

(This is a more precise issue posting for #42331: Error: Could not open MP3 encoding library!).

So! I'm going to be as specific as possible about each step of the process I'm going through, to try to eliminate any ambiguity. For this test, I'm using a 2009 MacBook running Mac OS X 10.9.5.

I started by booting into my Mac's recovery partition and repairing my startup disk, just because people were telling me there must be something wrong with my installation. This task accomplished, I rebooted and deleted my current installation of the LAME MP3 library from my computer. I then downloaded it afresh (version 3.98.2) from http://lame.buanzo.org/#lameosxdl and, in this case, used the ZIP archive. (In previous tests I have used the Installer package which, according to Pacifist, places the .dylib in /usr/local/lib/audacity. This, however, is a folder that requires root permissions to even see into, which I do not have enabled. In order to be sure I know the library is there, I chose to extract the archive and leave it in ~/Downloads/Lame_Library_v3.98.2_for_Audacity_on_OSX.)

At the same time, I downloaded the latest MuseScore nightly build (2015-02-06-2202-b9e10df), replaced the slightly older version in my /Applications folder, and from the Terminal ran /Applications/MuseScoreNightly.app/Contents/MacOS/mscore -F, quitting the nightly to complete the process.

Everything's set to go. I relaunch MuseScoreNightly and just use the My_First_Score that automatically opens. I enter a few notes, go to the File menu and choose Export… . Up comes the window where I can choose what format and what location I want to save to. I go with the default location and choose "MP3 Audio (*.mp3)" from the dropdown menu as my file format.

A dialog appears:
Screen Shot 1.png
I click "Yes."

Exactly as with Audacity, the window appears where you can browse or search for libmp3lame.dylib. Once it's found and selected, I click "Open." (Note: I'm not posting a screenshot of this because personal information would be visible.)

And then we hit a dead end.
Screen Shot 2.png

Now what?

Attachment Size
Screen Shot 1.png 59.54 KB
Screen Shot 2.png 31.94 KB

Comments

I can reproduce this behavior.
The error is:

Loading LAME from /Users/antonio/Desktop/Lame_Library_v3.98.2_for_Audacity_on_OSX/libmp3lame.dylib
load failed <Cannot load library /Users/antonio/Desktop/Lame_Library_v3.98.2_for_Audacity_on_OSX/libmp3lame.dylib: (dlopen(/Users/antonio/Desktop/Lame_Library_v3.98.2_for_Audacity_on_OSX/libmp3lame.dylib, 5): no suitable image found. Did find:
/Users/antonio/Desktop/Lame_Library_v3.98.2_for_Audacity_on_OSX/libmp3lame.dylib: no matching architecture in universal wrapper)>
Failed to locate LAME library
Could not open MP3 encoding library!

Here are the properties of that library:

$ file libmp3lame.dylib
libmp3lame.dylib: Mach-O universal binary with 2 architectures: [ppc: Mach-O ppc dynamically linked shared library] [i386]

The problem could be the fact that the library is a 32bit library.

@ZackTheCardshark:
Have you tried with a different build of LAME?
For example, I found these (but not checked them yet):
http://www.rarewares.org/mp3-lame-bundle.php

Indeed, i managed to make mp3 export work by using a 64bit library of LAME.
I found it here:
http://www.thalictrum.com/nl/products/lame.html
Note that you can avoid installing the full package by recursively opening the pkg archive with an unzipping program. The library you need is here:
lame-3.99.5.pkg\root.pkg\Payload\Payload~\lib\libmp3lame.0.0.0.dylib
and you have to rename libmp3lame.0.0.0.dylib to libmp3lame.dylib (the libmp3lame.dylib file in the lib folder is just a link to the actual library).

Yes! It works. Thank you, thank you, thank you. I feel like you ought to get some kind of award for heroism, or something. You certainly saved the day.

@Jojo-Schmitz, I just updated that page of the manual.

No, wait. There's still a loose thread hanging. That dialog shown in the first screenshot above should say something about "For details on how to obtain a version of LAME that will work with MuseScore for Mac, see [http://musescore.org/en/node/36111#mp3](File format) in the online manual." Or better yet, just put a Help button in there that links to the page.

By the way, does anybody else see something weird about the line breaks in that dialog box?

Only just found Musescore and getting to understand it but with no apparent export option and not finding anything in the handbook re creating music soundfiles I went to the forum and gleaned sufficient info comfirming that it could be done so went back and tried the 'save as' sequence. Just seemed simpler than trying to use Lame. Cheers

Ah, I see. A small matter of confusion here—MP3 export isn't even an option in MuseScore 1.x, so no wonder you had a "problem" with that! What we're discussing here, involving the use of LAME, is regarding the not-yet-released MuseScore 2.0, where MP3 export is one of the new features.

Since you're new to MuseScore, rather than learn everything twice, you might want to get in on the ground floor with 2.0. You can download it from http://prereleases.musescore.org/windows/nightly/. (One change of significance: there's an "Export" option under the File menu.) MP3 export should be working just fine for you there.

I'm still having trouble. I'm new. Downloaded the little package from that link, on a Mac, but Installer says Couldn't open "lame-3.99.5.pkg". So I can't get to the file I need for MuseScore. Help?

Pardon me, I mean the link in post #2, which is quite useless to this machine.

I did, however, take some of the time that I should be using to practice and follow thru another link on this thread, where I did find a download, which I took more valuable practice time to try to install, unsuccessfully. There is no libmp3lame.dylib in the package.

In reply to by ABL

Please elaborate. I tried the original (32-bit) LAME library and got the same error as posted above. So I downloaded 3.99.5 from Thalictrum and installed the entire package because StuffIt Expander refused to open the package (security settings wouldn't permit it). So, according to Thalictrum's web page, the installer put the library that I need into a directory that can't be accessed from the Finder. Not being a computer scientist, I don't know how to get access to that file, how to rename it, or where to put it so MuseScore can find it. Please provide step-by-step instructions.

Title [Mac OS X 64 bit] MuseScore can't open LAME library for MP3 export [Mac OS X] MuseScore can't open LAME library for MP3 export
Severity S5 - Suggestion S4 - Minor
Status (old) fixed closed
Status fixed closed

Great.. no reason to start changing all properties of this closed issue though.