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

Problem in default values, overwrited SSA to ASS #20

Open
latot opened this issue Aug 28, 2018 · 1 comment
Open

Problem in default values, overwrited SSA to ASS #20

latot opened this issue Aug 28, 2018 · 1 comment

Comments

@latot
Copy link

latot commented Aug 28, 2018

Hi, there to much things in this issue, #18, i'll split point by point, the first is this, some values in the conversion are overwrited somewhere and ignore the default values of https://github.com/tkarabela/pysubs2/blob/master/pysubs2/ssastyle.py

Here an example:

[Script Info]
Title: karaoke
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
PlayResY: 600

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: OK,Britannic Bold,30,16777215,65535,65535,&H0029464b,0,0,1,2,1,2,10,10,10,0,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:05.00,OK,NTP,0000,0000,0000,!Effect,Hi

Converting to ASS:

[Script Info]
; Script generated by pysubs2
; https://pypi.python.org/pypi/pysubs2
Title: karaoke
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
PlayResY: 600

[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: OK,Britannic Bold,30.0,&H00777215,&H00000535,&H00000535,&H0029464B,0,0,0,0,1.0,2.0,10.0,10.0,10,0.0,0.0,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:05.00,OK,NTP,0,0,0,!Effect,Hi

Here a comparative values doesn't match:

                   SSA (original), ASS (converted)
BorderStyle 1                     10
Outline        2                      0
Shadow       1                      0
Encoding     0                      1

And there is some weird values, like ScaleX and ScaleY, in the dafult values of pysubs2 there is right values, but when write the file there is others, here other table, that values are ASS only, so should use the pysubs2 values (don't exist in SSA):

              Default (pysubs2)  Writed value (converted)
ScaleX   100                        1
ScaleY   100                        2
Spacing 0                           10
Angle     0                           10

Bye.

@latot
Copy link
Author

latot commented Aug 28, 2018

New thing, i found this is because if how pysubs2 detect the file type, the players accept [V4+ Styles] as substation, while where have weird things, if i change it to [V4 Styles] works fine.

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

1 participant