New Technologies

  • Java
  • Javascript
  • DTML
  • Dot Net
  • ASP .Net
  • C# .Net
  • PHP
Your Ad Here

Sunday, February 8, 2009

Lame Installation

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 license 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)

·       MP3 patents will expire worldwide between 2010 and 2012

Windows Instructions

New or inexperienced users are recommended to follow the easy steps in the Simple Installation section and skip the "Advanced options for MP3 encoding" section that follows "Simple Installation".    

Simple Installation

 All users

1.      Download an unzipped copy of the required lame_enc.dll

2.      Do not open this file, but save it to your computer. As you will be using this .dll file directly for encoding it is recommended to save it into your installation folder.

A higher bit rate gives you higher quality at the expense of a larger filesize, and vice-versa. A 128 kbps bit rate takes up about 1 MB of space per minute. The "Options" button also gives access to more advanced MP3 encoding options as follows:

1.      Bit Rate Mode (Variable, Average, Constant or use a Preset)

2.      Encoding Speed (with other than constant bit rate encoding)

3.      Channel mode (currently Stereo or Joint Stereo).

Mac Instructions

Downloading and installing

OS 9
Download: LameLib-Carbon-3.91.sit

OS X
Download: Lame Library v3.98.2

Note: this requires OS X 10.4 or later. For OS X 10.2 or 10.3, download libmp3lame-osx-universal-3.97.zip

Universal Binary for Intel Macs and Power PCs
Download: Lame Library v3.98.2

Note: this requires OS X 10.4 or later. For OS X 10.3, download libmp3lame-osx-universal-3.97.zip


Next, go to the instructions for LameLib-Carbon-3.91.sit, Lame Library v3.98.2 for Audacity.dmg or libmp3lame-osx-universal-3.97.zip.

LameLib-Carbon-3.91.sit

1.      When you have finished downloading, extract the files with Stuffit or similar (this may happen automatically)

2.      Save the file called "LameLib" anywhere on your computer

Extra help with expanding .sit files:

Try Stuffit. It has several ways to expand a compressed file:

·       Double-click the icon of the file. On many systems, StuffIt will launch and expand the file.

·       Using your mouse, click and hold the icon of the file, then drag it over the icon of StuffIt. When StuffIt's icon darkens, release the mouse button. StuffIt will open and expand the file, and then quit.

·       Double-click StuffIt's icon, and wait for it to open. From the File menu, select Expand, and in the window that appears, find the file want to expand. StuffIt will then expand the file.

·       With StuffIt open, from the Window menu, select Drag Window. To expand your file, drag it into the Expander window that opens.

Alternative expanders for sit:

·       Springy        

Lame Library v3.98.2

1.      When you have finished downloading, double-click the .dmg to mount it, then go to the Finder (in Safari, "Lame Library v3.98.2 " will be extracted automatically after downloading).

2.      Double-click "Lame Library v3.98.2". This will install the LAME binary "libmp3lame.dylib"

libmp3lame-osx-universal-3.97.zip

1.      When you have finished downloading, use an expander such as Stuffit or Springy to extract the files

2.      Save the file "libmp3lame.dylib" anywhere on your computer - it's located at the bottom of the "package" folder at libmp3lame-osx-universal-3.97/package/usr/local/lib

Setting bit rate and other options

A higher bit rate gives you higher quality at the expense of a larger filesize, and vice-versa. A 128 kbps bit rate takes up about 1 MB of space per minute. The "Options" button also gives access to more advanced MP3 encoding options as follows:

1.      Bit Rate Mode (Variable, Average, Constant or use a Preset)

2.      Encoding Speed (with other than constant bit rate encoding)

