VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Apr 2012
    Location
    Ireland
    Search Comp 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/HowToBurnSubtitlesIntoVideo

    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:
    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:

    Code:
    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/fontconfig/fontconfig-user.html

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

    Then I tried the command:

    Code:
    ffmpeg -i {input}.mkv -vf subtitles={input}.srt -codec:v libx264 -codec:a ac3 {output}.mp4
    I get the following fontconfig error:

    Code:
    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.
    Quote Quote  
  2. Member
    Join Date
    Apr 2012
    Location
    Ireland
    Search Comp PM
    Originally Posted by Baldrick View Post
    Thanks the reply - yes I did and in fact tried some of the conf example there, but like people in the thread also got the same "invalid attributes" errors.

    P.
    Quote Quote  
  3. I had a similar problem (No usable fontconfig configuration found, using fallback.) using a fonts.conf from an "official" site.

    Anyway, using the fonts.conf that comes with DVDStyler solved my problems. Perhaps worth a try. Attached.
    Image Attached Files
    Quote Quote  
  4. Member
    Join Date
    Apr 2012
    Location
    Ireland
    Search Comp PM
    BRILLIANT. Many many thanks. Just to note for anyone else using it, there's what looks like a freeze/hang just after you run ffmpeg using this, but I presume there's some font-processing occuring - after 30 seconds encoding starts.

    P.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!