How dmtrkovalenko/fframes works
fframes is a Rust framework for authoring animated, audio-enabled videos as SVG-producing Rust code, then previewing, inspecting, and rendering them. The main workflow is author-defined scenes and media → frame generation → rasterization → audio/video encoding. The repository also provides a browser timeline editor, a native playback window, and CLI diagnostics such as frame export, contact sheets, onion skins, and audio analysis. The README documents these capabilities; sampled source supports the rendering pipeline and media/editor interfaces, but not every CLI command’s internal wiring.
Main entry points: video.rs Video API · renderer.rs Render runtime · cli.rs Project CLI · encoder.rs Video encoder
Components 23
Video authoring
- Video API
fframes/src/video.rs - Scenes and timing
fframes/src/scenes.rs - SVG authoring macro
svgr-macro/src/lib.rs - Animation
fframes/src/animation/mod.rs
Render and export
- Project CLI
fframes/src/renderer/cli.rs - Render runtime
fframes/src/renderer/renderer.rs - GPU renderer
fframes-skia-renderer/src/skia_pipeline.rs - CPU renderer
fframes/src/renderer/cpu.rs - Video encoder
fframes/src/renderer/encoder.rs - Render diagnostics
fframes/src/diagnostics.rs
Preview and editor
- Native preview
fframes-native-player/src/app.rs - Browser editor
fframes-editor/src/ui/Editor.bs.js - Timeline UI
fframes-editor/src/ui/Timeline/Timeline.bs.js - Wasm controller
fframes-editor/src/WasmController.bs.js - Video frame buffer
fframes-editor/src/services/VideoFrameBufferManager.ts
Media and audio
- Media providers
fframes/src/media_provider.rs - Media decoding
fframes-media/src/lib.rs - Audio mixing
fframes/src/audio_mix.rs - Audio analysis
fframes/src/audio_analysis.rs
Other components
- Video author
- FFmpeg libraries
- Editor user
- Rendered video
Connections 25
- Video author → Video API: implements
- Video API → Scenes and timing: defines scenes
- Video API → SVG authoring macro: returns SVG
- Video API → Animation: animates frames
- Project CLI → Render runtime: starts render
- Render runtime → Video API: generates frames
- Render runtime → GPU renderer: dispatches frames
- Render runtime → CPU renderer: dispatches frames
- GPU renderer → Video encoder: sends pixels
- CPU renderer → Video encoder: sends pixels
- Video encoder → FFmpeg libraries: encodes via
- Video encoder → Rendered video: writes
- Project CLI → Render diagnostics: runs diagnostics
- Project CLI → Audio analysis: analyzes audio
- Project CLI → Native preview: opens preview
- Editor user → Browser editor: edits video
- Browser editor → Timeline UI: shows timeline
- Browser editor → Wasm controller: calls controller
- Wasm controller → Video API: renders frames
- Video frame buffer → Media decoding: decodes video
- Wasm controller → Video frame buffer: requests frames
- Video API → Media providers: resolves media
- Media providers → Media decoding: uses decoders
- Render runtime → Audio mixing: mixes audio
- Audio mixing → FFmpeg libraries: encodes audio