3.      Channel mode (currently Stereo or Joint Stereo

Previous Intel Mac naming issue with Universal Binary

An early version of http://spaghetticode.org/lame/libmp3lame-osx-universal-3.97.zip mistakenly named the included MP3 encoding binary as libmp3lame.so instead of the libmp3lame.  If you have this problem, please download the latest version.

Assertion error with LAME on Power PCs

Users on Power PCs may see an "assertion error" when exporting MP3s. This is due to a bug in the LameLib binary. This binary is v3.91 and outdated, but unfortunately is the only carbonised version that is currently available.

GNU/Linux/Unix instructions

Obtaining LAME

Most Linux distributions have some sort of package manager that fetches software packages from the Internet in .deb or .rpm format, and installs them for you. Open that package manager, search for LAME, and install it if it is not already installed. There are detailed instructions below for installing LAME by using the Synaptic package manager on Ubuntu or Debian systems.

Obtaining LAME using Synaptic

These are detailed steps for Ubuntu 8.04 Hardy Heron, but should be the same for all other Debian-based distributions of Linux.

1.      Open the “Synaptic” software-package manager.

o       In GNOME (the default desktop environment for Ubuntu and many other systems), you can find it by clicking on the “System” menu at the top of the screen, and then choosing “Administration”.

o       In KDE (the desktop environment for Kubuntu and many other systems), there will be a similar menu accessible from the bottom-left of the screen.

o       In all desktop environments, you can open up a command-line terminal and type “gksu synaptic” or “sudo synaptic”.

2.      Enter your Ubuntu user password when asked for it.

3.      In the Synaptic window, choose “Settings”, then “Repositories”.

4.      In the Ubuntu Software tab check the box for Software restricted by legal or copyright issues (“multiverse”), and then the Close button

5.      Back in the main Synaptic Window click the search button, choose to search by name only, then type “lame” and click “Search”.

6.      In the search results list, you will see the packages “lame” and “liblame0”. Mark both for installation (by double-clicking).

7.      Click the "Apply" button, and on “OK” to any warnings that come up.

8.      The LAME software will automatically download and install. Close the Synaptic window when it has finished.

Obtaining LAME using APT on the command line

Behind the scenes, Synaptic uses a program called APT. You can directly use APT to install LAME. First, open up a program such as xterm, GNOME-Terminal or Konsole, that gives you access to the command line.

Assuming that LAME is available in one of the repositories listed in /etc/apt/sources.list, you can install LAME with the following command:

sudo apt-get install lame liblame0

You will be asked for your user password. LAME will then download and install.

Some Linux systems do not use sudo. In that case, enter these three commands:

su

apt-get install lame liblame0

exit

or

yum  install lame

updatedb

exit

You will be asked for your root password.

LAME from source

If there isn't a LAME package for your distribution, go to the LAME Project home page and download the latest source code. Compile it as a shared object, it will be at /usr/local/lib/libmp3lame.so.

This is for advanced users. Newer users are advised to look for a LAME package for their distribution.

 * in older versions , there had to be no “.0” on the end, and users actually had to rename the file to make it conform to this expectation.

HINT: If you want to choose specific sample rate/bit rate combinations, the following shows those permitted in the MP3 specification, (with or without resampling):

MPEG-1 layer III sample frequencies (kHz): 32 48 44.1:
bit rates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320

MPEG-2 layer III sample frequencies (kHz): 16 24 22.05:
bit rates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160

MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025:
bit rates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160

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

Note that reducing the export bit rate will reduce the quality of the exported file below that of the file you exported at a higher bit rate. In fact, whatever bit rate you export at, importing an MP3 file and re-exporting it as an MP3 will always lead to a further loss of quality compared to the imported MP3. Re-encoding the file as an MP3 when you export it cannot be avoided , because it always decompresses the MP3 upon import. This is essential to maintain the quality of the file when applying complex edits such as equalisation.

But if you only want to do simple cut, copy, paste, fade and volume edits to your MP3s, you can do so without audio losses in other tools that can edit the MP3s directly without decompressing and re-encoding them. Two examples are MP3DirectCut  for Windows and Linux (under Wine) and Audion  for OS X.

MP3s of the same bit rate, sample rate and channel mode can also be joined non-destructively with these tools without the need for lossy re-encoding.

No comments:

Your Ad Here