Open rcombs opened 3 years ago
It’s part of ASS2 (SSA4++), which we don’t currently support any of. Neither does Aegisub, although, of course, it renders \kt when VSFilter is selected.
As for its use, it lets you specify when a karaoke syllable starts as an absolute time (during the event’s duration) instead of as an implicit sum of all preceding karaoke tags.
If I didn't miss something our prior discussions and findings about v4++ aren't summarised anywhere on the issue tracker yet; let's use this issue for v4++ as a whole.
All new features are:
\kt
as discussed above.MarginV
property of styles and events into two distinct for top and bottom respectivelyrelativeTo
. It does … something in guliverkli and guliverkli2, but afaict is just ignored after parsing in xy-VSFilter.Since libass parses Format lines (and non-standard lines affect the defaults), we need to know the canonical field names. The internal names of VSF do not always match the in-document names. VSFilter itself only creates v4 and v4+ but no v4++ files, thus not contributing any hint. Also while Aegisub for a while supported read/write of v4++ files, it never wrote Format:
lines for v4++ files.
Regarding relativeTo
(originally intended) purpose and the Format:
field names, here's an excerpt from asa’s wiki (see: https://web.archive.org/web/20071018035454/http://asa.diac24.net/ASS2 ):
ASS2 is a minor extension to the ASS subtitle format. It was introduced in VSFilter SVN revision 453 (November 2005), but did not become public until being noticed in MPC somewhen around March 2006 (cf. http://forum.doom9.org/showthread.php?t=108356)
The changes are:
- occurrences of MarginV are replaced by MarginT,MarginB thereby allowing different top/bottom margins
- an additional field (RelativeTo) is introduced on Style: lines after the Encoding field. Its values/meanings are:
- zero: use video display as coordinate base, including potential black bands around the frame
- nonzero: keep traditional/standard behaviour (frame-relative coordinates)
ASS renderers and editing tools are unlikely to correctly process ASS2 files.
Though asa, just like VSFilter, itself, did not parse Format:
lines in the last source snapshot I could aquire, it’s wiki page about AS5 (a joint draft future version by asa and Aegisub devs, which never came to fruition) contains an example AS5 Format:
line which also uses the RelativeTo
, MarginB
and MarginT
names.
Given that VSFilter and Aegisub also don't/didn't read or create Format:
lines for ASS2, using those names as the canonical ones in our implementation should be good enough and safe.
It appears the linked excerpt from asa’s wiki didn’t get the numeric values for relativeTo
right. Acccording to https://github.com/libass/libass/pull/649#issuecomment-1264426724 the values are:
0
: “relative to window”, i.e. for libass “use API-configured playback margins”1
: “video relative” (what types want)2
: “auto” which is the default value for the built-in Default
style of VSFilter. For all Styles not named Default
, the setting falls bacto whatever the scripts Default
style has set. If the scripts Default style also uses “auto”, it seems both guliverkli and MPC-HC intend it to behave like “video relative” (but I guess, since no real v4++ seem to exist yet, we could also declare it to mean “use the current heuristic guess”).
This exists in xy-vs and it's unclear why we don't handle it… but I'm not entirely sure how it's used. Corresponding xy-vs code: https://github.com/Cyberbeing/xy-VSFilter/blob/ff77719517bc0c1144a75c7b2c1e6268d582614a/src/subtitles/RTS.cpp#L2509-L2517