User Tools

Site Tools


ffmpeg:subtitles:ass_file_syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ffmpeg:subtitles:ass_file_syntax [2024/12/30 23:22] peterffmpeg:subtitles:ass_file_syntax [2024/12/30 23:49] (current) peter
Line 5: Line 5:
   * SubStation Alpha (SSA) is a subtitling / script format that supports text formatting, animation, graphics and karaoke.   * SubStation Alpha (SSA) is a subtitling / script format that supports text formatting, animation, graphics and karaoke.
  
----- 
- 
-===== File Specification ===== 
- 
-SSA and ASS files are plain text files. 
- 
-  * ASS added Unicode support. 
- 
----- 
- 
-===== ASS (SSA V4+) ===== 
  
 ASS is an improvement upon the SSA V4 specification. ASS is an improvement upon the SSA V4 specification.
Line 27: Line 16:
  
 Fields on the line data are separated by a comma and, with the exception of the Text field, which should be the last field, must not contain any commas.  Fields on the line data are separated by a comma and, with the exception of the Text field, which should be the last field, must not contain any commas. 
 +
  
 ---- ----
  
-===== Descriptors =====+===== File Specification =====
  
-<td Original Script +SSA and ASS files are plain text files. 
-Original Translation + 
-Original Editing +  * ASS added Unicode support.
-Original Timing +
-Script Updated By +
-(mostly optional) >Contributors to the production of the script. <td PlayResX +
-PlayResY >The resolution of the script.+
  
 ---- ----
  
