Rendering Video From Rust Code, One SVG Tree at a Time
If you've ever tried to generate video programmatically, you know the pain: either you write thousands of lines of drawing code by hand, or you lean on a heavy framework that takes forever to render. fframes is a Rust framework that takes a different angle—every frame of your video is just an SVG tree returned by a function, and the whole thing is built for fast iteration and fast rendering.
What It Does
fframes renders videos from code. You define a Video implementation in Rust, set your frame rate and dimensions, and implement a render_frame method that returns an SVG tree for each frame. The SVG is written with a svgr! macro that looks a lot like plain markup, so if you've ever written HTML or SVG by hand, the syntax will feel familiar.
The example in the README is refreshingly concrete: a HelloWorldVideo at 30 FPS and 1920x1080, lasting 30 seconds. Inside render_frame, a blue rectangle animates along a timeline using a timeline! macro with easing, and a text element prints the current frame index and second. That's the whole mental model—frames in, SVG out. Animations are expressed declaratively with at timestamps and animate transitions, so you're describing motion rather than imperatively stepping through it.
Why It's Cool
-
The SVG-per-frame model is genuinely clever. Instead of inventing a whole new drawing API, fframes leans on SVG—a format developers already understand—and wraps it in a Rust macro. You get the expressiveness of markup with the safety and speed of Rust.
-
It's built for AI-assisted workflows. The README pitches this as a "video vibe coding framework," and the getting-started flow reflects that: you install a skill and ask your favorite AI agent to make something. The stated goal is quick and efficient iteration speed for your agent, plus a useful real-time preview for you. That's a specific bet on how people will write code going forward, and the framework is shaped around it.
-
Rendering speed is the headline claim. The README says fframes is over 30x faster than Remotion. I can't verify that number from the README alone, but the architecture—compiling to native Rust rather than running in a browser context—makes the claim plausible. If render time is what's been keeping you away from code-generated video, that's the number to care about.
-
The examples are real and stealable. The repo ships with examples like
fframes-intro, a 128-second launch video where everything is placed on the beat grid of its soundtrack. The README explicitly invites you to borrow from them. Having a working reference for beat-synced animation is worth more than a page of docs.
How to Try It
- Start with the skill and let an agent scaffold something:
npx skills add https://fframes.studio
-
Then iterate. The README's recommended flow is to ask your AI agent to make something you want and refine from there.
-
If you'd rather write it yourself, look at the
hello-worldexample in the repo—it's short enough to read in a couple of minutes and covers the core pieces: theVideotrait,render_frame, thesvgr!macro, and thetimeline!animation syntax. -
Browse the other examples for inspiration (or outright theft, which the README encourages). The
fframes-introsource shows how to sync animation to a soundtrack.
The crate is published on crates.io and documented on docs.rs. The full source lives at github.com/dmtrkovalenko/fframes.
Final Thoughts
fframes is a focused tool with a clear opinion: video is just frames, frames are just SVG, and the whole loop should be fast enough that you (or your agent) can iterate without waiting. It's best suited to developers who are comfortable in Rust and want programmatic control over generated video—motion graphics, data-driven visuals, title sequences—rather than folks looking for a GUI editor. The 30x speed claim is the thing to test for yourself, but the design decisions behind it are sound, and the example-driven approach makes it easy to judge whether it fits your project before you commit.