[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Fixing "output buffer too small" issue for ffmpeg with libmp3lame

Published on
15,872 Points
1 Endorsement
Last Modified:
This is the error message I got
[libmp3lame @ 0x95c0090]lame: output buffer too small (buffer index: 9404, free bytes: 388)
Audio encoding failed

Open in new window

Error caused by incompatible libmp3lame 3.98-2 with ffmpeg
I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98"

Thing is, in most updated distros' repositories, you will not find these 'outdated' versions.
I've done it on CentOS 5.4, it should not be too far away from this explination in any other distro.

1. we remove version 3.98.2
rpm -e --nodeps lame  
rpm -e --nodeps lame-devel  

Open in new window

2. download the required version of libmp3lame
wget http://downloads.sourceforge.net/lame/lame-398.tar.gz   

Open in new window

3. Extract:
tar xvvzf lame-398.tar.gz

Open in new window

4. Go into the extracted directory
cd lame-398

Open in new window

5. and build!
make install  

Open in new window

We're almost done now, but if you'll try you'll get the following error message
ffmpeg: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory

Open in new window

let's fix up the proper links for the new library;
for 32bit OS:
cd /usr/local/lib
ln -s /usr/local/lib/libmp3lame.so.0.0.0 /usr/lib/libmp3lame.so.0

Open in new window

and for 64bit OS:
cd /usr/local/lib
ln -s /usr/local/lib/libmp3lame.so.0.0.0 /usr/lib64/libmp3lame.so.0

Open in new window

And voila!

Featured Post

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Join & Write a Comment

Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month