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: [email protected]: box=1: [email protected]" -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: [email protected]: box=1: [email protected]'
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 Answer 1

1

Font paths have to be escaped:

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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