0

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!

1

Font paths have to be escaped:

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

  • I have tried this, but still went wrong with the same error. – Wayne Chen Nov 14 '17 at 17:19
  • 1
    Quote the path. – Gyan Nov 14 '17 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.