2008-04-04 17:56:19 Problems building videohook: "drawtext"
Frank Van Hooft (CANADA)
Message: 53656 With ffmpeg working nicely (BF537, 2008R1), I'd like to be able to add captions to its output. The example videohook filter "drawtext" looks like it would be a nice fit. But I'm having trouble building it, and wondering if anyone has any experience with it?
Right off the bat I was getting compile errors in drawtext.c, from the following two lines:
#include FT_FREETYPE_H
#include FT_GLYPH_H
I changed those lines to:
#include <ftglyph.h>
#include <freetype.h>
That stopped the compile errors. (Hopefully I did the right thing :-).
Also, obviously the freetype library is required, so I enabled "Build freetype" in menuconfig. I see freetype being built, a bunch of freetype .o files are created, etc. However, drawtext.so is still not being built. I suspect it's because somewhere the ffmpeg make system isn't aware freetype is being built - during the "make" I see the following output:
<snip>
make -C ffmpeg
make[3]: Entering directory `/home/frank/blackfin-sources/branch-2008R1/uclinux-dist/lib/ffmpeg'
find ffmpeg-svn-11114 -type f -print0 | xargs -0 touch -r ffmpeg-svn-11114/configure
set -e ; \
rm -rf build ; \
mkdir build ; \
cd build ; \
SDL_CONFIG=/home/frank/blackfin-sources/branch-2008R1/uclinux-dist/staging/usr/bin/sdl-config \
../ffmpeg-svn-11114/configure \
--prefix=/usr \
--source-path=$PWD/../ffmpeg-svn-11114 \
--target-os=Linux \
--cpu=bfin \
--arch=bfin \
--extra-ldflags=" -mcpu=bf537-0.2" \
--enable-static \
--enable-shared \
--enable-gpl \
--enable-pp \
--disable-strip \
--cross-prefix=bfin-linux-uclibc-
install prefix /usr
source path /home/frank/blackfin-sources/branch-2008R1/uclinux-dist/lib/ffmpeg/build/../ffmpeg-svn-11114
C compiler bfin-linux-uclibc-gcc
make make
.align is power-of-two no
ARCH bfin (bfin)
big-endian no
gprof enabled no
debug symbols yes
strip symbols no
optimizations yes
static yes
shared yes
postprocessing support yes
software scaler enabled no
video hooking yes
Imlib2 support no
FreeType support no
network support yes
IPv6 support yes
threading support no
SDL support no
Sun medialib support no
AVISynth enabled no
liba52 support no
liba52 dlopened no
libamr-nb support no
libamr-wb support no
libdc1394 support no
libfaac enabled no
libfaad enabled no
libfaad dlopened no
libgsm enabled no
libmp3lame enabled no
libnut enabled no
libtheora enabled no
libvorbis enabled no
x264 enabled no
XviD enabled no
zlib enabled yes
License: GPL
Enabled decoders:
<snip>
I've been digging through files without success - any suggestions on how to proceed from here?
Thanks!
QuoteReplyEditDelete
2008-04-04 19:23:48 Re: Problems building videohook: "drawtext"
Mike Frysinger (UNITED STATES)
Message: 53661 changing those lines ignores the problem, it doesnt fix it ... if freetype was being properly included, those lines would have been replaced with the proper include.
you'll have to build up freetype and make sure ffmpeg can find it during configure.
QuoteReplyEditDelete
2008-04-04 20:54:46 Re: Problems building videohook: "drawtext"
Frank Van Hooft (CANADA)
Message: 53665 Ahh - thank you. I was very puzzled by those two #include lines - they made no sense to me. What you're saying makes sense - I'll try something different.
QuoteReplyEditDelete
2008-04-06 20:11:40 Re: Problems building videohook: "drawtext"
Frank Van Hooft (CANADA)
Message: 53712 Managed to get drawtext to build by installing freetype on my development PC (as well as enabling it in menuconfig). It appears that the FFMPEG build script scans the host development PC looking for freetype. If it finds it, it's happy and automagically does the various #includes.
It seems the #include files are read from the development machine's freetype files, not from the blackfin source directory 2008R1 freetype files. So making sure the two freetypes are the same version is obviously a good idea - currently that would be version 2.3.5
QuoteReplyEditDelete
2008-04-07 08:16:08 Re: Problems building videohook: "drawtext"
Robin Getz (UNITED STATES)
Message: 53750 Frank:
It should just look at the build system - if it doesn't - it is a bug in the config scripts (which I know that ffpmeg's has known problems in it).
Someone will have a quick look.
-Robin