Could Not Open Mp3 Encoding Library

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Could Not Open Mp3 Encoding Library

Post by Gale Andrews » Mon Apr 01, 2013 7:39 am

It could be that this is the problem:

Code: Select all

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
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Damienb
Posts: 174
Joined: Sat Mar 30, 2013 7:00 am
Operating System: Please select

Re: Could Not Open Mp3 Encoding Library

Post by Damienb » Mon Apr 01, 2013 9:49 am

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

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Could Not Open Mp3 Encoding Library

Post by Gale Andrews » Tue Apr 02, 2013 7:47 am

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


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Damienb
Posts: 174
Joined: Sat Mar 30, 2013 7:00 am
Operating System: Please select

Re: Could Not Open Mp3 Encoding Library

Post by Damienb » Tue Apr 02, 2013 11:14 am

Yes I can. ;)

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.

Code: Select all

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

Damienb
Posts: 174
Joined: Sat Mar 30, 2013 7:00 am
Operating System: Please select

Re: Could Not Open Mp3 Encoding Library

Post by Damienb » Fri Apr 05, 2013 11:46 pm

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

steve
Site Admin
Posts: 80677
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Could Not Open Mp3 Encoding Library

Post by steve » Sat Apr 06, 2013 12:15 am

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/ ... itchs.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:

Code: Select all

lame -b 160 - "%f"
For a similar bit rate, but higher quality VBR file, you could try:

Code: Select all

lame --preset standard - "%f"
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Could Not Open Mp3 Encoding Library

Post by Gale Andrews » Sat Apr 06, 2013 12:48 am

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:

Code: Select all

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
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Damienb
Posts: 174
Joined: Sat Mar 30, 2013 7:00 am
Operating System: Please select

Re: Could Not Open Mp3 Encoding Library

Post by Damienb » Sat Apr 06, 2013 6:19 am

Thanks Steve,

And Gale, I'll get onto it just after I mix down another podcast I look after. ;)

Damien

Damienb
Posts: 174
Joined: Sat Mar 30, 2013 7:00 am
Operating System: Please select

Re: Could Not Open Mp3 Encoding Library

Post by Damienb » Sat Apr 06, 2013 7:18 am

Email sent.

Damien

Damienb
Posts: 174
Joined: Sat Mar 30, 2013 7:00 am
Operating System: Please select

Re: Could Not Open Mp3 Encoding Library

Post by Damienb » Sat Apr 06, 2013 7:29 am

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

Post Reply