[FFmpeg-user] Errors when run by PHP

Elliott Balsley elliottbalsley at gmail.com
Wed Oct 23 11:42:49 CEST 2013


I have a php application that uses ffmpeg, but it won’t run because it’s complaining about the wrong version of libfreetype.  I installed the latest libfreetype from git before compiling ffmpeg, but I notice OS X has an older version installed, and apparently that’s the one being used.  How can I specify which library to use?  And I thought that by using --enable-static when compiling ffmpeg, all libraries would be internalized, so this shouldn’t be happening?

Here is a simple PHP script for testing:
<?php
$output = shell_exec('/usr/local/bin/ffmpeg 2>&1');
echo "<pre>$output</pre>";
?>

PHP output:
dyld: Library not loaded: /opt/local/lib/libfreetype.6.dylib
 Referenced from: /usr/local/bin/ffmpeg
 Reason: Incompatible library version: ffmpeg requires version 17.0.0 or later, but libfreetype.6.dylib provides version 15.0.0
Results of otool:
$ otool -L /opt/local/lib/libfreetype.6.dylib 
/opt/local/lib/libfreetype.6.dylib:
	/opt/local/lib/libfreetype.6.dylib (compatibility version 17.0.0, current version 17.2.0)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
	/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
	/opt/local/lib/libpng15.15.dylib (compatibility version 33.0.0, current version 33.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
$ otool -L /usr/X11/lib/libfreetype.6.dylib 
/usr/X11/lib/libfreetype.6.dylib:
	/usr/X11/lib/libfreetype.6.dylib (compatibility version 15.0.0, current version 15.1.0)
	/usr/X11/lib/libxstub.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

I configured ffmpeg like this:
./configure --arch=x86_64 --enable-gpl --enable-version3 --enable-nonfree --enable-static --enable-libass --enable-libbluray --enable-libfdk-aac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-opencl --enable-libfreetype


More information about the ffmpeg-user mailing list