Skip to content

Instantly share code, notes, and snippets.

@requeijaum
Forked from florentroques/ffmpeg-install.md
Last active July 3, 2018 01:15
Show Gist options
  • Save requeijaum/86f2d529bdc1ce56b3c00a82d1e1f474 to your computer and use it in GitHub Desktop.
Save requeijaum/86f2d529bdc1ce56b3c00a82d1e1f474 to your computer and use it in GitHub Desktop.
Install FFMPEG with all flags on OS X with HomeBrew

You can find the latest --with-something options in the ruby gem

As of posting, the installation with all options is:

brew install ffmpeg --with-chromaprint --with-fdk-aac --with-libass --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rtmpdump --with-rubberband --with-sdl2 --with-snappy --with-srt --with-tools --with-webp --with-x265 --with-xz --with-zeromq --with-zimg

As of July 2nd, I am getting some issues...

iHack-de-Rafael:~ requeijaum$ brew missing
iHack-de-Rafael:~ requeijaum$ export HOMEBREW_ENV_FILTERING=1
iHack-de-Rafael:~ requeijaum$ brew install ffmpeg --with-chromaprint --with-fdk-aac --with-libass --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rtmpdump --with-rubberband --with-sdl2 --with-snappy --with-srt --with-tools --with-webp --with-x265 --with-xz --with-zeromq --with-zimg
Updating Homebrew...
==> Downloading https://ffmpeg.org/releases/ffmpeg-4.0.1.tar.xz
Already downloaded: /Users/requeijaum/Library/Caches/Homebrew/ffmpeg-4.0.1.tar.xz
==> ./configure --prefix=/usr/local/Cellar/ffmpeg/4.0.1 --enable-shared --enable
Last 15 lines from /Users/requeijaum/Library/Logs/Homebrew/ffmpeg/01.configure:
--enable-openssl
--enable-libsrt
--enable-lzma
--enable-libopenjpeg
--disable-decoder=jpeg2000
--extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3
--enable-nonfree

ERROR: librsvg-2.0 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

The solution can be:

Omitting the "--with-librsvg" flag

brew install --use-clang --with-chromaprint --with-fdk-aac --with-libass --disable-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rtmpdump --with-rubberband --with-sdl2 --with-snappy --with-srt --with-tools --with-webp --with-x265 --with-xz --with-zeromq --with-zimg --HEAD ffmpeg

Warning: ffmpeg: this formula has no --use-clang option so it will be ignored!
==> Cloning https://github.com/FFmpeg/FFmpeg.git
Updating /Users/requeijaum/Library/Caches/Homebrew/ffmpeg--git
==> Checking out branch master
==> ./configure --prefix=/usr/local/Cellar/ffmpeg/HEAD-581bafa --enable-shared --enable-pt

==> make install
==> make alltools
🍺  /usr/local/Cellar/ffmpeg/HEAD-581bafa: 283 files, 54.2MB, built in 17 minutes 1 second
iHack-de-Rafael:~ requeijaum$ 
iHack-de-Rafael:~ requeijaum$ ffmpeg
ffmpeg version git-2018-07-03-581bafa Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-581bafa --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-chromaprint --enable-ffplay --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-librtmp --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libssh --enable-libtesseract --enable-libvidstab --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzmq --enable-opencl --enable-videotoolbox --enable-openssl --enable-libsrt --enable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 20.104 / 58. 20.104
  libavformat    58. 17.101 / 58. 17.101
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 25.100 /  7. 25.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

Reinstalling librsvg and linking it?

didn't test that, though   :^)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment