[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:
[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 pay attention to arePlayResX/Y, which define the size of the "virtual canvas" for subtitle layout.[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.[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 theStyle: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:
| Parameter | Explanation | Example & Notes |
|---|---|---|
Name | Style Name | Default, Note. A clear name used to call 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-through part of the text. |
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/right edges of the screen. |
MarginV | Vertical Margin | The 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.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 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)2is the most common bottom-center.8is 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, andShadowparameters. - Use Case: The default choice for all regular dialogue subtitles.
- Configuration Key Points:
- 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: Background 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 Key Points:
- 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: 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/Ydefined in[Script Info]. - Use Case: Advanced effect subtitles (ASS FX), complex typesetting, vector drawing.
- Configuration Key Points:
- For effects requiring precise positioning, set
BorderStyleto4. - If an outline effect is also needed, you can set it to
5(1+4) to ensure compatibility across all renderers.
- For effects requiring precise positioning, set
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
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 Border or Shadow
- Effect: Pure white text, no decorations, bottom-center aligned.
- 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: 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
BorderStyle=3Compatibility Trap: Emphasizing again, when usingBorderStyle=3, always setOutlineColourandBackColourto the same value. Otherwise, colors may be inconsistent across different players.- 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.
- Color Code Confusion: Remember that after
&Hit's Alpha-Blue-Green-Red (AABBGGRR). Many online color pickers provideRRGGBBformat, 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!
