ffmpeg & burnt-in subtitles - is fontconfig at fault here?

Any other question that don't fit into the other support categorizes.
Post Reply
oceanclub
Posts: 3
Joined: Sun Mar 29, 2015 1:23 pm

ffmpeg & burnt-in subtitles - is fontconfig at fault here?

Post by oceanclub » Sun Mar 29, 2015 1:25 pm

I'm trying to use ffmpeg to create MP4 files with burnt-in subtitles (from a .srt file) as described in:

https://trac.ffmpeg.org/wiki/HowToBurnS ... sIntoVideo

I'm having no luck. I get an output file, but no burnt in subtitles. The issue could be fontconfig.

I'm using ffmpeg on Windows 7 (64 bit), built with --enable-libass as required:

Code: Select all

E:\Downloads>ffmpeg -h
ffmpeg version N-69190-g6c559a0 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 22 2015 03:13:44 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
 --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
le-zlib
  libavutil      54. 17.100 / 54. 17.100
  libavcodec     56. 20.100 / 56. 20.100
  libavformat    56. 19.100 / 56. 19.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5.  8.101 /  5.  8.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Hyper fast Audio and Video encoder
In the home directory, I added a fonts.conf file for fontconfig, and set up the relevant environment variables:

FC_CONFIG_DIR=C:\Program Files\ffmpeg
FONTCONFIG_FILE=fonts.conf
FONTCONFIG_PATH=C:\Program Files\ffmpeg

Then I took an example fonts.conf file from here:
http://www.freedesktop.org/software/fon ... -user.html

Replacing <dir>/usr/share/fonts</dir> with <dir>C:\Windows\Fonts</dir> for my environment.

Then I tried the command:

ffmpeg -i {input}.mkv -vf subtitles={input}.srt -codec:v libx264 -codec:a ac3 {output}.mp4

I get the following fontconfig error:

Fontconfig error: line 22: invalid attribute 'mode'
Fontconfig error: line 23: invalid attribute 'mode'
Fontconfig error: line 24: invalid attribute 'mode'
Fontconfig error: line 80: not well-formed (invalid token)
Fontconfig error: Cannot load default config file
[Parsed_subtitles_0 @ 0000000004ee9f20] No usable fontconfig configuratio
found, using fallback.
Fontconfig error: line 22: invalid attribute 'mode'
Fontconfig error: line 23: invalid attribute 'mode'
Fontconfig error: line 24: invalid attribute 'mode'
Fontconfig error: line 80: not well-formed (invalid token)
Fontconfig error: Cannot load default config file

I don't understand the issues with "invalid attribute" since I'm using an official conf file. Any help appreciated,

P.

Post Reply
'