Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fontconfig error: Cannot load default config file #18
I am using one of the prebuilt binaries in my project and am trying to draw text over a video file.
I am executing the process using a complex command in the form of a String instead of converting an ArrayList to a one command string. I had to do this to allow for the use of complex filters as having single or double quotes in a single string command doesn't work.
The binaries compiled claim to include libfreetype and libfribidi. The documentation for drawtext (http://ffmpeg.org/ffmpeg-filters.html#drawtext-1) says that libfontconfig also needs to be included to enable the font feature and the default font fallback feature.
This seems like a catch 22 as if you don't want include a font, ffmpeg has no way of falling back to a default.
Can you let me know if libfontconfig should be included and if not, would it be possible to make a prebuilt binary with it enabled? (I'd do it myself but am having trouble compiling)
Here is the complex command I am running:
Here is the shell output:
@hiteshsondhi88 Thanks for responding. Since posting the question I've double checking what is included in the ffmpeg_build.sh. I can see that all the required font libraries are enabled. However it is unclear to me how to follow the instructions relating to fontconfig.
Just to confirm, Is the instruction to set an environment variable before compilation, with a path of a yet to exist fonts.conf file, decided in advance? Any clues on what should be in the fonts.conf file?
You can check sample fontconfig files here - https://wiki.archlinux.org/index.php/Font_configuration#Example_fontconfig_configurations
@hiteshsondhi88 never mind resolved, it was actually a silly question. attached a android working fonts.conf, pointing to /system/fonts. Only issue is that ffmpeg try to use Arial and falls back to something else, but that's totally ok. Maybe I can put arial.ttf in my app and set a different dir for the font.
@hiteshsondhi88 Hi! I have compiled ffmpeg with FONTCONFIG_FILE provided, and I successfully run with adb run-as my_package
Have any suggestions?