arcusmaximus / YTSubConverter

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

Font size mismatch from a test case video #45

Closed tran-huynh-minh-ngoc closed 2 years ago

tran-huynh-minh-ngoc commented 2 years ago

I managed to download the ytt subtitle from a test case video (https://www.youtube.com/watch?v=9W0Dy1nM-zU ) and converted it to *.ass with YTSubConverter, but in Aegisub it shown like this:

image

The Roboto font seeems fine, but the Courier New, Lucida Console, Times New Roman and Comic Sans MS are off.

Courier New, Lucida Console, Times New Roman texts are bigger than the texts in video, but Comic Sans MS text is smaller than the text in video.

So if I want to use multiple fonts then how can I do it right?

arcusmaximus commented 2 years ago

The test case video is primarily meant to test YouTube, not YTSubConverter. YouTube used to frequently break styled subtitles, and having a test video like this allowed to quickly check if they broke something again, and if yes, what exactly they broke.

To get to your question though: Aegisub uses a different definition of "font size" than pretty much any other application (including browsers). The result is that, if two subtitles with different fonts have the same font size in Aegisub, they may have different sizes in the browser.

The question then is what you're trying to achieve.

If you're looking to download videos and their subtitles for local viewing, and you want the downloaded subtitles to look exactly like those on YouTube, you'll need to perform the conversion from the command line with the --visual option. This will cause YTSubConverter to apply a font-specific size multiplier to each subtitle. See https://github.com/arcusmaximus/YTSubConverter#reverse-conversion for details.

If you're planning on creating subtitles of your own, it's true that the final subtitles in the browser won't look exactly like the ones you made in Aegisub. However, you also need to take into account that not everyone watches YouTube on a Windows desktop. Mac users and Linux users may not have the same fonts installed, and on mobile, subtitles look nothing like they do on desktop (they're not even consistent between Android and iOS). So even if you were to get a perfect match on Windows, the subtitles would still look different everywhere else.

In short, unless you're reverse-converting for local playback, the subtitles in Aegisub will always be nothing more than a general guidance for how they'll look on YouTube, not a pixel-perfect preview.