Page 1 of 1

SSA File Question

Posted: Fri Jul 29, 2022 8:41 am
by cukodoxa
Hello,
When I use Open Subtitles to produce an SSA file, I have options to choose various [parameters, such as color, font, etc. What I want to do is have the subtitle color be white on an opaque black box. What I get is white sub titles with black outlines, but I never get a continuous black box with sub titles inside. Can anyone here help?

Re: SSA File Question

Posted: Fri Jul 29, 2022 5:17 pm
by mrtinkles
Try Aegisub

Menu Select:
>Subtitle
>>Styles Manager
>>>Edit (Current Script)
1. Opaque Box (Check)
2. Outline Color (Optional)
3. Apply, Enter & Close
4. File>, Save Subtitles As

or edit sub file:

Style Lines, [v4+ Styles] section
Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding

BorderStyle. 1=Outline + drop shadow, 3=Opaque box

Re: SSA File Question

Posted: Mon Aug 01, 2022 9:38 am
by Dehrimon
Actually, mrtinkles, you are slightly incorrect and incomplete in your answer.
V4+ styles (with emphasis on +) have a little bit different parameters and values. There is no more TertiaryColour and no more AlphaLevel. Instead TertiaryColour now there is OutlineColour, and the opacity (or transparency) of the background of the subtitles is determined by a fourth pair of hexadecimal numbers in the BackColour value. Actually, all colour values in V4+ styles have four pairs of hex values, where first two numbers are actually alpha level, so you can make all colour values transparent if you want to.
BorderStyle value should be 3, but that only turns on the background box, it doesn't makes it transparent, BackColour value does.
And it is important to note that if the BorderStyle value is anything other than 0, than the Outline value must be 0 because if it isn't, it will override BorderStyle value.
So, in order to get subtitles with transparent background, it should look something like this:

[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,Arial,30,&H00FFFFFF,&H0300FFFF,&H00000000,&H5A000000,0,0,0,0,100,100,0,0,3,0,0,2,10,10,10,1

I have put transparency value of 5A, but you can play with that to see what you're comfortable with. Lower values - less transparent, higher values - more transparent.

Re: SSA File Question

Posted: Mon Aug 01, 2022 10:11 am
by Dehrimon
And I forgot, the value Shadow must be 1.
It should look like this:

[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,Arial,20,&H00FFFFFF,&H0300FFFF,&H00000000,&H5A000000,0,0,0,0,100,100,0,0,3,0,1,2,10,10,10,1

Re: SSA File Question

Posted: Mon Aug 01, 2022 7:05 pm
by mrtinkles
Appreciate the input,

I’m a little rusty on this and having to go back and do some review. Checked the original request:
“What I get is white sub titles with black outlines, but I never get a continuous black box with sub titles inside. Can anyone here help?”
Aegisub generated test file:

Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: None

[Aegisub Project Garbage]
Last Style Storage: Default
Active Line: 7

[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,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,3,2,2,2,10,10,10,1

Result is white subtitles on black background, seems to work just fine.

Your script:

Style: Default,Arial,20,&H00FFFFFF,&H0300FFFF,&H00000000,&H5A000000,0,0,0,0,100,100,0,0,3,0,1,2,10,10,10,1

Comments:
BorderStyle value is anything other than 0, than the Outline value must be 0” “Shadow must be 1
My reference materials state for Fields 11 & 12 text outline & shadow: “Values of 1,2,3,4 applicable when BorderStyle = 1”

Could be an oversight on my part, or I misinterpreted something. Let me know if you can spot any errors or omissions at my end. I’ll do some further review of the script with a different player, SM seems to be a bit glitchy with these files for some reason when changing values.

Thanks again........

Re: SSA File Question

Posted: Mon Aug 01, 2022 11:08 pm
by Dehrimon
Yes, you are right. I should have expressed myself more accurately.
Your examples work just fine and regarding the original question, BorderStyle value 3 in combination with Outline other than 0 (1,2,3...) will produce white subtitles on the black opaque background.
What I meant was, when BorderStyle is 3 (background turned on) and Outline isn't 0, that will override transparency value in the BackColour.
So, for white subtitles on the opaque background
[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,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,3,2,2,2,10,10,10,1
this example of yours works just fine.
But when you want transparent background, the combination of ...BorderStyle, Outline, Shadow... must be 3,0,1 or 3,0,2 at the most.
I'm sorry if I created some confusion.