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

子集化出现该报错,与其他字幕文件对比检查后格式无误,不知如何解决 #25

Open
Abin0513 opened this issue Jan 1, 2025 · 2 comments

Comments

@Abin0513
Copy link

Abin0513 commented Jan 1, 2025

2025-01-01T14:04:21+08:00|ERR|Invalid style format for v4.00 script. Expected: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding, got: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding

使用的样式定义描述:
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,微软雅黑,80,&H00FFFFFF,&H0000FFFF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,3,2,2,20,20,30,1
Style: Title,@微软雅黑,70,&H00000000,&H000000FF,&H00FFFFFF,&H00000000,-1,0,0,0,100,100,0,0,1,5,2,2,10,10,10,1
Style: OPEDJP,微软雅黑,60,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1
Style: OPEDCN,微软雅黑,60,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,2,2,8,10,10,10,1
Style: PS,微软雅黑,60,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,2,1,8,10,10,10,1

@MIRIMIRIM
Copy link
Collaborator

可能是因为 [Script Info] 下没有指定 ScriptType,或者指定的是 ScriptType: v4.00,导致解析的时候报错,但看你贴的样式使用的是 [V4+ Styles],所以应该在 [Script Info] 中指定 ScriptType: v4.00+

脚本信息中 没有标注 v4+,但样式中却使用 v4+ 定义的样式,可能是一些老旧字幕软件的不规范处理导致的。这里的检查比较严格,我后续考虑下怎么处理这里不一致的情况。

@Abin0513
Copy link
Author

Abin0513 commented Jan 5, 2025

果然,加上ScriptType: v4.00+就正常了

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