ffmpeg installation error Unknown encoder 'libmp3lame'

ffmpeg -i inputFile.m4a -c:a libmp3lame -b:a 128k Oufile.mp3
error: Unknown encoder 'libmp3lame'I have
tried the following methods to solve the problem. Method 3 is feasible.

Method 1: Ubuntu Multimedia for Trusty

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ffmpeg

Method 2: Install from source code

tar -xvf ffmpeg.tar.bz2
./configure --prefix=/usr --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-x86asm --enable-version3 --enable-gpl --enable-libx264 --enable-libmp3lam
make
make install

This way still doesn't work.

Method 3: directly download a recent static build (scroll down where it says Linux Static Builds), download URL https://johnvansickle.com/ffmpeg/

cd ~/Downloads
tar xvf ffmpeg-*.tar.xz
cd !$
sudo mkdir -p /usr/local/bin
sudo cp ./ffmpeg ./ffprobe /usr/local/bin/
sudo chmod ugo+x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe

This method is the most convenient. Others will directly give you the compiled and installed files, and there is no need to install packages in various encoding formats. In addition, I think of one that is very close to this method, Anaconda, similar to it, in the process of deep learning, it is also necessary to install various environments of python, and there may be conflicts between some dependencies, and then Anaconda will be installed. Good dependencies, as well as python, are packaged for download, which is very convenient.
Special note: This part is mainly from https://superuser.com/questions/831473/unknown-encoder-libmp3lame-in-ubuntu-14-04

In addition, there are also attempts to carry out the fourth method, but there is no effect, and the third method is still feasible.
Method four:

sudo apt-get install libavcodec-extra-53  
sudo aptitude install ubuntu-restricted-extras

Source page:
https://askubuntu.com/questions/398731/an-error-with-youtube-dl

Attachment: I started with source code installation, refer to the following two pages
1. https://www.jianshu.com/p/a5c76a429091
2. https://blog.csdn.net/NCTU_to_prove_safety/article/details/70851575

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324752112&siteId=291194637