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,,The Webb telescope has completed its first year of official imaging, recently delivering many previously hard-to-capture photos. In early June, astronomers published this image 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—a galaxy-sized doughnut, 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, it's an ancient galaxy containing polycyclic aromatic hydrocarbons. Its name is SPT0418-47, but since it's long, we'll just call it SPT0418.
Dialogue: 0,00:00:43.91,00:00:45.92,Default,,0,0,0,,Seems like it wasn't shortened much.

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

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 or 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 focus on are PlayResX/Y, which define the "virtual canvas" size for subtitle layout.

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

  3. [Events]: The events section. This is where the actual subtitle content lives. 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 (like "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: Unlocking the Core - Deep Dive into [V4+ Styles]

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

  • Format: line: This is the header line, defining the order of each parameter in the Style: lines below.
  • Style: line: This is the data line, containing all parameter values for a specific style.

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

ParameterExplanationExamples & Notes
NameStyle NameDefault, Note. A clear name used to reference 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 part.
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 and right screen edges.
MarginVVertical MarginThe minimum distance of the subtitle from the top and bottom screen edges.
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 subtitle's position in a 3x3 grid 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 alignment. 8 is often used for top notes.


Part 3: The Heart of It - 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 Tips:
    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: Opaque 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 Tips:
    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: Opaque Box + Advanced Positioning (Advanced)
  • Meaning: A technical rule ensuring subtitle layout and positioning remain consistent across all screens.
  • How it works: Forces all coordinate and size calculations to be based on the PlayResX/Y defined in [Script Info].
  • Use Case: Advanced effects subtitles (ASS FX), complex layouts, vector drawings.
  • Configuration Tips:
    1. For effects requiring precise positioning, set BorderStyle to 4.
    2. If you also need an outline effect, you can set it to 5 (1+4) for compatibility across all renderers.

Part 4: Practical Exercises - "I Want..." Configuration Recipes

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

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

  • Effect: White text, 2-pixel black outline, 1-pixel black shadow, bottom-centered.
  • 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, top-centered.
  • Code (Note 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 Borders or Shadows

  • Effect: Pure white text, no decorations, bottom-centered.
  • 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: Base Style for "Effects Subtitle" Requiring Precise Positioning

  • Effect: Same appearance as "White Text with Black Border" but with advanced positioning 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 Tips - Common Pitfalls & Best Practices

  1. BorderStyle=3 Compatibility Trap: Emphasized again: when using BorderStyle=3, always set OutlineColour and BackColour to the same value; otherwise, colors may appear inconsistent across different players.
  2. Missing Font Issue: If your subtitles appear as SimSun (or another default font) 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 the order after &H is 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.

By now, you have mastered all the core knowledge for customizing ASS subtitle styles. Go ahead and experiment boldly with combining these parameters to create beautiful, readable subtitles that are uniquely yours