Answers.Body: <p>Using this drawtext in a program I wrote to embed Created dates into images, I found that you have to escape some characters like colons and backslashes using some versions of FFmpeg with the '<code>\</code>' escape character as you did in the timecode sequence. Also enclose paths in single quotes for possible spaces in path or name:</p>
  
  <pre><code>drawtext=fontfile='c\\:\\\Windows\\\Fonts\\\Times.ttf'
  </code></pre>
  
  <p>or</p>
  
  <pre><code>ffmpeg -i in.mts -vf "drawtext=fontfile='C\\:\\\Windows\\\fonts\\\truetype\\\DroidSans.ttf': timecode='09\\:57\\:00\\:00': r=25: \\x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -an -y out.avi
  </code></pre>
  
  <p>Also some fonts contain multiple <code>.ttf</code> files like Times New Roman.  Double clicking this shows Times New Roman Regular, Times New Roman Bold, etc. Times new Roman Regular properties shows its name is <code>Times.ttf</code>.  Be sure to use the correct one.</p>
  
  <p><a href="https://i.sstatic.net/zX6fu.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zX6fu.jpg" alt="Font Main Folder"></a></p>
  
  <p><a href="https://i.sstatic.net/XR0nf.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XR0nf.jpg" alt="Actual Fonts and Names"></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-30T22:12:01.807Z
Answers.LastActivityDate: 2015-12-31T19:42:35.383Z
Answers.LastEditDate: 2015-12-31T19:42:35.383Z
Answers.UserDisplayName: Budman1
Answers.Body: <p>Got it. The error is cuased by the font location in the command is of a Linux computer. The font location need to be different for windows.</p>
  
  <p>The error caused by this line in the command: <code>drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf</code></p>
  
  <p>The above line does not work in Windows. </p>
  
  <p>For windows change to: <code>drawtext=fontfile=/Windows/Fonts/arial.ttf</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-19T12:23:52.010Z
