搜索 社区服务 统计排行 帮助
  • 1410阅读
  • 0回复

ASS2 (SSA 4.00++) 格式 - 部分

楼层直达
级别: 新手上路
注册时间:
2007-02-26
在线时间:
0小时
发帖:
23
目前米有解说 只把自己了解到的相关内容发布出来 有兴趣请自己去查找研究(E文全菜鸟的请先放弃- -) 感觉无聊者的路过

Sub Station Alpha v4.00++ Script Format

General: For MPC, keywords are not case-sensitive.

Script Type: Use v4.00++

The Style section header is [v4++ Styles] and there are 2 addional style params:

SSA/SSA+ has MarginL, MarginR, MarginV, whereas SSA++ has MarginL, MarginR, MarginT, MarginB. Test these new params by setting different MarginTop/Bottom and applying {\an*}

Yet another param is after Encoding, which controls "RelativeTo". I'm not very sure but in my tests, if RelativeTo=0, the result is relative-to-screen (traditional MPC coordinates), and if RelativeTo=1 (or non-zero), the result is relative-to-frame (VSFilter coordinates). 2 coordinate systems are switchable just like in the USF format. (You might want to put Editors Notes in the letterbox while signs logos etc should be absolutely positioned, so... RelativeTo params are useful.)

Each event (Dialogue) under the Events section has MarginL/R/T/B too. Test these new fields by giving them non-default values and using {\an*}

So a sample script looks like:


ScriptType: v4.00++
PlayResX: ...
PlayResY: ...

[V4++ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginT, MarginB, Encoding, RelativeTo
Style: RelToScreen,Verdana,40,&H00ffffff,&H0000ffff,&H00000000,&H00000000,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0,0,0
Style: RelToFrame,Verdana,40,&H00ffffff,&H0000ffff,&H00000000,&H00000000,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0,0,1

[Events]
Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginT, MarginB, Effect, Text
Dialogue: 0,0:00:01.00,0:00:06.00,RelToScreen,,0000,0000,0000,0000,,Relative to Screen
Dialogue: 1,0:00:01.00,0:00:06.00,RelToFrame,,0000,0000,0000,0000,,Relative to Frame


Observe that the 2 styles share the same params except RelativeTo, and the result in MPC (when letterboxed in the full-screen mode) is as you expect.



Code:

[list=a]
mt.majortype = MEDIATYPE_Subtitle;
mt.subtype = MEDIASUBTYPE_ASS2;
mt.formattype = FORMAT_SubtitleInfo;
CStringA hdr;
hdr.Format(
"[Script Info]\n"
"ScriptType: v4.00++\n"
"ScaledBorderAndShadow: yes\n"
"PlayResX: %d\n"
"PlayResY: %d\n"
"[V4++ Styles]\n"
"Style: Text,Arial,12,&H00ffffff,&H0000ffff,&H00000000,&H80000000,0,0,0,0,100,100,0,0.00,3,0,0,2,0,0,0,0,1,1\n",
m_framesize.cx,
m_framesize.cy);
[/list=a]

\rect(x1,y2,x2,y2,x3,y3,x4,y4): Defines the coordinates of the bounding rectangle of the subtitle line, allowing you to deform it in any way you see fit. This is especially useful for isometric rotation.

\vc(c1,c2,c3,c4): Sets the color of each vertex, so that the colors are gauruad interpolated through the bounding box, and multiplied by each pixel. In essence, it behaves exactly like doing a glColor before drawing each vertex, if it were OpenGL direct mode.

貌似现在MPC (Media Player Classic) 有支持Sub Station Alpha v4.00++,
快速回复

限150 字节
上一个 下一个