Streamplace AtmosphereConf 2026 VOD JAM
README.md

ass-renderer #

Work in progress — The renderer is functional but the API is subject to change.

ASS (Advanced SubStation Alpha) subtitle renderer using a software (CPU) backend built on tiny-skia.

Features #

  • Software (CPU) rendering via tiny-skia — works everywhere, no GPU dependencies

  • ASS/SSA support

    • All ASS v4+ tags and formatting
    • Style inheritance and resolution
    • Positioning (\pos, \move, \org)
    • Animation (\t tags)
    • Karaoke effects
    • Drawing commands (\p)
    • Clipping (\clip, \iclip)
  • Caching: Glyph, bitmap, and frame-level caches to avoid redundant work

Usage #

use ass_renderer::{Renderer, RenderContext};
use ass_core::parser::Script;

// Parse ASS script
let script = Script::parse(script_text)?;

// Create rendering context
let context = RenderContext::new(1920, 1080);

// Create renderer
let mut renderer = Renderer::new(context)?;

// Load the script once before rendering
renderer.load_script(&script)?;

// Render frame at specific time (in centiseconds)
let frame = renderer.render_frame(&script, 500)?;

// Access pixel data
let pixels = frame.pixels(); // RGBA8 format

Feature Flags #

  • default: Enables software backend and analysis integration
  • software-backend: CPU rendering support
  • analysis-integration: Integration with ass-core analysis
  • backend-metrics: Performance metrics collection
  • serde: Serialization support

Testing #

cargo test --package ass-renderer --all-features

License #

MIT OR Apache-2.0