Answers.LastActivityDate: 2015-04-19T12:23:52.010Z
Answers.UserDisplayName: Kash
Body: <p>I have got this error message when using ffmpeg</p>
  
  <pre><code>[Parsed_drawtext_0 @ 03bdc300] Could not load font "/Library/Fonts/DroidSansMono.ttf": cannot open resource
  Fontconfig error: Cannot load default config file
  [Parsed_drawtext_0 @ 03bdc300] impossible to init fontconfig
  [AVFilterGraph @ 03d9b840] Error initializing filter 'drawtext' with args 'fontsize=15:fontfile=/Lib
  rary/Fonts/DroidSansMono.ttf:timecode=00\:00\:00\:00:rate=25:text=TCR\::fontsize=72:fontcolor=white:
  boxcolor=0x000000AA:box=1:x=860-text_w/2:y=960'
  Error opening filters!
  </code></pre>
  
  <p>Does anyone know how can I resolve this issue?</p>
  
  <p>I'm using ffmpeg on Windows 7. I've downloaded ffmpeg from ffmpeg.zeranoe.com/builds</p>
  
  <p>This is what I entered and what came up:</p>
  
  <pre><code>c:\ffmpeg\bin&gt;ffmpeg -i in.mts -vf "drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf: timec
  ode='09\:57\:00\:00': r=25: \x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1"
  -an -y out.avi
  ffmpeg version N-70634-g3bedc99 Copyright (c) 2000-2015 the FFmpeg developers
    built with gcc 4.9.2 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzli
  b --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu
  ray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-
  libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
  b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr -
  -enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
  enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enab
  le-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
  le-zlib
    libavutil      54. 20.100 / 54. 20.100
    libavcodec     56. 26.100 / 56. 26.100
    libavformat    56. 25.101 / 56. 25.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 12.100 /  5. 12.100
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  1.100 /  1.  1.100
    libpostproc    53.  3.100 / 53.  3.100
  Input #0, mpegts, from 'in.mts':
    Duration: 00:00:23.42, start: 1.040000, bitrate: 9937 kb/s
    Program 1
      Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1440x1080 [SAR 4:3 DAR 16:
  9], 25 fps, 25 tbr, 90k tbn, 50 tbc
      Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
      Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
  [Parsed_drawtext_0 @ 02ac2f20] Could not load font "/usr/share/fonts/truetype/DroidSans.ttf": cannot
   open resource
  Fontconfig error: Cannot load default config file
  [Parsed_drawtext_0 @ 02ac2f20] impossible to init fontconfig
  [AVFilterGraph @ 03cdb840] Error initializing filter 'drawtext' with args 'fontfile=/usr/share/fonts
  /truetype/DroidSans.ttf: timecode=09\:57\:00\:00: r=25: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box
  =1: boxcolor=0x00000000@1'
  Error opening filters!
  
  c:\ffmpeg\bin&gt;
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-18T01:26:27.687Z
Comments.Text: Please show the actual command and the complete console output.
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-18T16:53:06.300Z
Comments.Text: I have entered my info by editing my original question. let me know if I need to include anything else @LordNeckbeard
Comments.UserDisplayName: Kash
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-18T19:50:31.760Z
Comments.Text: You're on Windows, but your path to the font looks like *nix.
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-19T00:50:03.757Z
Comments.Text: I see. What should the path look like for the windows?
Comments.UserDisplayName: Kash
Tags: <ffmpeg>
Title: How to resolve ffmpeg error cannot load default config file?
UserDisplayName: Kash
ThreadText: # How to resolve ffmpeg error cannot load default config file?
  
  (Asked by: username_0 on 2015-04-17)
  
  I have got this error message when using ffmpeg
  
  ```
  [Parsed_drawtext_0 @ 03bdc300] Could not load font "/Library/Fonts/DroidSansMono.ttf": cannot open resource
  Fontconfig error: Cannot load default config file
  [Parsed_drawtext_0 @ 03bdc300] impossible to init fontconfig
  [AVFilterGraph @ 03d9b840] Error initializing filter 'drawtext' with args 'fontsize=15:fontfile=/Lib
  rary/Fonts/DroidSansMono.ttf:timecode=00\:00\:00\:00:rate=25:text=TCR\::fontsize=72:fontcolor=white:
  boxcolor=0x000000AA:box=1:x=860-text_w/2:y=960'
  Error opening filters!
  
  ```
  
  Does anyone know how can I resolve this issue?
  
  I'm using ffmpeg on Windows 7. I've downloaded ffmpeg from ffmpeg.zeranoe.com/builds
  
  This is what I entered and what came up:
  
  ```
  c:\ffmpeg\bin>ffmpeg -i in.mts -vf "drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf: timec
  ode='09\:57\:00\:00': r=25: \x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1"
  -an -y out.avi
  ffmpeg version N-70634-g3bedc99 Copyright (c) 2000-2015 the FFmpeg developers
    built with gcc 4.9.2 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzli
  b --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu
  ray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-
  libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
  b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr -
  -enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
  enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enab
  le-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
  le-zlib
    libavutil      54. 20.100 / 54. 20.100
    libavcodec     56. 26.100 / 56. 26.100
    libavformat    56. 25.101 / 56. 25.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 12.100 /  5. 12.100
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  1.100 /  1.  1.100
    libpostproc    53.  3.100 / 53.  3.100
  Input #0, mpegts, from 'in.mts':
    Duration: 00:00:23.42, start: 1.040000, bitrate: 9937 kb/s
    Program 1
      Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1440x1080 [SAR 4:3 DAR 16:
  9], 25 fps, 25 tbr, 90k tbn, 50 tbc
      Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
      Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
  [Parsed_drawtext_0 @ 02ac2f20] Could not load font "/usr/share/fonts/truetype/DroidSans.ttf": cannot
   open resource
  Fontconfig error: Cannot load default config file
  [Parsed_drawtext_0 @ 02ac2f20] impossible to init fontconfig
  [AVFilterGraph @ 03cdb840] Error initializing filter 'drawtext' with args 'fontfile=/usr/share/fonts
  /truetype/DroidSans.ttf: timecode=09\:57\:00\:00: r=25: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box
  =1: boxcolor=0x00000000@1'
  Error opening filters!
  
  c:\ffmpeg\bin>
  
  ```
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Please show the actual command and the complete console output.  
  > **username_0**: I have entered my info by editing my original question. let me know if I need to include anything else @LordNeckbeard  
  > **username_1**: You're on Windows, but your path to the font looks like *nix.  
  > **username_0**: I see. What should the path look like for the windows?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-04-19. Score: 4 | Accepted answer
  
  Got it. The error is cuased by the font location in the command is of a Linux computer. The font location need to be different for windows.
  
  The error caused by this line in the command: `drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf`
  
  The above line does not work in Windows.
  
  For windows change to: `drawtext=fontfile=/Windows/Fonts/arial.ttf`
  
  
  ---
  
  ### Answer by username_2 on 2015-12-30. Score: 2
  
  Using this drawtext in a program I wrote to embed Created dates into images, I found that you have to escape some characters like colons and backslashes using some versions of FFmpeg with the '`\`' escape character as you did in the timecode sequence. Also enclose paths in single quotes for possible spaces in path or name:
  
  ```
  drawtext=fontfile='c\\:\\\Windows\\\Fonts\\\Times.ttf'
  
  ```
  
  or
  
  ```
  ffmpeg -i in.mts -vf "drawtext=fontfile='C\\:\\\Windows\\\fonts\\\truetype\\\DroidSans.ttf': timecode='09\\:57\\:00\\:00': r=25: \\x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -an -y out.avi
  
  ```
  
  Also some fonts contain multiple `.ttf` files like Times New Roman. Double clicking this shows Times New Roman Regular, Times New Roman Bold, etc. Times new Roman Regular properties shows its name is `Times.ttf`. Be sure to use the correct one.
  
  [![Font Main Folder](https://i.sstatic.net/zX6fu.jpg)](https://i.sstatic.net/zX6fu.jpg)
  
  [![Actual Fonts and Names](https://i.sstatic.net/XR0nf.jpg)](https://i.sstatic.net/XR0nf.jpg)
  
  
  ---
  
  