[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:
[Script Info]: The script info section. This contains metadata for the subtitles, such as title, original resolution (PlayResXandPlayResY), etc. For beginners, the most important things to focus on arePlayResX/Y, which define the "virtual canvas" size for subtitle layout.[V4+ Styles]: The style definition section. This is the core of our learning! Here, preset templates for all subtitle "appearances" are defined.[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 theStyle: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:
| Parameter | Explanation | Examples & Notes |
|---|---|---|
Name | Style Name | Default, Note. A clear name used to reference the style in the [Events] section. |
Fontname | Font Name | Arial, SimHei. Note: The viewer's computer must have this font installed for it to display correctly. |
Fontsize | Font Size | 28, 50. |
PrimaryColour | Primary Color | Core parameter. The color of the text body. |
SecondaryColour | Secondary Color | Mainly used for karaoke effects, the color of the sung part. |
OutlineColour | Outline Color | Core parameter. The color of the text outline and shadow. |
BackColour | Background Color | Core parameter. The color of the background box when BorderStyle=3. |
Bold | Bold | 0 for no, -1 for yes. |
Italic | Italic | 0 for no, -1 for yes. |
Outline | Outline Width | Core parameter. The width of the outline in pixels. 0 means no outline. |
Shadow | Shadow Distance | Core parameter. The distance of the shadow from the text in pixels. 0 means no shadow. |
Alignment | Alignment | Core parameter. Uses the numeric keypad layout to define position. Very important! |
MarginL, MarginR | Left/Right Margins | The minimum distance of the subtitle from the left and right screen edges. |
MarginV | Vertical Margin | The 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.80is 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)2is the most common bottom-center alignment.8is 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, andShadowparameters. - Use Case: The default choice for all regular dialogue subtitles.
- Configuration Tips:
- Set
BorderStyleto1. - Set
Outline> 0 (e.g.,2) to get an outline. - Set
Shadow> 0 (e.g.,1) to get a shadow. - Define the color of the outline and shadow via
OutlineColour.
- Set
BorderStyle = 3: Opaque Box Mode
- Meaning: Adds a rectangular background box behind the text, while disabling the outline.
- How it works: Enables the
BackColourparameter but completely ignores theOutlineparameter. - Use Case: Karaoke, translator's notes, on-screen text that needs strong emphasis.
- Configuration Tips:
- Set
BorderStyleto3. - Define the color and transparency of the background box via
BackColour. - 【Important】For maximum compatibility, set
OutlineColourandBackColourto exactly the same value!
- Set
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/Ydefined in[Script Info]. - Use Case: Advanced effects subtitles (ASS FX), complex layouts, vector drawings.
- Configuration Tips:
- For effects requiring precise positioning, set
BorderStyleto4. - If you also need an outline effect, you can set it to
5(1+4) for compatibility across all renderers.
- For effects requiring precise positioning, set
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
OutlineColourandBackColourare 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:(Simply set both
Style: Minimalist,Arial,28,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,0,0,2,10,10,10,1OutlineandShadowto0in aBorderStyle=1style)
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
BorderStyle=3Compatibility Trap: Emphasized again: when usingBorderStyle=3, always setOutlineColourandBackColourto the same value; otherwise, colors may appear inconsistent across different players.- 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.
- Color Code Confusion: Remember the order after
&His Alpha-Blue-Green-Red (AABBGGRR). Many online color pickers provideRRGGBBformat, 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
