arcusmaximus / YTSubConverter

A tool for creating styled YouTube subtitles
MIT License
767 stars 55 forks source link

Possible regression in visual reverse conversion from srv3 to ass making a blurry subtitle appear below the main subtitle instead of behind it #65

Closed layercak3 closed 2 years ago

layercak3 commented 2 years ago

Version: 52cbcc8224a4bc0f5cf8e784bdb0e29554274ce8 OS: Linux All attached files ending in .txt were originally the same name without the .txt suffix (needed to satisfy GitHub).

Around a year and a half ago I used this program to convert The Glorious Octagon of Destiny [ddWJatRxfz8].ja.srv3.txt to ass (with the --visual option). This is before the Linux version, I used wine to run the command-line version. The program version was 1.5.1. The resulting file was subtitles.reverse.ass.txt.

I did it again recently (on the same srv3 input file and specified --visual, used the command-line), but it looks incorrect in some locations, and appears different to the subtitles created in the older version. The resulting file is The Glorious Octagon of Destiny [ddWJatRxfz8].ja-visual.ass.txt.

Here are some screenshots in mpv comparing the ass subtitles created before (in version 1.5.1) and after (version 52cbcc8224a4bc0f5cf8e784bdb0e29554274ce8 / 1.6.2).

Example 1

1.5.1

example-1-before

1.6.2 52cbcc8224a4bc0f5cf8e784bdb0e29554274ce8

example-1-after

Comparing the images you can see a blurry shadow subtitle appear under (in the English subtitle) and over (in the Japanese subtitle) the text in 1.6.2, but in 1.5.1 this was correctly placed under the main subtitle to create a shadow effect. Also the main blue subtitle appears to be shifted to a slightly different location in 1.6.2. Comparing this to the YouTube desktop website screenshot it was shifted to the wrong location (1.5.1 looks okay).

YouTube desktop website screenshot (2022-04-14). Exact frame is different because it's harder to get the right frame compared to my mpv instances and pausing the video moves the subtitles.

example-1-youtube

Other examples

There are many other examples throughout the video where the shadow misplacement appears, but it doesn't appear all the time. Almost all the time however the subtitles in 1.6.2 appear to be shifted a bit up or down and sometimes there's a shadow that looks missing (but I can't see where it went unlike in the above examples).

The same issue is also present in what's the point of the mask [CC] [44e3GKnOtL8] and probably some other videos. (one of the background subtitles is above the main subtitle instead of behind it)

Other

I also noticed a long time ago that there is a text switching visual effect that happens at 0:55, 1:08, and 1:31 of The Glorious Octagon of Destiny [ddWJatRxfz8]. When converting the srv3 subtitles to ass with YTSubConverter, that effect is not preserved. (happened regardless of version and regardless of using --visual). I was planning to mention that in a separate issue for a while but since I'm reporting this one I thought I'd mention it briefly. And also there is a bit of a size difference in YouTube's desktop website and the converted ass file, although this might be dependent on hardware and software, and was never a problem. Similarly, looking at the converted ass subtitles in mpv and the YouTube desktop website you can see slight rendering differences but that was never a problem and is going to be expected in something like this.

arcusmaximus commented 2 years ago

The stacking was indeed a regression (introduced with #39). It's fixed now.

I also noticed a long time ago that there is a text switching visual effect that happens at 0:55, 1:08, and 1:31 of The Glorious Octagon of Destiny [ddWJatRxfz8]. When converting the srv3 subtitles to ass with YTSubConverter, that effect is not preserved.

The flickering here is actually caused by a YouTube bug that they introduced in May 2020 and never fixed. The reverse conversion (without the flickering) is how it's supposed to look, and how it would've looked on YouTube before that date.

YTSubConverter got a workaround for this in August 2020 (version 1.5.0) when it became clear that YouTube wouldn't fix this, so that more recent subtitles won't flicker anymore. Older ones, such as on this video from 2019, will stay broken until someone submits new subtitles or YouTube fixes the bug after all, neither of which are likely to happen.