Hi, it seems subtext currently isn't calling ass_set_storage_size which can lead to incorrect rendering for some subtitle+video combinations unless the rather recently introduced LayoutRes* headers are set. The storage size needs to be the resolution at which the encoded video is stored, i.e. before anamorphic desqueezing.
If a preceeding filter rescaled or unsqueezed the image, this may be different from the properties of the frame subtext receives, but at least AviSynth(+) and third-party VapourSynth assrender plugins (AS(+), VS) seem to think using the current frame size is a good enough default (but they also added input parameters to override it).
Hi, it seems subtext currently isn't calling
ass_set_storage_size
which can lead to incorrect rendering for some subtitle+video combinations unless the rather recently introducedLayoutRes*
headers are set. The storage size needs to be the resolution at which the encoded video is stored, i.e. before anamorphic desqueezing.If a preceeding filter rescaled or unsqueezed the image, this may be different from the properties of the frame subtext receives, but at least AviSynth(+) and third-party VapourSynth assrender plugins (AS(+), VS) seem to think using the current frame size is a good enough default (but they also added input parameters to override it).
Affected demo files (both anamorphic and non-anamorphic) with correct reference output can be found e.g. here: https://code.videolan.org/videolan/vlc/uploads/b54e0761d0d3f4f79b2947ffb83a3b59/vlc-issue_libass-storage-size.tar.xz
See also: https://github.com/libass/libass/issues/591 and current storage size docs