Home-brew install ffmpeg macOS High Sierra 10.13.4


(Twwwwizz) #1

I get this warning for $ brew reinstall ffmpeg
Warning: ffmpeg dependency libmodplug was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.

When I try to run ffmpeg I get

$ ffmpeg
dyld: Library not loaded: /usr/local/opt/rubberband/lib/librubberband.2.dylib
Referenced from: /usr/local/bin/ffmpeg
Reason: image not found
Abort trap: 6

How do I install ffmpeg? Afraid I don’t understand the install process.


(Sean Molenaar) #2

what does brew doctor say?


(Twwwwizz) #3

Your system is ready to brew.

Since my initial post I have made a copy of librubberband.dylib and renamed it librubberband.2.dylib - and ffmpeg now works ok - but I’m not sure that’s a good solution!


(Sean Molenaar) #4

I’m pretty sure that’s not a good solution. What options do you have enabled for ffmpeg?


(Twwwwizz) #5

$ ffmpeg
ffmpeg version 4.0 Copyright © 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags=’-I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include/darwin’ --host-ldflags= --enable-gpl --enable-chromaprint --enable-ffplay --enable-frei0r --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopus --enable-librtmp --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzmq --enable-opencl --enable-videotoolbox --enable-openssl --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. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…


(Sean Molenaar) #6

You seem to have used --with-rubberband when installing. If you don’t really need it you might just want to use the bottled ffmpeg and remove the current formula before installing it without any options.


(Andrew Janke) #7

I can reproduce this with a simple brew install ffmpeg --with-rubberband. This looks like there’s an issue with the formula and its interaction with ffmpeg’s detection of librubberband: it’s looking for a versioned dylib that doesn’t exist.

$ brew install ffmpeg --with-rubberband
==> Installing dependencies for ffmpeg: nasm, texi2html
==> Installing ffmpeg dependency: nasm
==> Downloading https://homebrew.bintray.com/bottles/nasm-2.13.03.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring nasm-2.13.03.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/nasm/2.13.03: 30 files, 2.6MB
==> Installing ffmpeg dependency: texi2html
==> Downloading https://homebrew.bintray.com/bottles/texi2html-5.0.high_sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring texi2html-5.0.high_sierra.bottle.1.tar.gz
🍺  /usr/local/Cellar/texi2html/5.0: 279 files, 6.2MB
==> Installing ffmpeg --with-rubberband
==> Downloading https://ffmpeg.org/releases/ffmpeg-4.0.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables
 ==> make install
Broken dependencies:
  /usr/local/opt/rubberband/lib/librubberband.2.dylib (rubberband)
Warning: ffmpeg has broken dynamic library links:

==> Summary
🍺  /usr/local/Cellar/ffmpeg/4.0: 246 files, 49.5MB, built in 8 minutes 20 seconds
[/u/l/bin]
$  ffmpeg
dyld: Library not loaded: /usr/local/opt/rubberband/lib/librubberband.2.dylib
  Referenced from: /usr/local/bin/ffmpeg
  Reason: image not found
[1]    34267 abort      ffmpeg
[/u/l/bin]
$

A quick grep through the ffmpeg source and the rubberband installed keg didn’t come up with any leads for me. But looking at the built librubberband.dylib, it looks like the problem is with the rubberband installation itself: that librubberband.dylib is linking to the nonexistent librubberband.2.dylib.

[/u/l/C/r/1/lib]
$ pwd
/usr/local/Cellar/rubberband/1.8.2/lib
[/u/l/C/r/1/lib]
$ otool -L librubberband.dylib
librubberband.dylib:
	/usr/local/opt/rubberband/lib/librubberband.2.dylib (compatibility version 2.0.0, current version 2.1.1)
	/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)

I’ll play around with this to see why it’s happening.


(Andrew Janke) #8

Yep, our rubberband formula is broken. Bug report: https://github.com/Homebrew/homebrew-core/issues/28660


(Andrew Janke) #9

The rubberband formula is fixed now: https://github.com/Homebrew/homebrew-core/pull/28661

If you do a brew update; brew upgrade, it should work now.