#5777(avfilter:new): No support for coloured emoji with drawtext filter
#5777: No support for coloured emoji with drawtext filter ----------------------------------+-------------------------------------- Reporter: Illya | Type: defect Status: new | Priority: minor Component: avfilter | Version: git-master Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+-------------------------------------- Summary of the bug: Using the drawtext filter and a capable emoji font, the colour is changed by whatever the {{{ fontcolor }}} parameter is. The emoji should stay it's original colour (in this case, red), rather than being changed. How to reproduce: {{{ % ffmpeg -t 100 -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero -vf drawtext="emojione.ttf: text='Nice 💯 !': fontcolor=white: fontsize=24: x=(w-text_w)/2: y=(h-text_h-line_h)/2" -codec:a copy output.mp4 -y ffmpeg version N-81321-g17eb004 Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 7.3.0 (clang-703.0.31) configuration: --samples=fate --enable-libopenmpt --enable-libdc1394 --enable-libfreetype --enable-fontconfig libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 51.100 / 57. 51.100 libavformat 57. 46.100 / 57. 46.100 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 51.100 / 6. 51.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 Input #0, rawvideo, from '/dev/zero': Duration: N/A, start: 0.000000, bitrate: 184320 kb/s Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480, 184320 kb/s, 25 tbr, 25 tbn, 25 tbc [mp4 @ 0x7f9495800600] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. Output #0, mp4, to 'output.mp4': Metadata: encoder : Lavf57.46.100 Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 640x480, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc Metadata: encoder : Lavc57.51.100 mpeg4 Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native)) Press [q] to stop, [?] for help frame= 2500 fps=545 q=2.0 Lsize= 1209kB time=00:01:39.96 bitrate= 99.1kbits/s speed=21.8x video:1197kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.954954% }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by cehoyos): Replying to [ticket:5777 Illya]:
Using the drawtext filter and a capable emoji font, the colour is changed by whatever the {{{ fontcolor }}} parameter is.
The emoji should stay it's original colour (in this case, red), rather than being changed.
Why? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by Illya): Replying to [comment:1 cehoyos]:
Why? because that's how emoji is meant to be rendered
-- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by cehoyos): How would the drawtext filter know that the font you provided contains emojis and not characters? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by Illya): The glyph emoji characters have the suffix {{{0xFE0F}}}, while the text styled ones have the suffix {{{0xFE0E}}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by cehoyos): Am I correct that this is (only) related to libfreetype and has nothing to do with FFmpeg? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by Illya): Freetype has had support for rendering color emoji since version 2.5, so I assumed it was an FFmpeg issue (e.g. the drawtext filter not using the full capability) -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by Cigaes): Replying to [comment:5 cehoyos]: More or less. When Freetype implements it, FFmpeg needs to implement the corresponding glue to do the color blending of glyph. For now, IIUC, colored emojis are implemented in various non-standard and incompatible extensions to font formats, I wound not recommend to hold one's breath. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: new Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by Illya): Note: {{{NotoColorEmoji}}} (by Google) is probably a better font than {{{emojione}}} for testing -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: open Priority: minor | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by justswim): * status: new => open Comment: Any update on this? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: Type: defect | Status: open Priority: normal | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by justswim): * priority: minor => normal -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5777: No support for coloured emoji with drawtext filter ------------------------------------+------------------------------------ Reporter: Illya | Owner: (none) Type: defect | Status: open Priority: normal | Component: avfilter Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by space-pope): As pointed out above, Freetype has support (draft support, at least) for color emoji. Is integrating it as simple as adding [https://github.com/ricardoquesada/libfreetype/blob/master/docs/CHANGES#L150 the `FT_LOAD_COLOR` flag] to drawtext's `ft_load_flags` param? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5777#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg