Could Not Open Mp3 Encoding Library

Hey all,

Running out of solutions here. Installed Audacity 2.0.3 via .exe package. Currently on a windows 7 64 bit system. Everything is working wonderfully except trying to get Audacity to locate/use the LAME encoder.

I’ve tried installing every LAME encoder from 3.98.2 right up to 3.100.a with no success. I’ve tried editing the audacity.cfg to either remove the MP3 lines as per a help document, and I also tried physically adding the path.

Trying to use Edit → Preferences and locating the Lame encoder doesn’t do anything. No matter how many times I’ll point Audacity to the file and hit ok, it still says “Could not locate”

Tried placing the file in the Audacity folder, in the default C:Program Files (x86)Lame for Audacity, even tried it on the desktop.

Each time I’d change something I would ensure Audacity wasn’t running.

I’ve adjusted security settings on the Audacity and Lame folders to allow/modify all for all users/levels.
I’ve tried running it as Administrator to no affect.

Anyone have this issue or know a work around? I have two podcasts to get done and out today so I’ll have to export as WAV and use some third party encoder. :frowning:

Damien

Audacity requires that LAME is compiled in a specific way. Versions of LAME that have not been compiled specifically for Audacity will probably not work.

Try following (exactly) the “troubleshooting” steps here: http://manual.audacityteam.org/o/man/faq_installation_and_plug_ins.html#lame

Hey Steve,

That’s the link I was following, I ensured I followed links from Audacity to the lame encoder, but to no avail. Then saw a forum post from a while back that said to try free-codecs.com, that one didn’t work. Also tried a download direct from lame itself.

What’s strange is when googling for this kind of error, there are threads out there that all pertain to ver 1.2.x etc but not to this current release.

I could uninstall and reinstall Audacity, but I’m not too confident that it will fix it.

Damien

The troubleshooting steps Steve suggested at http://manual.audacityteam.org/o/man/faq_installation_and_plug_ins.html#Windows will only work with the recommended version of lame_enc.dll. Here is a direct link to it:
http://lame1.buanzo.com.ar/lame_enc.dll .

I suggest quitting Audacity then putting the above downloaded lame_enc.dll into C:Program Files (x86)Audacity (or wherever you installed Audacity). Launch Audacity then try to export an MP3.

If it fails, Edit > Preferences: Libraries, then try locating the downloaded lame_enc.dll in the Audacity installation folder.


Gale

Thanks Gale but that didn’t work either.

Damien

What is the exact error message when you export as MP3?

Where exactly is Audacity installed?

Have you tried the troubleshooting steps by quitting Audacity and removing

[MP3]
MP3LibPath=

from audacity.cfg as well as using a lame_enc.dll file from the buanzo site?

Here are the troubleshooting steps again:
http://manual.audacityteam.org/o/man/faq_installation_and_plug_ins.html#Windows .


Gale

Hey,

Just tried that again. Still no go. I have attached screen shots.

Audacity is installed as per default: C:Program Files (x86)Audacity.

Damien
audacitybuildinfo.png
locatelame.png
cantfindlame.png

One more picture. Let me know if they are too big and I’ll upload them to my FTP and make them links.

Damien
editpref.png

Sorry this is so difficult. :cry:

Can you restart Audacity, try to locate lame_enc.dll in Preferences then choose Help > Show Log… . Right-click in the log > Select All, right-click again > Copy then paste the log here.

Do you have lame.exe (I don’t mean lame_enc.dll) in “C:Program Files (x86)Lame For Audacity”? If so, choose “(external program)” when you export instead of “MP3 Files”. Click “Options…” and make sure the command selected is lame - “%f”. Click OK. Then try exporting, adding “.mp3” (without quotes) to the end of the filename you want.


Gale

Hey

Okay we’re getting somewhere. Doing it that way via External program does work. So you sir deserve a beer. Here is the log as per requested:

