ffmpeg + libavfilter's drawtext doesn't print accented characters

965 Views Asked by At

FFMpeg's libavfilter drawtext filter doesn't seem to want to print accented characters like é, and just leaves a space where they should be. This happens both when loading the text from file and when specifying it from the command line:

ffmpeg -i test.mpg -vf drawtext=text:"Café doesn\\\\\'t print the é" ...
ffmpeg -i test.mpg -vf drawtext=textfile:file_with_accents_inside.txt ...

Is there any way to make ffmpeg draw the accented characters correctly? I've tried a couple of different fonts to make sure they weren't the culprit.

1

There are 1 best solutions below

1
On

Using an ffmpeg build from 03-25-12 compiled for Windows, I was able to get the drawtext filter to print the é using the Arial font. Although to do it, I had to use Windows CL, instead of MinGW. MinGW wouldn't even print the é in the command line. I can't test a Linux command line right now, but that might be your problem. What command line/ffmpeg version are you using?