ERROR: audio conversion failed: Unknown encoder 'libmp3lame' - macos

I'm trying to use youtube-dl on a Macbook (using Mojave). It used to work flawlessly but recently I am seeing the following error:
youtube-dl -x --audio-format mp3 https://youtu.be/somevidR4hhU
[youtube] somevidR4hhU: Downloading webpage
[youtube] somevidR4hhU: Downloading video info webpage
[youtube] somevidR4hhU: Downloading js player vflWnjS_n
[download] Destination: somevidR4hhU.webm
[download] 100% of 4.60MiB in 00:04
[ffmpeg] Destination: somevidR4hhU.mp3
ERROR: audio conversion failed: Unknown encoder 'libmp3lame'
I've tried to reinstall youtube-dl and lame with:
brew reinstall youtube-dl lame
but it makes no difference. Any idea what the problem may be?
Thanks in advance!

Homebrew doesn't install the lame. Compile with libmp3lame:
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-libmp3lame
make
make install
ffmpeg -version
That should fix it

The possible issue could be because of the broken symlink to ffmpeg. You could try below brew command if you have installed ffmpeg with brew.
brew link --overwrite ffmpeg
It fixed for me at least.
'libmp3lame' is an encoder for mp3 which is getting used by ffmpeg to convert to mp3.

Installing ffmpeg with this command solved the problem for me:
brew install --build-from-source ffmpeg

Related

How to install ffmpeg for Jupyter Notebook in Mac?

I used the pip install ffmpeg command to install ffmpeg onto my Jupyter Notebook.
However, when I try to run the animation command, I get the error:
MovieWriter ffmpeg unavailable; trying to use class 'matplotlib.animation.PillowWriter' instead.
How should I remedy this problem?
I used the command: brew install ffmpeg.
It worked

How to install ffmpeg on CentOS 6

I have been trying to install ffmpeg for 2 days now and had no luck. I have tried countless videos on youtube, step by steps on google with no luck. Any help would be great.
I have a Centos 6 server.
Yes I am using root ssh in terminal on mac.
Commands I tried are:
wget http://mirror.ffmpeginstaller.com/old/scripts/ffmpeg8/ffmpeginstaller.8.0. tar.gz
tar -xvzf ffmpeginstaller.8.0.tar.gz
cd ffmpeginstaller.8.0
./install.sh
Static build
Easiest method is to download a recent version that is already compiled.
Download a static build of ffmpeg from https://www.johnvansickle.com/ffmpeg/
Extract the archive file you just downloaded from the above site
(optional) Copy or move the ffmpeg file into /usr/local/bin
Compile
If you prefer to make a custom build you can compile. See FFmpeg Wiki: Compile FFmpeg on CentOS.

FFMPEG Install/enable 'libfdk_aac' after installed FFMPEG via PPA

I have linux MINT 17.3 Kernel 4.4.0-81 all update available. (For different reasons I can't move to newer version of ubuntu/mint)
I have installed FFMPEG via PPA (NOT from compiling the source):
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y
sudo apt-get update
sudo apt-get install -y ffmpeg
Then I tried to install libfdk-aac with guide:
https://trac.ffmpeg.org/wiki/CompilationGuide/Quick/libfdk-aac
sudo apt-get install pkg-config autoconf automake libtool
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./autogen.sh
./configure --enable-shared --enable-static
make
sudo make install
sudo ldconfig
But I'm still receive from FFMPEG: "unknown encoder 'libfdk_aac'"
How can I check if "libfdk_aac' is correctly installed and HOW CAN I ACTIVATE / ENABLE the 'libfdk_aac' on FFMPEG?
If is not possible in my situation, and if I'm obliged to remove all ffmpeg and follow this:
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
FFmpeg does not have a "plug-n-play" codec system. If you want to add another external codec you must compile FFmpeg.
Alternatively, you could find a static ffmpeg binary that includes your desired codecs, but this is not a likely option due to the non-free/GPL incompatible situation of the fdk-aac license.
Your best option if you want to use libfdk_aac is to follow the compile guide you linked to. You can even keep the ffmpeg you installed from that PPA because the guide does not interfere with any existing repository ffmpeg.

Installing libmp3lame to work with FFMPEG on raspberry pi

I am using the moviepy module with python 3.2 on my RPi 2. It uses FFMPEG to read and write the video, so I installed FFMPEG using these instructions to the letter. Now when I run the program, it says that my video export failed because FFMPEG didn't find the libmp3lame codec that it needs. How do I got about installing the libmp3lame codec onto my RPi 2 (running Raspian Wheezy)?
I think I have to reinstall FFMPEG to install the codec.. how do I do that correctly?
First, install lame mp3 with
sudo apt-get install libmp3lame-dev
and then recompile/build ffmpeg including the --enable-libmp3lame flag
./configure <other-configure-options> --enable-libmp3lame

how to install libx265 for ffmpeg build on centos 7

When I try to compile ffmpeg with libx265 (./configure --enable-gpl --enable-libx265), it is getting error as: (ERROR: x265 not found using pkg-config). How to install libx265 and get configure with ffmpeg.
There are two solutions to your problem.
A)
If there are no libx265 available on CentOS 7 then you'll have to build it yourself. It follows the pretty straightforward method of configure/make.
Using mercurial:
hg clone http://hg.videolan.org/x265
cd x265/build/linux
./make-Makefiles.bash
make -j6
make install
ldconfig
Then be sure to specify the path libx265 was installed to when building ffmpeg. With pkg-config: PKG_CONFIG_PATH="/usr/local/lib/pkgconfig".
B)
But it appears there are rpm entries for x265 on CentOS 7:
http://pkgs.org/centos-7/nux-dextop-x86_64/x265-devel-1.2-6.el7.nux.x86_64.rpm.html. If they are compatible on your system you should be able to simply install instead of building.
I wrote a script for Ubuntu recently, but I think it can be applied to CentOS. You need to comment off the Ubuntu apt-get in the script in order to get it running.
Also before you use it, please ensure that you have git and mercurial installed. My script pulls the latest copy of necessary libraries from either from git or mercurial.
https://github.com/tangingw/libx265_installer

Resources