Opened 4 years ago

Last modified 4 years ago

#9002 new defect

subtitles filter fails to display all ASS subtitles

Reported by: Gregory Beauregard Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: ass libass subtitles
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: For some files it seems ffmpeg's subtitles filter fails to display all the ASS subtitles that mpv displays. libass version is 0.15.0
How to reproduce: Download testfile (2.1 MB) https://gably.net/testcase/demo.mkv
Hardsub the subtitles in the file with the subtitles filter as follows:

#!/bin/bash
rm -f log.txt
ffmpeg -loglevel debug -i demo.mkv -vf subtitles=demo.mkv -c:v libx264 -b:v 600k -c:a libopus -b:a 96k -map 0:v -map 0:a -y hardsubdemo.mkv >>log.txt 2>&1

Observe the subtitles where the leaf is talking aren't hardsubbed into hardsubdemo.mkv, but the line at the end is hardsubbed fine. Both subtitle lines can be observed by viewing the original file with mpv.

I will attach log at -loglevel debug that shows build information and output.

Attachments (3)

log.txt (458.7 KB ) - added by Gregory Beauregard 4 years ago.
log output
demo.mkv (2.0 MB ) - added by Gregory Beauregard 4 years ago.
file needed to run testcase
99-color-emoji.conf (747 bytes ) - added by Gregory Beauregard 4 years ago.
fontconfig file

Change History (9)

by Gregory Beauregard, 4 years ago

Attachment: log.txt added

log output

by Gregory Beauregard, 4 years ago

Attachment: demo.mkv added

file needed to run testcase

comment:1 by Gregory Beauregard, 4 years ago

Keywords: ass libass subtitles added

comment:2 by Gregory Beauregard, 4 years ago

Component: undeterminedavfilter

by Gregory Beauregard, 4 years ago

Attachment: 99-color-emoji.conf added

fontconfig file

comment:3 by Gregory Beauregard, 4 years ago

Further investigation showed the bug cannot be reproduced if the attached 99-color-emoji.conf is not in my ~/.config/fontconfig/conf.d folder. The intention of this file is to override all emoji codepoints with the Noto Color emoji. Note there is no emoji in the testcase being rendered here. I currently am unaware of any issues conceptually with this fontconfig file and I haven't seen any issues with other software, so I suspect this may point to an issue with the way fontconfig fallbacks are handled in ffmpeg's subtitles filter. The other possibility is an issue I'm unaware of with this fontconfig configuration, but I don't see any apparent ones.

Version 2, edited 4 years ago by Gregory Beauregard (previous) (next) (diff)

in reply to:  3 ; comment:4 by Balling, 4 years ago

Replying to aphysically:

override all emoji codepoints with the Noto Color emoji.

Why are doing it anyway? Google Noto is a very specialised font, that is used by standardisation bodies in Unicode testing of all glyphs...

in reply to:  4 ; comment:5 by Gregory Beauregard, 4 years ago

Replying to Balling:

Replying to aphysically:

override all emoji codepoints with the Noto Color emoji.

Why are doing it anyway? Google Noto is a very specialised font, that is used by standardisation bodies in Unicode testing of all glyphs...

This is just the Noto color emoji (aka the Google / Android emoji), not the whole Noto font. The only intended effect is to use the same font for emoji system-wide. This fontconfig is meant to create behavior similar to Android and Windows and macOS and iOS that similarly use the same font for emoji system-wide. A lot of fonts have their own variations of emoji codepoints so without the override you often didn't actually see the color emoji on your system.

Last edited 4 years ago by Gregory Beauregard (previous) (diff)

in reply to:  5 comment:6 by Balling, 4 years ago

Replying to aphysically:

This is just the Noto color emoji (aka the Google / Android emoji)

Yeah, but not on Samsung phones... it uses its own https://emojipedia.org/samsung/
And not on Facebook and Twitter... Etc.

Note: See TracTickets for help on using tickets.