[FFmpeg-user] drawtext, suggestion for improvement
Michael Koch
astroelectronic at t-online.de
Thu Mar 26 20:33:54 EET 2020
Hi,
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:
https://en.wikipedia.org/wiki/UTF-8#Byte_order_mark
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:
https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=7&t=7813
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.
Michael
More information about the ffmpeg-user
mailing list