[FFmpeg-user] drawtext, suggestion for improvement

Michael Koch astroelectronic at t-online.de
Thu Mar 26 20:33:54 EET 2020


I have a suggestion for improvement for the drawtext filter.
If the text is read from a file, it must be in UTF-8 format. In Windows, 
many text editors (including Notepad) insert a 3-byte "Byte order mark" 
at the beginning of the file. This is described here:

The problem is that drawtext prints these 3 bytes as non-printable 
characters (empty rectangle). You can see an example screenshot here in 
the Zeranoe discussion forum:

My suggestion is to let the drawtext filter check the first three bytes 
and if they are EF BB BF, then don't print them.


More information about the ffmpeg-user mailing list