18:55:11: Audacity 2.0.3
18:55:12: Trying to load FFmpeg libraries...
18:55:12: Trying to load FFmpeg libraries from system paths. File name is 'avformat-52.dll'.
18:55:12: Looking up PATH environment variable...
18:55:12: PATH = 'C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program Files (x86)Common FilesMicrosoft SharedWindows Live;C:Program Files (x86)AMD APPbinx86_64;C:Program Files (x86)AMD APPbinx86;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:Program Files (x86)Windows LiveShared;C:Program FilesLucidlogix TechnologiesVIRTU MVP'
18:55:12: Checking that '' is in PATH...
18:55:12: FFmpeg directory is in PATH.
18:55:12: Checking for monolithic avformat from 'avformat-52.dll'.
18:55:12: Error: Failed to load shared library 'avformat-52.dll' (error 126: the specified module could not be found.)
18:55:12: Loading avutil from 'avutil-50.dll'.
18:55:12: Error: Failed to load shared library 'avutil-50.dll' (error 126: the specified module could not be found.)
18:55:12: Loading avcodec from 'avcodec-52.dll'.
18:55:12: Error: Failed to load shared library 'avcodec-52.dll' (error 126: the specified module could not be found.)
18:55:12: Loading avformat from 'avformat-52.dll'.
18:55:12: Error: Failed to load shared library 'avformat-52.dll' (error 126: the specified module could not be found.)
18:55:12: Error: Failed to load FFmpeg libraries.
18:55:12: Error: Failed to find compatible FFmpeg libraries.
18:55:27: File name is c:usersworkshopdesktopamerica.wav
18:55:27: Mime type is *
18:55:27: Opening with libsndfile
18:55:27: Open(c:usersworkshopdesktopamerica.wav) succeeded
18:55:40: Error: Execution of command 'lame-"C:UsersWorkshopDesktopAmerica.mp3"' failed (error 2: the system cannot find the file specified.)
18:55:47: Error: Execution of command 'lame-"C:UsersWorkshopDesktopAmerica"' failed (error 2: the system cannot find the file specified.)
18:57:16: Attempting to load LAME from system search paths
18:57:16: Loading LAME from lame_enc.dll
18:57:16: Error: Failed to load shared library 'lame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
18:57:16: load failed
18:57:16: Attempting to load LAME from builtin path
18:57:16: LAME registry key exists.
18:57:16: Library path is: C:Program Files (x86)Lame For Audacity
18:57:16: Loading LAME from C:Program Files (x86)Lame For Audacitylame_enc.dll
18:57:16: Error: Failed to load shared library 'C:Program Files (x86)Lame For Audacitylame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
18:57:16: load failed
18:57:16: (Maybe) ask user for library
18:57:16: Failed to locate LAME library
18:57:19: LAME registry key exists.
18:57:19: Library path is: C:Program Files (x86)Lame For Audacity
18:57:24: Attempting to load LAME from previously defined path
18:57:24: Loading LAME from C:Program Files (x86)Lame For Audacitylame_enc.dll
18:57:24: Error: Failed to load shared library 'C:Program Files (x86)Lame For Audacitylame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
18:57:24: load failed
18:57:24: Attempting to load LAME from system search paths
18:57:24: Loading LAME from lame_enc.dll
18:57:24: Error: Failed to load shared library 'lame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
18:57:24: load failed
18:57:24: Attempting to load LAME from builtin path
18:57:24: LAME registry key exists.
18:57:24: Library path is: C:Program Files (x86)Lame For Audacity
18:57:24: Loading LAME from C:Program Files (x86)Lame For Audacitylame_enc.dll
18:57:24: Error: Failed to load shared library 'C:Program Files (x86)Lame For Audacitylame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
18:57:24: load failed
18:57:24: (Maybe) ask user for library
18:57:24: Failed to locate LAME library

Thanks for all your help so far :wink:
Damien.

It could be that this is the problem:

Error: Execution of command 'lame-"C:UsersWorkshopDesktopAmerica.mp3" ' failed (error 2: the system cannot find the file specified.)

Perhaps writing an MP3 is trying to call some other MP3 encoder you have installed somewhere else.

This looks as if it may then be preventing the LAME for Audacity lame_enc.dll initialising correctly.


Gale

I’m not sure how seeing as this is a new PC i built only a few days ago and this problem happened straight away.

rubs chin Could it be a permissions thing? Windows 7 can be shit that way sometimes. Perhaps uninstalling it and reinstalling it to say my D drive (HDD) might fix it?

Damien

Can you export as WAV (or as MP3 at the Audacity command-line) to “C:UsersWorkshopDesktop” ?


Gale

Yes I can. :wink:

I recorded a bit, then exported as Wav, tried to export as Mp3 (it failed), it worked exporting to external program with file extension *.mp3

Here’s the log.

