Export to video / image
Domotion ships two standalone CLIs for turning an SVG into other formats.
svg-to-video — animated SVG → video
Section titled “svg-to-video — animated SVG → video”Renders an animated SVG (a domotion animate / composite / term output, or
any CSS-/SMIL-animated SVG) to video by stepping the timeline frame by frame in
Chromium, then piping the frames to ffmpeg (a required external dependency,
on PATH).
# A 1280-wide mp4 at 30fps (duration auto-derived from one animation loop).svg-to-video hero-product-demo.svg -o demo.mp4 --width 1280
# 60fps webm (VP9), 2× supersampled, with looping background music.svg-to-video demo.svg -o demo.webm --format vp9 --fps 60 --scale 2 --music bed.mp3
# An animated GIF (use an fps that divides 100 for exact timing).svg-to-video demo.svg -o demo.gif --format gif --fps 25Key flags: --width/--height (contain, aspect-preserving), --fps (default
30), --duration <s>, --format (h264 default / hevc / vp9 / vp8 /
av1 / prores / gif / apng), --scale (supersample, default 2),
--background, --music / --audio / --captions. Run svg-to-video --help.
svg-to-image — SVG → still image
Section titled “svg-to-image — SVG → still image”The one-shot rasterizer for looking at what you produced, embedding a
thumbnail, or handing off a flat asset. The output format follows the -o
extension (or --format): PNG / WebP / AVIF / TIFF (keep alpha), JPEG
(--quality), or a single-page vector PDF.
svg-to-image card.svg -o card.png # PNG at intrinsic sizesvg-to-image card.svg -o card@2x.png --scale 2 # crisp retina rastersvg-to-image demo.svg -o frame.webp --at 4000 # one frame of an animation, at 4ssvg-to-image poster.svg -o poster.pdf # vector PDF--at <ms> samples an animated SVG’s timeline; --width/--height contain to a
target size; --background <css> sets the page behind the SVG. Run
svg-to-image --help.
svg-scrubber — inspect an animated SVG
Section titled “svg-scrubber — inspect an animated SVG”For debugging an animated SVG’s timeline, svg-scrubber demo.svg opens a local
video-style bench — play / pause / scrub / mark a range / export a frame or the
range.
Add --review to turn it into an issue-reporter for an animated SVG (the
timeline counterpart to svg-review): type a title + note, drag to draw one or
more regions on the current frame, optionally attach a rendered frame PNG, and it
writes an importable .ticket JSON (the frame time, the in/out range, and the
regions included) to the launch directory.