Skip to main content

Module video

Module video 

Source
Expand description

Real video generation as an animated GIF.

Compiled in with --features video. Re-uses the synthetic image renderer to produce N frames at the requested FPS and width/height, then encodes them into a single animated GIF using the gif crate. The output is a real, decodable animation that any browser, GIF viewer, or image::ImageReader can open.

Why GIF and not MP4? Producing a valid MP4 requires shipping an H.264 (or other video codec) encoder, which adds tens of MB of native dependencies for what is fundamentally a placeholder until real video-diffusion engines are wired in. Animated GIF is single-file, pure Rust, universally readable, and emits a genuinely-animated artefact — exactly what we need from a “synthetic video” engine.

Structs§

VideoEngine

Functions§

render_gif
Render an animated GIF from procedural frames. Frames per second is hardcoded at 10 — GIF supports 1/100 s frame delays so 10 fps is a natural round number.