21:33:44: Audacity 2.0.3
21:34:02: Trying to load FFmpeg libraries...
21:34:02: Trying to load FFmpeg libraries from system paths. File name is 'avformat-52.dll'.
21:34:02: Looking up PATH environment variable...
21:34:02: PATH = 'C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program Files (x86)Common FilesMicrosoft SharedWindows Live;C:Program Files (x86)AMD APPbinx86_64;C:Program Files (x86)AMD APPbinx86;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:Program Files (x86)Windows LiveShared;C:Program FilesLucidlogix TechnologiesVIRTU MVP'
21:34:02: Checking that '' is in PATH...
21:34:02: FFmpeg directory is in PATH.
21:34:02: Checking for monolithic avformat from 'avformat-52.dll'.
21:34:02: Error: Failed to load shared library 'avformat-52.dll' (error 126: the specified module could not be found.)
21:34:02: Loading avutil from 'avutil-50.dll'.
21:34:02: Error: Failed to load shared library 'avutil-50.dll' (error 126: the specified module could not be found.)
21:34:02: Loading avcodec from 'avcodec-52.dll'.
21:34:02: Error: Failed to load shared library 'avcodec-52.dll' (error 126: the specified module could not be found.)
21:34:02: Loading avformat from 'avformat-52.dll'.
21:34:02: Error: Failed to load shared library 'avformat-52.dll' (error 126: the specified module could not be found.)
21:34:02: Error: Failed to load FFmpeg libraries.
21:34:02: Error: Failed to find compatible FFmpeg libraries.
21:36:57: Attempting to load LAME from previously defined path
21:36:57: Loading LAME from C:Program Files (x86)Lame For Audacitylame_enc.dll
21:36:57: Error: Failed to load shared library 'C:Program Files (x86)Lame For Audacitylame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
21:36:57: load failed
21:36:57: Attempting to load LAME from system search paths
21:36:57: Loading LAME from lame_enc.dll
21:36:57: Error: Failed to load shared library 'lame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
21:36:57: load failed
21:36:57: Attempting to load LAME from builtin path
21:36:57: LAME registry key exists.
21:36:57: Library path is: C:Program Files (x86)Lame For Audacity
21:36:57: Loading LAME from C:Program Files (x86)Lame For Audacitylame_enc.dll
21:36:57: Error: Failed to load shared library 'C:Program Files (x86)Lame For Audacitylame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
21:36:57: load failed
21:36:57: (Maybe) ask user for library
21:36:59: Loading LAME from C:Program Files (x86)Lame For Audacitylame_enc.dll
21:36:59: Error: Failed to load shared library 'C:Program Files (x86)Lame For Audacitylame_enc.dll' (error 1114: a dynamic link library (DLL) initialization routine failed.)
21:36:59: load failed
21:36:59: Failed to locate LAME library

Damien

Hey,

As this is still doing it and I’m using the external program option now, how can I tell the lame.exe to export at 160kbps? Normally with mp3 selected you can go to Options and change preferences, but clicking options with (external program) selected doesn’t give me that ability to change the output.

Any suggestions?

Damien

When using “external program” export, you can add any command-line options to the export command.

There is a full list of command-line options for LAME here: http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/switchs.html
You will see that the switch for bit-rate is “-b” for constant bit rates.

So for 160 kbps CBR (Constant Bit Rate) you would use the following command:

lame -b 160 - "%f"

For a similar bit rate, but higher quality VBR file, you could try:

lame --preset standard - "%f"

Hi Damien

Thanks for answering some questions on the Forum, much appreciated.

If you search for lame_ enc.dll on your whole computer including hidden and system files, how many copies of it do you have?

Have you tried the following, if not can you do so? Quit Audacity, copy lame_enc.dll from where it is installed, then paste lame_enc.dll into the folder where you have Audacity installed. Then uninstall Lame for Audacity and reboot. Then edit audacity.cfg so that it has only the following content:

NewPrefsInitialized=1

Finally, launch Audacity. It should just export Audacity in that case.

If not, you could download Dependency Walker, launch it, drag lame_enc.dll into it, then File > Save the .dwi file and e-mail it to me at our feedback address .


Gale

Thanks Steve,

And Gale, I’ll get onto it just after I mix down another podcast I look after. :wink:

Damien

Email sent.

Damien

Okay tick this as solved Audacity followers.

I uninstalled everything, I deleted every reference to Audacity and to LAME (including original downloaded exe). Restarted PC.

I re downloaded Audacity.
I installed it on another drive that wasn’t windows. In my case F drive.

I re-downloaded LAME as per the help wiki and installed that on the F drive also.

Did a test record and export. Works fine.

I wonder if this is to do with a permissions/windows directory HDD freaking out about a program trying to access a .dll

rubs chin I hope this thread serves as a more updated info sink about this error as older versions had threads about it in the past.

Damien