Skip to content
[Script Info]
Title: 10
Original Script: 10
ScriptType: v4.00+
PlayResX: 384
PlayResY: 288
ScaledBorderAndShadow: yes
YCbCr Matrix: None

[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,16,&H00FFFFFF,&H00FFFFFF,&H80000000,&H80000000,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,00:00:00.76,00:00:04.07,Default,,0,0,0,,Organic molecules discovered in an ancient galaxy.
Dialogue: 0,00:00:04.07,00:00:07.16,Default,,0,0,0,,How far are we from a third kind of encounter?
Dialogue: 0,00:00:07.16,00:00:20.12,Default,,0,0,0,,It has been a full year since Webb officially began its imaging mission, and it has recently sent back many photos that were difficult to capture in the past. In early June, astronomers published this photo in the journal Nature.
Dialogue: 0,00:00:20.12,00:00:28.36,Default,,0,0,0,,Surrounding the blue core is a ring of orange light. This is a galaxy-scale donut, a portal.
Dialogue: 0,00:00:28.36,00:00:43.91,Default,,0,0,0,,This is the birth ring of an alien civilization. Actually, this is an ancient galaxy containing organic polycyclic aromatic hydrocarbons. Its name is SPT0418-47. Because the name is long, we'll simply call it SPT0418 from now on.
Dialogue: 0,00:00:43.91,00:00:45.92,Default,,0,0,0,,Seems like it wasn't simplified much.

Welcome to the powerful world of ASS subtitles! Unlike SRT subtitles, which can only change font and color, ASS (Advanced SubStation Alpha) allows you to control every detail of your subtitles with precision, just like a designer. This guide will take you step-by-step to demystify it.

Part 1: Understanding Your ASS File

An .ass file is essentially a plain text file that you can open with any text editor (like Notepad, VS Code). Its content mainly consists of three parts:

  1. [Script Info]: The script info section. This contains metadata for the subtitles, such as title, original resolution (PlayResX and PlayResY), etc. For beginners, the most important things to pay attention to are PlayResX/Y, which define the size of the "virtual canvas" for subtitle layout.

  2. [V4+ Styles]: The style definition section. This is the core of our learning today! This is where all the preset templates for subtitle "appearance" are defined.

  3. [Events]: The events section. This is the actual content of the subtitles. Each "Dialogue" line contains the start time, end time, text, and the name of the style applied to it.

Core Logic: We define various styles (e.g., "Dialogue style", "Note style") in the [V4+ Styles] section, and then specify which style to use for each subtitle line in the [Events] section.


Part 2: Unveiling the Core - A Detailed Look at [V4+ Styles]

In the styles section, you'll see two key lines: Format: and Style:.

  • The Format: line: This is the header line. It defines the order of each parameter in the Style: lines below.
  • The Style: line: This is the data line. It contains all the parameter values for a specific style.

Now, let's break down the most important parameters in the Style: line one by one:

ParameterExplanationExample & Notes
NameStyle NameDefault, Note. A clear name used to call the style in the [Events] section.
FontnameFont NameArial, SimHei. Note: The viewer's computer must have this font installed for it to display correctly.
FontsizeFont Size28, 50.
PrimaryColourPrimary ColorCore parameter. The color of the text body.
SecondaryColourSecondary ColorMainly used for Karaoke effects, the color of the sung-through part of the text.
OutlineColourOutline ColorCore parameter. The color of the text outline and shadow.
BackColourBackground ColorCore parameter. The color of the background box when BorderStyle=3.
BoldBold0 for no, -1 for yes.
ItalicItalic0 for no, -1 for yes.
OutlineOutline WidthCore parameter. The width of the outline, in pixels. 0 means no outline.
ShadowShadow DistanceCore parameter. The distance of the shadow from the text, in pixels. 0 means no shadow.
AlignmentAlignmentCore parameter. Uses the numeric keypad layout to define position. Very important!
MarginL, MarginRLeft/Right MarginsThe minimum distance of the subtitle from the left/right edges of the screen.
MarginVVertical MarginThe minimum distance of the subtitle from the top/bottom edges of the screen.
Understanding Key Parameters in Depth
  • Color Format (Colour) The ASS color format is &H<AA><BB><GG><RR>, in the order Alpha-Blue-Green-Red, all in hexadecimal.

    • AA (Alpha/Transparency): 00=fully opaque, FF=fully transparent. 80 is about 50% semi-transparent.
    • Examples:
      • &H00FFFFFF: Pure white (opaque)
      • &H00000000: Pure black (opaque)
      • &H000000FF: Pure red (opaque)
      • &H80000000: Semi-transparent black
  • Alignment (Alignment) It uses the numeric keypad to control the nine-grid position of the subtitle on the screen:

    7 (Top-Left)  8 (Top-Center)  9 (Top-Right)
    
    4 (Middle-Left)  5 (Middle-Center)  6 (Middle-Right)
    
    1 (Bottom-Left)  2 (Bottom-Center)  3 (Bottom-Right)

    2 is the most common bottom-center. 8 is often used for top notes.


Part 3: The Soul - Deep Dive into BorderStyle

The BorderStyle parameter ties many of the above parameters together, determining the final rendering mode.

BorderStyle = 1: Standard Outline (Most Common)
  • Meaning: Adds an outline and shadow to the text, with a transparent background.
  • How it works: Enables the OutlineColour, Outline, and Shadow parameters.
  • Use Case: The default choice for all regular dialogue subtitles.
  • Configuration Key Points:
    1. Set BorderStyle to 1.
    2. Set Outline > 0 (e.g., 2) to get an outline.
    3. Set Shadow > 0 (e.g., 1) to get a shadow.
    4. Define the color of the outline and shadow via OutlineColour.
BorderStyle = 3: Background Box Mode
  • Meaning: Adds a rectangular background box behind the text, while disabling the outline.
  • How it works: Enables the BackColour parameter, but completely ignores the Outline parameter.
  • Use Case: Karaoke, translator's notes, on-screen text that needs strong emphasis.
  • Configuration Key Points:
    1. Set BorderStyle to 3.
    2. Define the color and transparency of the background box via BackColour.
    3. 【Important】For maximum compatibility, set OutlineColour and BackColour to exactly the same value!
BorderStyle = 4: Precise Positioning Mode (Advanced)
  • Meaning: A technical rule that ensures subtitle layout and positioning remain consistent on any screen.
  • How it works: Forces all coordinate and size calculations to be based on the PlayResX/Y defined in [Script Info].
  • Use Case: Advanced effect subtitles (ASS FX), complex typesetting, vector drawing.
  • Configuration Key Points:
    1. For effects requiring precise positioning, set BorderStyle to 4.
    2. If an outline effect is also needed, you can set it to 5 (1+4) to ensure compatibility across all renderers.

Part 4: Hands-on Practice - "I Want..." Configuration Recipes

Now, you can directly copy the following Style: line codes to replace the styles in your file to achieve the desired effects.

Recipe 1: The Most Classic "White Text with Black Border" Dialogue Subtitle

  • Effect: White text, 2-pixel black outline, 1-pixel black shadow, bottom-center aligned.
  • Code:
    Style: Dialog-Classic,Arial,28,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,1,2,10,10,10,1

Recipe 2: "Note Subtitle" with Semi-Transparent Black Background

  • Effect: White text with a semi-transparent black background box behind it, top-center aligned.
  • Code (Note that OutlineColour and BackColour are the same):
    Style: Note-Box,Arial,22,&H00FFFFFF,&H000000FF,&H80000000,&H80000000,0,0,0,0,100,100,0,0,3,1,0,8,10,10,10,1

Recipe 3: "Minimalist Subtitle" with No Border or Shadow

  • Effect: Pure white text, no decorations, bottom-center aligned.
  • Code:
    Style: Minimalist,Arial,28,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,0,0,2,10,10,10,1
    (Simply set both Outline and Shadow to 0 in a BorderStyle=1 style)

Recipe 4: Basic Style for "Effect Subtitle" Requiring Precise Positioning

  • Effect: Same appearance as "White Text with Black Border", but with precise positioning mode enabled.
  • Code:
    Style: FX-Base,Arial,28,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,5,2,1,2,10,10,10,1

Part 5: Final Advice - Common Pitfalls & Best Practices

  1. BorderStyle=3 Compatibility Trap: Emphasizing again, when using BorderStyle=3, always set OutlineColour and BackColour to the same value. Otherwise, colors may be inconsistent across different players.
  2. Missing Font Issue: If your subtitles turn into a default font (like SimSun) on someone else's computer, it's likely because they don't have the font you specified installed. Either choose common fonts (like Arial, SimHei), or package and share the font file along with the subtitles.
  3. Color Code Confusion: Remember that after &H it's Alpha-Blue-Green-Red (AABBGGRR). Many online color pickers provide RRGGBB format, so you need to manually swap the B and R positions when using them.

Now, you have mastered all the core knowledge for customizing ASS subtitle styles. Go ahead and boldly experiment and combine these parameters to create subtitles that are both beautiful and readable, uniquely yours!