<p>Font paths have to be escaped:</p>

<p><code>fontfile='c\:\\Windows\\Fonts\\simsun.ttc'</code></p>

CC BY-SA 3.0
2017-11-14T17:19:38.997Z
I have tried this, but still went wrong with the same error.
Wayne Chen
CC BY-SA 3.0
2017-11-14T17:31:23.953Z
Quote the path.
Gyan
CC BY-SA 3.0
2017-11-14T17:00:23.847Z
2017-11-14T17:31:14.637Z
2017-11-14T17:31:14.637Z
Gyan
<p>I use ffmpeg like this:</p>

<pre><code>ffmpeg -i MyOwnSwordsman01.avi -filter_complex "drawtext=fontfile=c:/Windows/Fonts/simsun.ttc: text='第01回 %{pts\:gmtime\:0\:%M：%S}/43：20': x=5: y=466: fontsize=16: fontcolor=yellow@0.9: box=1: boxcolor=blue@0.6" -c:a copy -c:v libx264 -map 0 stamped/MyOwnSwordsman01.avi
</code></pre>

<p>It went wrong:</p>

<pre><code>[Parsed_drawtext_0 @ 00000000025fae80] Cannot find a valid font for the family Sans
[AVFilterGraph @ 0000000000e3a160] Error initializing filter 'drawtext' with args 'fontfile=c:/Windows/Fonts/simsun.ttc: text=绗?1鍥?%{pts\:gmtime\:0\:%M\\:%S}/43锛?0: x=5: y=466: fontsize=16: fontcolor=yellow@0.9: box=1: boxcolor=blue@0.6'
Error initializing complex filters.
No such file or directory
</code></pre>

<p>So what's the matter? I have confirmed there is a simsun.ttc in C\ disk.</p>

<p>Thanks a lot!</p>

<ffmpeg><filter>
ffmpeg error "Error initializing complex filters"
Wayne Chen
# ffmpeg error "Error initializing complex filters"

(Asked by: username_0 on 2017-11-14)

I use ffmpeg like this:
ffmpeg -i MyOwnSwordsman01.avi -filter_complex "drawtext=fontfile=c:/Windows/Fonts/simsun.ttc: text='第01回 %{pts\:gmtime\:0\:%M：%S}/43：20': x=5: y=466: fontsize=16: fontcolor=yellow@0.9: box=1: boxcolor=blue@0.6" -c:a copy -c:v libx264 -map 0 stamped/MyOwnSwordsman01.avi

It went wrong:
[Parsed_drawtext_0 @ 00000000025fae80] Cannot find a valid font for the family Sans
[AVFilterGraph @ 0000000000e3a160] Error initializing filter 'drawtext' with args 'fontfile=c:/Windows/Fonts/simsun.ttc: text=绗?1鍥?%{pts\:gmtime\:0\:%M\\:%S}/43锛?0: x=5: y=466: fontsize=16: fontcolor=yellow@0.9: box=1: boxcolor=blue@0.6'
Error initializing complex filters.
No such file or directory

So what's the matter? I have confirmed there is a simsun.ttc in C\ disk.
Thanks a lot!

**Tags:** ffmpeg, filter


---

## 1 answers

### Answer by username_1 on 2017-11-14. Score: 1 | Accepted answer

Font paths have to be escaped:

`fontfile='c\:\\Windows\\Fonts\\simsun.ttc'`

> **Comments:**
> **username_0**: I have tried this, but still went wrong with the same error.  
> **username_1**: Quote the path.  

---

