Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ffmpeg not working after update to Mavericks

After recently updating to Mavericks 10.9.5, my installation of ffmpeg has been bugging out

Error:

dyld: Library not loaded: /usr/local/lib/libx264.142.dylib
  Referenced from: /usr/local/bin/ffmpeg
  Reason: image not found
Trace/BPT trap: 5

Any thoughts? I'm not very familar with manual compiling and I installed ffmpeg through Homebrew.

I tried uninstalling and doing:

brew install ffmpeg --HEAD
brew install ffmpeg --build-from-source

but it spits back a ./configure error

==> ./configure --prefix=/usr/local/Cellar/ffmpeg/2.4.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample
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
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

These open issues may also help:
gpac 0.5.0 doesn't build against ffmpeg 2.4.1 (https://github.com/Homebrew/homebrew/issues/32978)
like image 755
Hudson Buddy Avatar asked Oct 17 '14 19:10

Hudson Buddy


3 Answers

My solution after some fiddling.

brew uninstall ffmpeg
brew doctor

then it told me i had an unlinked ffmpeg and i had some dependencies

brew install faac lame xvid
brew doctor

then it told me i JUST had an unlinked item.

brew install ffmpeg

and it worked.

like image 53
chrisallick Avatar answered Oct 23 '22 03:10

chrisallick


brew upgrade ffmpeg

Worked for me

like image 5
n0nSmoker Avatar answered Oct 23 '22 03:10

n0nSmoker


I think this is worth sharing as pointed out by James. I had this similar issue and able to fix mine by looking into /usr/local/lib/ the location of the lib

dyld: Library not loaded: /usr/local/lib/libx264.142.dylib

$ ls -lsha /usr/local/lib/libx264.* 

In my case I found out that I have libx264 installed but a different version from what ffmpeg was looking for. I found

/usr/local/lib/libx264.152.dylib 

which is a symbolic link to actual installation location

/usr/local/Cellar/x264/r2854/lib/libx264.152.dylib

Notice it is only a difference of version number thus, I had to create a symbol link to the version that was needed by ffmpeg. With the command below, I was able to resolved this on MacOS 10.13

sudo ln -s /usr/local/Cellar/x264/r2854/lib/libx264.152.dylib /usr/local/lib/libx264.148.dylib

The only issue I would expect from this is incompatibility problem like function depreciation (because I am using a newer version) which did not occur. I hope this will help someone too. You will need to use the exact version available in your system if it is different from mine.

like image 4
Paullo Avatar answered Oct 23 '22 04:10

Paullo