-A comment line. +===== Scripts ===== 
-A description of the script. + 
-The version of the file format. For ASS, this is v4.00+. +See[[https://aegisub.org/]]
-Details regarding updates made to the script can be placed here. +
-Where in the video will the script begin playback +
-How collisions are managed. Possible values areNormal - subtitles are stacked onto each other, and Reverse - subtitles are shifted to make way for new ones. +
-The speed of the script. This value is a multiplier times 100 of the speed of the script playback. +
-0 - Smart wrapping, lines are evenly broken +
-1 - End of line word wrapping, hard breaks only. +
-2 - No word wrapping. Both line breaks allowed. +
-3 - Smart wrapping with lower lines wider+
  
 ---- ----
Line 71: Line 49:
 {{c|key1|Style:}} Default{{c|key|,}}Arial{{c|key|,}}28{{c|key|,}}&H00FFFFFF{{c|key|,}}&H1EFFFFFF{{c|key|,}}&H0048001C{{c|key|,}}&H7F000000{{c|key|,}}-1{{c|key|,}}0{{c|key|,}}0{{c|key|,}}0{{c|key|,}}100{{c|key|,}}100{{c|key|,}}0{{c|key|,}}0{{c|key|,}}1{{c|key|,}}1.5{{c|key|,}}0.5{{c|key|,}}2{{c|key|,}}10{{c|key|,}}10{{c|key|,}}10{{c|key|,}}1 {{c|key1|Style:}} Default{{c|key|,}}Arial{{c|key|,}}28{{c|key|,}}&H00FFFFFF{{c|key|,}}&H1EFFFFFF{{c|key|,}}&H0048001C{{c|key|,}}&H7F000000{{c|key|,}}-1{{c|key|,}}0{{c|key|,}}0{{c|key|,}}0{{c|key|,}}100{{c|key|,}}100{{c|key|,}}0{{c|key|,}}0{{c|key|,}}1{{c|key|,}}1.5{{c|key|,}}0.5{{c|key|,}}2{{c|key|,}}10{{c|key|,}}10{{c|key|,}}10{{c|key|,}}1
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**
 +
 +  * **Format**:  Defines the format of subsequent Style lines. This is provided for backward-compatibility.
 +  * **Style**:  Defines a style. The style is subsequently identified by its Name field.
 +
 +</WRAP>
  
 ---- ----
  
-Format +===== Styles =====
-    Defines the format of subsequent Style lines. This is provided for backward-compatibility. +
-Style +
-    Defines a style. The style is subsequently identified by its Name field. +
-     +
-    +
  
 ^Field^Description^ ^Field^Description^
Line 115: Line 96:
 ^Field^Description^ ^Field^Description^
 |Layer|An integer indicating the layer the subtitle is in. Subtitles having different layer numbers will be ignored during collision detection. Lower layer numbers are drawn first.| |Layer|An integer indicating the layer the subtitle is in. Subtitles having different layer numbers will be ignored during collision detection. Lower layer numbers are drawn first.|
-|Start|The start time of the subtitle. See the Data types section.|+|Start|The start time of the subtitle. See the **Data types** section.|
 |End|The end time of the subtitle.| |End|The end time of the subtitle.|
 |Style|The style to be used by the script. Styles are defined in the Styles section.| |Style|The style to be used by the script. Styles are defined in the Styles section.|
Line 127: Line 108:
 |:::|<nowiki>Scroll down;<y1|0>;<y2|0>;<delay(1-100)>[;fadeawayheight]</nowiki>| |:::|<nowiki>Scroll down;<y1|0>;<y2|0>;<delay(1-100)>[;fadeawayheight]</nowiki>|
 |Text|The subtitle text. This is a special field in the sense that it must always be the last field, and can contain commas.| |Text|The subtitle text. This is a special field in the sense that it must always be the last field, and can contain commas.|
 +
  
 The following are the Event section descriptors: The following are the Event section descriptors:
Line 165: Line 147:
 |fn|Font name|Changes the font.| |fn|Font name|Changes the font.|
 |fs|size|Font size| |fs|size|Font size|
-|fscx +|fscx|Percent|Font scaling
-|fscy Percent  Font scaling +|fscy|:::|:::| 
-|fsp  pixels  Font spacing +|fsp|pixels|Font spacing| 
-|fr/frz +|fr/frz|degrees|Rotation around the x/y/z-axes.
-|frx +|frx|:::|:::
-|fry|degrees|Rotation around the x/y/z-axes.|+|fry|:::|:::|
 |fe|charset|Encoding number| |fe|charset|Encoding number|
-|c/1c| +|c/1c|color|Primary / secondary / outline / shadow colour
-|2c| +|2c|:::|:::
-|3c| +|3c|:::|:::
-|4c|color|Primary / secondary / outline / shadow colour+|4c|:::|:::| 
-|alpha/1a| +|alpha/1a|alpha value|Primary / secondary / outline / shadow transparency
-|2a+|2a|:::|:::
-|3a| +|3a|:::|:::
-|4a|alpha value|Primary / secondary / outline / shadow transparency|+|4a|:::|:::|
 |an|alignment code|Alignment| |an|alignment code|Alignment|
-|k+|k|duration (x0.01s)|The duration of time, in centiseconds, the succeeding text will be displayed, until the end of the line or the next k override code. This creates a karaoke effect.
-|kf/K| +|kf/K|:::|:::
-|ko|duration (x0.01s)|The duration of time, in centiseconds, the succeeding text will be displayed, until the end of the line or the next k override code. This creates a karaoke effect.|+|ko|:::|:::|
 |q|integer|Wrapping style| |q|integer|Wrapping style|
 |r|[style]|Resets all previous override styles, applying the default style. To apply a different style, put it as a parameter.| |r|[style]|Resets all previous override styles, applying the default style. To apply a different style, put it as a parameter.|
Line 195: Line 177:
 |clip|[scale,] drawing|Clips a subtitle inside a drawing.| |clip|[scale,] drawing|Clips a subtitle inside a drawing.|
  
 +----
 +
 +===== File attachment =====
 +
 +Files can be attached to scripts and are stored as plain text. The method used is a form of UUEncoding. 
 +
 +----
 +
 +===== Data types =====
 +
 +  * **Color**:  Color values are expressed in hexadecimal BGR format as &HBBGGRR& or ABGR (with alpha channel) as &HAABBGGRR&.
 +    * Transparency (alpha) can be expressed as &HAA&. Note that in the alpha channel, 00 is opaque and FF is transparent.
 +  * **Boolean values (Styles section)**:  -1 is true, 0 is false.
 +  * **Alignment**:  Alignment values are based on the numeric keypad.
 +    * 1 - bottom left, 2 - bottom center, 3 - bottom right, 4 - center left, 5 - center center, 6 - center right, 7 - top left, 8 - top center, 9 - top right.
 +    * In addition to determining the position of the subtitle, this also determines the alignment of the text itself.
 +  * **Time**:  Time is expressed as h:mm:ss:xx (xx being hundredths of seconds).
 +    * The hour can only be a single digit.
 +
 +----
 +
 +===== References =====
 +
 +https://wiki.multimedia.cx/index.php?title=SubStation_Alpha
 +
 +https://aegisub.org/
  
 +https://validator.subtitledpro.com/
ffmpeg/subtitles/ass_file_syntax.1735600944.txt.gz · Last modified: 2024/12/30 23:22 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki