Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fompsweeva

macrumors member
Original poster
Jun 6, 2012
82
102
Hi guys,

I'm attempting to write a command to convert .mov files from a video server.

I need to have embedded time code burnt in to the video, which ffmpeg can do with the drawtext command which requires libfreetype.

Apparently OS X already includes libfreetype, but in a strange place.

Mac OS X Lion comes with Freetype already installed (older versions may need 'X11' selected during installation), but in an atypical location: /usr/X11. Running freetype-config in Terminal can give the locations of the individual folders, like headers, and libraries, so be prepared to add lines like CFLAGS=`freetype-config --cflags` LDFLAGS=`freetype-config --libs` PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig before ./configure or add them to your $HOME/.profile file.

That makes a little sense to me, but not enough to actually know how to use that information to create a successful result.

Is there anyone that can help me out in directing ffmpeg to where it needs to look for libfreetype?

Thanks
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
What exactly have you tried? You're trying to compile ffmpeg following this guide ? : https://ffmpeg.org/trac/ffmpeg/wiki/MacOSXCompilationGuide.
What's the output of this :

Code:
freetype-config --libs --cflags

Have you tried to do what is said in the guide after you installed Homebrew, fdk-aac, libaacplus eg in Terminal :

Code:
CFLAGS=`freetype-config --cflags`
LDFLAGS=`freetype-config --libs`
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libaacplus \
--enable-libass --enable-libcelt --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame \
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-openssl \
--enable-libopus --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc \
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --prefix=/usr/local
make && make install

Does it configure? Does it compile? If not where does it error? What kind of error message do you get? Post screenshots of your errors.
 

sero

macrumors member
Aug 28, 2008
91
14
Is there anyone that can help me out in directing ffmpeg to where it needs to look for libfreetype?

Thanks

Code:
locate libfreetype

make sure that path is exported to your PATH env var. But if you're trying to compile.. you can prob just download a compiled version for your purposes. E.g., via macports, which will also sort out the dependencies for you (unlike homebrew).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.