[FFmpeg-devel] relative fontconfig path

Helmut Tessarek tessarek at evermeet.cx
Sat Sep 1 22:14:48 CEST 2012


On 31.08.12 18:36 , Michael Niedermayer wrote:
> Iam not sure i understand the problem correctly but if you statically
> include some libs with ffmpeg and one of these libs doesnt find its
> configuration files on some platform how is this related to ffmpeg ?
> we could if that lib supports it allow to force some path via the
> drawtext options or you could just fix that lib so it finds its
> configuration files on all platforms that you want to support.

Maybe I didn't explain it correctly. I'll try again:

1) It does not matter, if you link it statically or not.
2) It happens on all platforms.
3) There is nothing wrong with the lib nor with ffmpeg. It is just bad design.

This is what happens: You want to include fontconfig with ffmpeg. Therefore
you have to compile fontconfig or use an installed fontconfig library.
This fontconfig library uses a hard coded path to search for its config files,
which you had to define at configure/compile time. (It is either PREFIX/etc or
the path you specified in --sysconfdir.)

If you use this library with ffmpeg and use any options in ffmpeg that
requires the fontconfig library (libass, drawtext), you might end up getting
an error that libass, drawtext, and thus fontconfig cannot find its
configuration file.

To solve this you can set a environment variable FONTCONFIG_PATH, which has to
be set before starting ffmpeg (or any other program that wants to use
fontconfig for that matter).

Setting this env var sucks, especially if you want to distribute ffmpeg as a
single executable or if you include in within another application.
Therefore I would like to give ffmpeg the possibility to use a relative path
to its own location to search for the fontconfig file.

Do you understand where I am getting at?

Cheers,
 Helmut



-- 
regards Helmut K. C. Tessarek
lookup http://sks.pkqs.net for KeyID 0xC11F128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/


More information about the ffmpeg-devel mailing list