From Audacity Wiki
Jump to: navigation, search
Peter 17Apr18:: ToDo-1 This section to be deleted once 2.3.0 is released. Contents have been transferred to the Manual>FAQ and the new Wiki page MP3 Editing Tools.
Gale 07May14: I updated this page for current Audacity, though some of what I updated is duplicative of the Manual and could be trimmed. I think we need an MP3 page because of the importance of the format, even if we lose most of the Lame Installation content. I think some of the "troubleshooting content" on that page e.g. the list of valid sample rate/ bit rate combinations is ideal material for this page. MP3 encoding and decoding is such a complex matter that I doubt you could ever fit everything into the Manual.
  • Gale 17Jun14: As per my comment above I reverted your deletion of Lame Installation and set a P2 to incorporate useful material from there to this page (or possibly elsewhere). Lame Installation is also linked to quite a lot so when it is finally deleted, it needs a redirect. I suggest it redirects here because if it goes to the Manual that may not address the question the link was addressing.
    • Peter 07Jan17: I transferred the LAME "Legal Issues" to this page. It's looking likely that after 2.1.3 is released I will deprecate the Lame Installation page, but leave it as s stub page with redirects.
    • Peter 07Jan17: I also transferred the Troubleshooting section - do some (all?) of these belong better in Manual>FAQ ?
MP3  is a size-compressed, lossy audio format. This means that it uses less disk space to store audio than uncompressed formats like WAV, but loses some of the original sound quality in doing so. To reduce the quality loss, the audio removed is mainly outside the adult range of hearing, and the artefacts  it introduces are chosen so they are largely masked by louder or more prominent sounds. The actual quality achieved depends on the bit rate you encode at, higher bit rates giving better quality but resulting in larger files.
Other compressed lossy formats exist that work in a broadly similar way, such as MP2 and the more modern and arguably superior OGG and M4A formats.
Related article(s):

MP3 support in Audacity using the LAME MP3 encoder

Audacity can both import audio in MP3 format, and export to MP3 format. Audacity can use the LAME  MP3 encoding library in order to export MP3s, but we do not distribute LAME because of patent restrictions. Instead, you need to download LAME separately.

Warning icon

Legal Issues

While the LAME source code is free, the encoding technology that ready-compiled LAME binaries use is patented. The patents are held by Fraunhofer and administered by Thomson. Patenting raises a theoretical possibility that in some countries a user might need to pay a licence fee to legally encode MP3s. This might vary according to the purpose of the encoding and whether the software being used is licensed.

There is no definitive list of countries where the patents unambiguously hold sway. However they are generally assumed to be enforceable in USA, Canada, the EEC and Japan. This means that in these countries (in theory), software that encodes MP3s must be licensed by the patent holders, and that anyone encoding MP3s with unlicensed encoders may also be infringing patents.

The best advice that can be given is that the user makes their own decision, based on their conscience, the country they are in, and taking into account the following:

  • The patent holders have tended to enforce licence fees against commercial rather than free MP3 encoders
  • Thomson themselves have said that no license is needed by individuals creating music libraries of MP3 files for personal use (interpretations vary whether that sanctions using unlicensed encoders, free or otherwise)
  • Existing MP3 patents will expire worldwide between 2010 and 2012 (but not until 2017 in the USA)
  • The possibility remains at least in the USA that patents could be extended.

Downloading and Installing LAME

Instructions for downloading and installing LAME are in the FAQ section in the Au dacity Manual.


See the Setup section in MP3 Export Options in the Audacity Manual.

Exporting to MP3

See MP3 Export in the Audacity Manual.

Other MP3 editing tools

See MP3 Editing Tools in the Wiki

Tips for troubleshooting MP3 export problems

Peter 14Mar18:: ToDo-1 This section to be deleted once 2.3.0 is released. Contents have been transferred to the Manual>FAQ.

Crash or excessive processing time on MP3 export

If Audacity crashes or hangs when exporting MP3s, or the export takes a long time to process, the usual reason is that your chosen Project Rate (the sample rate bottom left of the Audacity screen) is very different from the sample rate of the audio track on the screen (as shown in Hz on the Track Control Panel above the mute/solo buttons). As a result, resampling has to be done while exporting, which can create problems on long tracks. Try resampling the track to your chosen Project Rate before exporting as MP3. To do this, select all the track by clicking in the Track Control Panel, then Tracks > Mix > Mix and Render. If there is any silence added to the end of the track as a result of the resampling, you can select and delete it. Now when you export the MP3, the process should go smoothly and quickly. If it doesn't, there could be a number of reasons, e.g. if you have a virus scanner set to scan all created files, this will slow the process of writing the exported file considerably. The higher the bit rate you export at, the larger the file will be, so giving a greater time penalty if you enable virus scanning.

Exported MP3 invalid / will not play

Sometimes the exported MP3 may be invalid and only a few bytes in size; as a result, it will not play and give an error.

The safest solution is to always set your Project Rate to 44100 Hz. Make a rule to check this before you export, because importing a file of some other sample rate may change the Project Rate to that rate.

LAME will automatically downsample from 44 100 Hz to a lower sample rate at 56 kbps or lower, because low bit rates may give poor quality with higher sample rates. If especially desired, any valid sample rate/bit rate combination can be enforced by using the command line exporter in the current version of Audacity (choose "external program" in "Save as type" in the Export File dialog). Or export as WAV from Audacity, then use LAME.exe at the command line to convert to MP3.

Exported MP3 plays too fast

If the MP3 plays at the wrong speed (usually too fast), then the sample rate you exported it at is unsuitable for your player application. Once again, the safe solution is to always set your Project Rate to 44100 Hz. This was a known problem with Adobe Flash Player until some way into version 9: for the file to play properly, the sample rate had to be 11025 Hz or a multiple thereof, such as 22050 Hz or 44100 Hz. This is fixed in the current Adobe Flash Player.

Exported MP3 has low volume or no sound

If you can see your exported MP3 is playing because the timer on the media player is moving, but it has no sound, make sure the sound device is not muted (in the player or in the system control panel), and make sure the correct playback device is being used (in the player preferences or in the system control panel). If this is not the problem, go back to Audacity and make sure the -....+ gain slider on the Track Control Panel (where the mute/solo buttons are) is set centrally at "Gain: 0 db". If this slider is over to left, it will reduce or kill the volume in the exported MP3.

Exported MP3 larger than imported one

If you import an MP3 file into Audacity, then after export you find it is much larger than before, this is because the bit rate you exported it at is higher than the bit rate of the original file.

Audacity defaults to 128 kbps bit rate then remembers the last used bit rate if you change it.

If you need the exported MP3 to be the same size as before:

  1. Find out the bit rate of the imported file by opening it in Windows Media Player and clicking File > Properties, or in iTunes, right-click or control-click over the file and click Get Info. You can also use standalone programs like MediaInfo.
  2. Click File > Export > Export as MP3, then click the Options button.

If you export a low bit rate MP3 at the same bit rate as the original you will be degrading its quality much more than if you exported it at a higher bit rate. The penalty of the higher bit rate is that the new file would be larger and that file merge tools might no longer be able to join the new MP3 to others that had the original bit rate. If you export a high bit rate MP3 at the same bit rate you are helping to minimize quality loss (but are not saving anything in file size).