Bug #2076

Incorrect alignment of ASS subtitle strings (All platforms)

Added by Leonid Protasov over 5 years ago. Updated over 5 years ago.

Status:NewStart date:03/22/2014
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

0%

Category:Subtitles
Target version:-
Found in version:Latest Platform:Linux

Description

[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,31,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,35,1
Style: Outlaw Star OP Credits,ITC Kabel Std Medium,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,105,95,2.3125,0,1,2,2,1,12,12,10,1
Style: Outlaw Star OP Lyrics,Bottenbreker T.V.,31,&H00EFB40C,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,2,0,1,2,2,2,10,10,15,1
Style: Outlaw Star ED Credits,Trivia-Regular,30,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,105,95,2.365057,0,1,2,2,5,12,12,10,1
Style: Outlaw Star ED Lyrics,ChocolateBox, 30,&H00D1A104,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,90,1,0,1,2,2,2,10,10,15,1
Style: Outlaw Star Titles,Shanghai,53,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,1,0,1,2,2,2,10,10,12,1

The movie res is 720x480

Alignment in the font is 2 - that means that string should be centered within the screen.

Dialogue: 0,0:00:20.53,0:00:22.53,Outlaw Star ED Credits,ED Credits,0,0,0,,{\fad(500,500)\pos(360,240)}written by\NKatsuhiko Chiba

Position is 360x240. That means that as font alignment is center - the center of the string is should be placed at 360x240. ST currently places not center but left side of the string at that coordinates which is wrong :(

This specs can be helpful: http://moodub.free.fr/video/ass-specs.doc


Related issues

Related to Bug #2060: Wrong positioning of internal SSA subtitles (All platforms) Fixed 03/19/2014

History

#1 Updated by Leonid Protasov over 5 years ago

Also ST should be respective to:

Field 14:    MarginL. This defines the Left Margin in pixels. It is the distance from the left-hand edge of the screen.The three onscreen margins (MarginL, MarginR, MarginV) define areas in which the subtitle text will be displayed.

Field 15:    MarginR. This defines the Right Margin in pixels. It is the distance from the right-hand edge of the screen. The three onscreen margins (MarginL, MarginR, MarginV) define areas in which the subtitle text will be displayed.

Field 16:    MarginV. This defines the vertical Left Margin in pixels.
For a subtitle, it is the distance from the bottom of the screen.
For a toptitle, it is the distance from the top of the screen.
For a midtitle, the value is ignored - the text will be vertically centred

So to calculate the pos of the string you need to add Margins to the pos and after that align the string at that calculated position regarding by the alignment param of the font...

#2 Updated by Andreas Smas over 5 years ago

  • Target version deleted (4.6)

#3 Updated by Leonid Protasov over 5 years ago

  • Target version set to 4.6

#4 Updated by Andreas Smas over 5 years ago

  • Target version deleted (4.6)

Also available in: Atom PDF