Skip to content

Problem in default values, overwrited SSA to ASS #20

@latot

Description

@latot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions