Elysia Tools
Navigation
Media
Read ASS timing, styles and explicit line breaks
Inspect three ASS subtitle fixtures as text, separating centisecond timing, style references and explicit breaks.
Samples
Entries inside this sample collection
Simple Lower Third (ASS)
A basic ASS file with one named style and two dialogue events for simple style-preserving tests
Difficulty
2/10
Estimated time
2 min
Tags
ass, simple, style, dialogue
simple-lower-third.ass
ASS
- format
- Advanced SubStation Alpha (ASS)
- cues
- 2
- styles
- 1
- complexity
- Simple
Review Dialogue with Inline Tags (ASS)
An intermediate ASS sample that uses multiple styles and inline emphasis tags for review workflows
Difficulty
4/10
Estimated time
4 min
Tags
ass, intermediate, inline-tags, review
intermediate-review-dialogue.ass
ASS
- format
- Advanced SubStation Alpha (ASS)
- cues
- 3
- styles
- 2
- complexity
- Intermediate
Localization QA Stress Sample (ASS)
A complex ASS subtitle file with multiple named styles, inline tags, and line breaks for advanced localization and round-trip testing
Difficulty
6/10
Estimated time
6 min
Tags
ass, complex, localization, qa, multiline, styles
complex-localization-qa.ass
ASS
- format
- Advanced SubStation Alpha (ASS)
- cues
- 4
- styles
- 3
- complexity
- Complex
Tool usage guide
Sample-focused context for search and workflow understanding
Overview
Start with two cues, then examine paired italic overrides and a four-event localization fixture. These checks read the files; they do not render subtitles.
Select a subtitle fixture
Choose “Simple Lower Third (ASS)” for timing, “Review Dialogue with Inline Tags (ASS)” for inline styles, or “Localization QA Stress Sample (ASS)” for explicit line breaks. Keep each original filename for the examples below.
How it works
- 1Choose timing, inline styles or localization QA.
- 2Open the ASS file in a subtitle editor or compatible player.
- 3Compare cues and line breaks; use the optional code for structural checks.
Edge cases & common failures
Scope and version
The tagged fixtures use single-backslash ASS syntax. Open them in your subtitle renderer to check fonts, wrapping and positioning; event counts alone do not establish visual appearance.
Examples
1. Measure cue duration and the gap
How to use
Download “Simple Lower Third (ASS)” as simple-lower-third.ass. Save this Python 3 code as check-ass.py in the same folder, then run python3 check-ass.py.
from pathlib import Path
def read_ass(name):
with Path(name).open("rb") as f:
b = f.read(10001)
assert len(b) <= 10000
lines = b.decode("utf-8").splitlines()
events = [line.removeprefix("Dialogue: ").split(",", 9)
for line in lines if line.startswith("Dialogue: ")]
assert all(len(row) == 10 for row in events)
return lines, events
_, events = read_ass("simple-lower-third.ass")
def cs(t):
h, m, s = t.split(":")
sec, hundredth = s.split(".")
return (int(h)*3600 + int(m)*60 + int(sec))*100 + int(hundredth)
assert len(events) == 2
intervals = [(cs(e[1]), cs(e[2])) for e in events]
durations = [end-start for start,end in intervals]
gap = intervals[1][0] - intervals[0][1]
assert durations == [240,260] and gap == 30
print(durations, gap)Outcome
The two events last 240 and 260 centiseconds. The gap is 30 centiseconds; neither event overlaps the other.
2. Resolve styles and paired overrides
How to use
Download “Review Dialogue with Inline Tags (ASS)” as intermediate-review-dialogue.ass. Save this Python 3 code as check-ass.py in the same folder, then run python3 check-ass.py.
from pathlib import Path
def read_ass(name):
with Path(name).open("rb") as f:
b = f.read(10001)
assert len(b) <= 10000
lines = b.decode("utf-8").splitlines()
events = [line.removeprefix("Dialogue: ").split(",", 9)
for line in lines if line.startswith("Dialogue: ")]
assert all(len(row) == 10 for row in events)
return lines, events
lines, events = read_ass("intermediate-review-dialogue.ass")
styles = {x.removeprefix("Style: ").split(",",1)[0] for x in lines if x.startswith("Style: ")}
references = [e[3] for e in events]
assert styles == {"Default", "Emphasis"}
assert references == ["Default", "Emphasis", "Default"]
counts = [(e[9].count(r"{\i1}"), e[9].count(r"{\i0}")) for e in events]
assert counts == [(0,0),(1,1),(0,0)]
print(references, counts)Outcome
Three events reference Default, Emphasis and Default. Both styles are declared. Only the second event contains one opening and one closing italic override.
3. Count explicit breaks without splitting the text field
How to use
Download “Localization QA Stress Sample (ASS)” as complex-localization-qa.ass. Save this Python 3 code as check-ass.py in the same folder, then run python3 check-ass.py.
from pathlib import Path
def read_ass(name):
with Path(name).open("rb") as f:
b = f.read(10001)
assert len(b) <= 10000
lines = b.decode("utf-8").splitlines()
events = [line.removeprefix("Dialogue: ").split(",", 9)
for line in lines if line.startswith("Dialogue: ")]
assert all(len(row) == 10 for row in events)
return lines, events
_, events = read_ass("complex-localization-qa.ass")
assert len(events) == 4
breaks = [e[9].count(r"\N") for e in events]
assert breaks == [0,1,1,0]
segments = sum(len(e[9].split(r"\N")) for e in events)
assert segments == 6
assert all(r"\\" not in e[9] for e in events)
print(len(events), sum(breaks), segments)Outcome
Four events contain two explicit \N tokens, making six text segments when splitting only on those tokens. They are not six events or necessarily six rendered lines.
FAQ
Does a count of text segments predict screen lines?
No. Explicit \N breaks differ from automatic wrapping. These checks inspect tokens, not a renderer.
Why split Dialogue at only the first nine commas?
The text field can itself contain commas. Limiting the split preserves the text field while separating the preceding fields in these samples.
Will conversion to SRT preserve ASS styling?
Not necessarily. SRT does not represent all ASS styles and positioning; inspect the converted captions against the source in your target player.
Tools
Tools frequently paired with this sample
Text Processing
SRT / ASS Subtitle Text Extractor
Extract clean dialogue text from pasted SRT, ASS, or SSA subtitles.
Media
Video Subtitle Add
Add hardcoded subtitles to videos using SRT, ASS, or VTT subtitle files with customizable font styling
Media
Video Subtitle Extract
Extract subtitle tracks from video files in their original format (no conversion)
Media
ASS to SRT Converter
Convert ASS/SSA subtitle files to SRT format
Media
Video Subtitle Embed
Embed subtitle files as soft subtitles in videos (switchable subtitle tracks, not burned into video)
Media
SRT to ASS Converter
Convert SRT subtitle files to ASS/SSA format with customizable font styling
AI Tools
Video Subtitle Translator
Extract or import subtitles, translate them with AI, and export clean SRT or ASS files while preserving timing and subtitle structure
Media
Subtitle Reading Speed & Localization Auditor
Audit SRT, WebVTT, and ASS subtitles for CPS, duration, line length, overlaps, and translation expansion risk.
Related
Related sample collections
SRT Subtitle Samples
Sample SRT subtitle files from simple to complex for testing import, translation, conversion, and timing-preservation workflows
VTT Subtitle Samples
Sample WebVTT subtitle files from simple to complex for subtitle previews, parser testing, conversion, and note handling
DWF Viewer Samples
A DWF CAD sample for in-browser preview
DXF Viewer Samples
A DXF CAD sample for in-browser preview
LHA Viewer Samples
A LHA Archive sample for in-browser preview
XPS Viewer Samples
An XPS fixed-layout document sample
Related
Related workflows
Subtitle Conversion, Embedding, and Localization Workflow
Move from source video or subtitle files to translated, converted, embedded, or burned-in subtitles ready for review and distribution.
Stream Copy, Remux, and Media Packaging
Inspect streams, remux containers, trim by timestamp, mux tracks, softmux subtitles, embed cover art, and batch rewrap media while preserving source quality.
Repair Translated Subtitle Sync and Deliver a Bilingual Track
Diagnose fixed offset, progressive drift or edit differences in existing translated subtitles, confirm cue correspondence, merge a bilingual track and verify readable selectable playback.
PDF Utility Workflow for Assembly, Layout, Redaction, and Protection
Prepare existing PDFs for delivery by reviewing typography, assembling pages, applying overlays, checking sensitive content, and adding access protection.