MichaelYochpaz/iSubRip

[Feature Request]: Add `{\an8}` tags when converting from WebVTT to SRT

insurw opened this issue · 5 comments

Confirmations

  • I confirm that I checked the issues tab and couldn't find an existing open issue for the issue I want to report.

OS Type

Windows

Python Version

3.10.7

Package Version

2.3.2

Description

{\an8} (shows subs at top) is stripped when it shouldn't be.
I compared ~20 movies. It seems the only difference compared to Subtitle Edit SRTs is the missing {\an8}.
Though it could be other similar but much less used formatting is also stripped.

Config

No response

Output Log

No response

Please provide examples that I can look into and check.

It affects all movies and all languages (well I compared only Swedish and English).

Deadpool: https://itunes.apple.com/se/movie/deadpool/id1078335270?l=en
Subtitle Edit exported comparisons (HTML files):
https://mega.nz/file/kAAHEIQI#yvk6c--PMygVaB3xP5jDgK0L7V-vR3R4pgpcmV3Oa9w

Next time if you're sending files, please just send the actual subtitles files instead of HTML pages of a 3rd party site you used (or if you have to, just include screenshots in your comment instead of sending the actual HTML pages as files).

There is no actual {\an8} tag in the subtitles.
You can open the file using any text editor (Notepad, Notepad++, VSCode, etc. Not SubtitleEdit) and see for yourself.
For example, the 8th block, which in the comparisons you added appears to have an {\an8} tag, is:

00:03:21.785 --> 00:03:22.911 line:0.00%
Smells good, no?

The line:0.00% cue is from the WebVTT specifications, which indicates to the video player where to display the subtitles. (0.00% results in showing the subtitles at the top)

This and other WebVTT cues are being stripped when converting to srt format, as it doesn't support them.
SubtitleEdit just seems to add an {\an8} tag in these cases when converting to other formats (and also shows the tag in the GUI for VTT), even though it wasn't actually there.

This not an actual bug to fix, but a new feature to implement that would require reworking on subtitles' conversion logic.

Subtitles conversion and formatting features are at a low priority, so I can't promise this feature will be implemented any time soon (if ever).

In the meantime, you can just download subtitles in VTT format and convert them using SubtitleEdit if this is important to you.

Restoring this as a feature request

Added on the latest release (v2.5.0) using the subtitles.webvtt.subrip-alignment-conversion config setting.