ffmpeg unable to find encoder libvpx
Question
when i run
ffmpeg -y -i test.mov -threads 8 -f webm -aspect 16:9 -vcodec libvpx -deinterlace -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -rc_buf_aggressivity 0.95 -vb 2M -acodec libvorbis -aq 90 -ac 2 OUTPUT_FILE.webm
it returns an error saying Unknown encoder 'libvpx'
I installed libvpx, libvorbis, libogg, and ffmpeg all via macports
Solution
Your configuration of macports was not built with libvpx. Try uninstalling ffmpeg and using Homebrew to install the package instead of macports:
brew install ffmpeg --with-libvpx
or
brew reinstall ffmpeg --with-libvpx
Then your command should work.
OTHER TIPS
I'm not sure how and if it's possible to change the default configuration on Macports. Anyway, you can do it the manual way.
Open terminal and cd to your preferred directory. Before installing, check if, where and what version of ffmpeg you have install. Use which ffmpeg
, then port uninstall ffmpeg
and then which ffmpeg
again to verify ffmpeg was uninstall properly.
Download the source code from:
git clone https://github.com/FFmpeg/FFmpeg ffmpeg
cd to the ffmpeg directory
cd ffmpeg
configure and make with your configuration, use "./configure --help" to get information regarding possible configuration
./configure --extra-cflags=-I/opt/local/include --extra-ldflags=-L/opt/local/lib --enable-gpl --enable-version3 --enable-nonfree --enable-libvpx --enable-libvorbis
I recommend adding the extra c/ld flags because /opt/local/ is the default macport install directory.
Make, install ffmpeg
make
sudo make install
There are a lot of fallbacks in these steps, ask in the comments if you have any issue.
Due to all the dependencies building ffmpeg from source is a nightmare on OS X. It will take you days to get it to build properly.
Don't bother.
Instead just download the static binary from https://www.ffmpeg.org/download.html and copy it into /usr/local/bin