[FFmpeg-user] Compiling ffmpeg version n3.4.5

Moritz Barsnick barsnick at gmx.net
Thu Apr 4 12:35:06 EEST 2019


On Thu, Apr 04, 2019 at 09:39:51 +0300, Shay Nagar wrote:
> On Thu, Apr 4, 2019 at 9:33 AM Dennis Mungai <dmngaie at gmail.com> wrote:
> > Is there a particular reason as to why you're compiling that specific
> > FFmpeg version?
> This version compliance with our cv team. we worked on version n3.3.9 and
> now we want to update our prod server to n3.4.5

Is this for ABI/API compatibility, or for command line? For the latter,
latest ffmpeg should be just fine, apart from very minor changes.

BTW, 3.4.*6* is latest in the 3.x series.

> > > I trying to compile ffmpeg like this
> > > "PKG_CONFIG_PATH=/usr/local/src/ffmpeg/lib/pkgconfig ./configure
> > > --prefix=/opt/ffmpeg --extra-cflags=-I/opt/ffmpeg/include
> > > --extra-ldflags=-L/opt/ffmpeg/lib --pkg-config-flags=--static
> > > --bindir=/opt/ffmpeg/bin --enable-openssl --enable-gpl --enable-nonfree
> > > --enable-libfreetype --enable-libtheora --enable-libvpx --enable-libx264
> > > --enable-libx265"
> > >
> > > I got an error "ERROR: freetype2 not found",  I installed freetype-devel
> > > version 2.8 using yum.

Do you actually need libfreetype support? It's only required for the
drawtext and showcqt filters. Easiest fix: Don't include that support
if you don't need it. ;-)

You'll find a quite long log from ./configure in ffbuild/config.log. My
./configure run, using freetype-devel-2.3.x standard RPM (!!), tested
with said ffmpeg-3.4.5, works just fine and gives this relevant output
for freetype:

require_pkg_config libfreetype2 freetype2 ft2build.h FT_FREETYPE_H FT_Init_FreeType
use_pkg_config libfreetype2 freetype2 ft2build.h FT_FREETYPE_H FT_Init_FreeType
check_pkg_config libfreetype2 freetype2 ft2build.h FT_FREETYPE_H FT_Init_FreeType
pkg-config --exists --print-errors freetype2
check_func_headers ft2build.h FT_FREETYPE_H FT_Init_FreeType -I/usr/include/freetype2 -lfreetype
check_ld cc -I/usr/include/freetype2 -lfreetype
check_cc -I/usr/include/freetype2
BEGIN /tmp/ffconf.FTVLOUCB/test.c
    1   #include <ft2build.h>
    2   #include FT_FREETYPE_H
    3   #include <stdint.h>
    4   long check_FT_Init_FreeType(void) { return (long) FT_Init_FreeType; }
    5   int main(void) { int ret = 0;
    6    ret |= ((intptr_t)check_FT_Init_FreeType) & 0xFFFF;
    7   return ret; }
END /tmp/ffconf.FTVLOUCB/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -I/usr/include/freetype2 -c -o /tmp/ffconf.FTVLOUCB/test.o /tmp/ffconf.FTVLOUCB/test.c
gcc -Wl,--as-needed -Wl,-z,noexecstack -I/usr/include/freetype2 -o /tmp/ffconf.FTVLOUCB/test /tmp/ffconf.FTVLOUCB/test.o -lfreetype -lm -ldl -llzma -lbz2 -lz -pthread -pthread -lrt

Can you check your config.log, search for the line with "require_pkg_config
libfreetype2", and show us the subsequent relevant lines (probably
everything from there to the end of the file)? Thanks.

Can you show us the output of
$ PKG_CONFIG_PATH=/usr/local/src/ffmpeg/lib/pkgconfig pkg-config --cflags --libs freetype2
?

Moritz


More information about the ffmpeg-user mailing list