Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]Program Unable to Handle ASS Subtitles When "Format" Line Order Changes #18

Open
weizsw opened this issue Nov 23, 2024 · 1 comment

Comments

@weizsw
Copy link

weizsw commented Nov 23, 2024

I encountered an issue where the program fails to properly handle .ass subtitle files if the order of fields in the Format line under the [Styles] section is modified. For example:

[V4+ Styles]
Format: Name, Alignment, Angle, BackColour, Bold, BorderStyle, Encoding, Fontname, Fontsize, Italic, MarginL, MarginR, MarginV, Outline, OutlineColour, PrimaryColour, ScaleX, ScaleY, SecondaryColour, Shadow, Spacing, Strikeout, Underline
Style: Default,2,0.000,&H80000000,0,1,1,WenQuanYiMicroHei,19.000,0,20,20,10,2.000,&H00000000,&H00c5c5c5,100.000,100.000,&H0000ffff,0.000,0.000,0,0
Style: Eng,2,0.000,&H80000000,0,1,1,WenQuanYiMicroHei,12.000,0,20,20,10,1.000,&H00000000,&H0000a0dc,100.000,100.000,&H0000ffff,0.000,0.000,0,0

Steps to Reproduce:

  1. Take a working .ass file.
  2. Modify the Format line in the [Styles] section by changing the order of fields.
  3. run with the file with -e.

image

@wyzdwdz
Copy link
Owner

wyzdwdz commented Nov 23, 2024

Actually it doesn't interpret the Style definition lines, it just follow a fixed order which most ass scripts use. For now, you can just edit your script to let it follow this order: Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding

I will try to fix this bug in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants