onimite
Make videos with code. A video is a Lua script: scenes, shapes, text,
images, SVG and Lottie, clips, shaders, music, sound effects and spoken
lines. One small native binary renders it to MP4, plays it in a live
preview that reloads on save, and checks it for you: frames, contact
sheets, problems found automatically, loudness and beats. It is built so
that a coding agent can make a video end to end and know it is right
without watching it.
Install it (what the installer does is under Releases):
curl -fsSL https://defnotmid.com/install.sh | sh # macOS (Apple Silicon), Linux (x86_64)
irm https://defnotmid.com/install.ps1 | iex # Windows (PowerShell)
Then, in a clone of this repository:
onimite render examples/why_onimite/video.lua -o why_onimite.mp4
onimite preview examples/why_onimite/video.lua # plays with sound, reloads on save
onimite inspect examples/why_onimite/video.lua # what is wrong, by script line
- Small. One binary and the SDL3 library beside it (and Lua's DLL on
Windows); BENCHMARK.md gives each archive's size as
downloaded and unpacked. Nothing else to install, no build step per
video. (
say()'s voice models are an
optional 835-866 MB download, made on first use.)
- Fast. Frames are built on every core and drawn on the GPU (Vulkan,
Metal, Direct3D 12), with hardware encoding when there is one.
BENCHMARK.md races it against every fframes example
ported 1:1 on each release: wall time, CPU time and memory, fframes'
wins included.
- Checkable.
inspect, show, frame, strip, onion, motion,
audio analyze and --json on every command answer "is it right?"
without a human watching; an MCP server and an agent skill come with it.
When to use something else
onimite is one opinionated program, not a library. If you want to write a
video in Rust and compile it into your own program, with the whole language
and its crates at hand, use fframes
(onimite began by porting its examples and keeps parity with them). If you
want React and the web platform (HTML, CSS, npm), use
Remotion. For a TypeScript animation library
with an editor, use Motion Canvas. What fframes
and Remotion put on disk before the first frame, measured on Linux, is in
BENCHMARK.md.
onimite is built from sibling Odin projects and Odin's vendor packages:
| piece |
what |
ovg |
2D vector canvas (femtovg lineage): software backend + SDL_GPU (Vulkan / Metal / Direct3D 12) |
oglyph |
fonts and OpenType text shaping in native Odin (HarfBuzz's rules, checked against it), which ovg draws text through |
oicut |
H.264 / H.265 / AAC codecs (native Odin, Vulkan Video when available), MP4, clip decoding; every image (PNG, JPEG, GIF, WebP, ...) and audio file (WAV, FLAC, MP3, Ogg, M4A) |
oksl |
shader compiler for SkSL, Shadertoy and GLSL: SPIR-V, MSL and a CPU program (machine code through its JIT on Linux and macOS, AVX2 on x86-64 and NEON on arm64; an interpreter on Windows); ovg and o3d write their own shaders in it too |
ottis |
text to speech with word timings (Kyutai's Pocket TTS through ONNX Runtime, loaded at run time; models downloaded on first use) |
odawg |
sound in Tone.js's vocabulary: songs composed from data (song{}, sound{}), the mix, master and preview stream, loudness, onsets and spectra; sample sets downloaded on first use |
o3d |
3D in three.js's vocabulary: an SDL_GPU renderer and a software one drawing the same pixels, glTF 2.0 (skins, morph targets, animations), 3MF and OBJ import |
vendor:lua/5.4 |
the script runtime |
vendor:sdl3 |
GPU device and the preview window |
Features
- Scripts:
video{} and scene{} with overlaps and transitions, a node
tree (shapes, paths, text, images, groups), keyframes with easings and
springs, and a standard library after Remotion (sequence, series,
loop, freeze, stagger, transitions, a beat clock). Data comes in as
props from --props, --set or one --batch row per video;
json_decode reads JSON files.
- Drawing (ovg): gradients, patterns, dashes, clip paths, masks, the 16
blend modes and every SVG 1.1 filter primitive (feTurbulence on the GPU,
fractional morphology radii), with filter regions. Text is shaped
(ligatures, kerning, Arabic, Indic, bidi) and drawn as outlines, with
per-glyph fallback and bundled colour emoji.
- Media: fonts, png / jpeg / bmp / gif / tga / webp images (decoded on
first use, kept within
--image-cache MB), SVG documents and Lottie
animations with per-id / per-layer overrides, video clips (.mp4, .mov,
.webm, ProRes 4444 and VP9 alpha), subtitles and word-level captions
(Whisper JSON, VTT, SRT; TikTok-style captions{}), audio spectra, glTF
3MF and OBJ models (.glb, .gltf, .3mf, .obj).
- Shaders (oksl): SkSL as in fframes, Shadertoy code and GLSL ES
fragment shaders (a real preprocessor,
texture, switch, discard),
and multipass programs mixing them (passes: feedback, any pass's last
frame; Shadertoy's Common + Buffer A-D + Image is one spelling). Images,
clips and groups of nodes bind as inputs. The software backend runs the same
shaders as oksl CPU programs.
- 3D (o3d):
view3d{} draws a scene described in three.js's terms
(perspective cameras with a physical lens, f-stop and focus on a point,
and orthographic ones; ambient, hemisphere, point, directional and spot
lights with up to 4 PCF shadow maps fitted to the view; a frame drawn in
linear light, tone mapping and fog;
box, sphere, plane, cylinder, torus, rounded box, circle, ring and lathe
meshes plus per-frame 3D lines, point clouds, wireframe and instances;
2D drawn onto surfaces every frame (panels) or once (bake{}, a studio
light too); a mirror plane for reflective floors; MeshStandardMaterial,
MeshPhysicalMaterial (clear coat, sheen, glass), MeshBasicMaterial,
MeshToonMaterial with cartoon outlines,
LineBasicMaterial and PointsMaterial with texture
maps, and GLSL ES ShaderMaterial; an equirectangular environment and
background; glTF 2.0, 3MF and OBJ models, including skinned characters, morph
targets and punctual lights, posed at a time of their animations with
optional morphs and material overrides) into a box
composited like any layer, on the GPU or, the same picture, on the CPU.
- Motion blur:
motion_blur = { shutter = 180 } opens a camera's
shutter on every frame, or in the seconds of its during or a scene's own:
what moves streaks along its motion, 2D draws and
3D views alike (meshes, models, particles, the camera), on the GPU and the
CPU, in renders and the preview; onimite motion shows the speeds.
- Physics: rigid bodies simulated once at load and sampled per frame,
in 2D (
physics{}, Box2D) and 3D for view3d{} (physics3d{}, Box3D):
shapes, joints, kicks, kinematic movers, and impacts as times for sounds.
- Sound: tracks on the video or scenes with gain, pan, fades, voice
ducking and a master limiter, mixed and streamed by odawg (the preview
plays the render's samples); music composed from data with
song{}
(sections with tempo, style, energy and chords; its sections are cues and
its notes answer the picture: score.time("drop@1m"), score.pulse(f, { part = "drums", note = "kick" })) and one-shots with sound{}; audio
synthesized by the script (audio_add); onsets and the beat of any clip
(audio_onsets); AAC in the MP4.
- Voice:
say(name, text) speaks a line (ottis: Pocket TTS by Kyutai,
CC-BY-4.0) with the time of every word, and its captions; say_cue puts
animation keys and sound effects on spoken words, and inspect checks
them against the voice. A voice can be cloned from a recording in media/
(voice = "me.wav"). Lines are kept on disk by content, so only new or
changed lines are synthesized, where the script loads. ottis runs it on
Linux, macOS and Windows in its CI; onimite's Windows build has it, untested.
- Cues:
cue(name, t) names a moment and cue = "name" on scenes, tracks
and animate keys lands them on it; inspect reports what drifts off, and
cues work as times.
- Output: H.264 / H.265 MP4 through the system's codecs (VideoToolbox on
macOS, in hardware or Apple's software codecs; Vulkan Video on Linux and
Windows; Media Foundation on Windows: H.264, and H.265 with Microsoft's HEVC
Video Extensions; else the system's FFmpeg, libavcodec, loaded at run time
and never bundled), AV1 MP4 through oicut's own encoder in every build
(
--codec av1: royalty-free, needs no codec on the machine; at the same
quality, from a little smaller than H.264 to larger on sharp motion
graphics), VP9 WebM through oicut's own encoder in every build (-o x.webm,
sound as Opus, transparent when the video's background is), or PNG frames.
Releases carry no H.264 / H.265
codec of their own: oicut's native one is only in a build with
-define:OICUT_PATENTED=true. With none of those on the machine, render
to an MP4 says so and names --codec av1 and PNG frames. Frames build on all cores and draw on the GPU
(or on the CPU with --software, and on a machine without a GPU); the output does not depend on the thread
count.
- Checking without watching: PNG frames, contact sheets, onion skins,
frames as SVG, snapshot tests,
inspect (missing media and fonts,
clipped or overlapping text, NaN, script errors, unused options, sync drift),
undefined globals as errors, loudness analysis, onsets, and stable
error codes in --json output.
- Preview: a window with sound, scrubbing, a timeline with thumbnails
and waveforms, hot reload of the script, its modules, shaders, data and
media.
The full script API is skills/onimite-video/references/api.md;
skills/onimite-video is a skill for coding agents
that make videos with onimite.
Use it with an AI agent
The onimite-video skill (skills/onimite-video) teaches a coding agent to write, check
and render onimite videos. No terminal tools are needed; use whichever fits your agent:
- Claude Code (terminal, desktop app or IDE): type
/plugin marketplace add defnotmid/onimite, then /plugin install onimite@defnotmid.
- Codex: ask it
$skill-installer install https://github.com/defnotmid/onimite/tree/main/skills/onimite-video.
- Any other agent that can run commands: paste this into it:
"Install the agent skill at https://github.com/defnotmid/onimite/tree/main/skills/onimite-video
(the folder holds SKILL.md and a references/ folder) into your skills directory, then
install the onimite binary as the skill describes."
The skill downloads the onimite release binary itself (see Releases).
onimite mcp also serves the commands as MCP tools (JSON-RPC over stdio): typed arguments,
frames returned as images, no shell quoting, and a guide tool that returns this skill, built
into the binary. The Claude Code plugin registers it; for other MCP clients the server is the
command onimite with the argument mcp (the binary on PATH; --dir PATH sets the folder
relative paths start in).
Claude Desktop: download
onimite-macos-arm64.mcpb
or onimite-windows-x86_64.mcpb
and open it: Desktop installs the extension with its own copy of onimite and asks for a work
folder (default Documents/onimite). Claude writes the video files there with a filesystem
extension (Desktop's Filesystem extension, given the same folder). When a newer release is
out, Claude says so; ask it to update (the update tool), then quit and reopen Desktop.
The extension's "Check for updates" setting turns the check off.
Releases
The install command at the top of this page fetches the latest release: it
checks the archive against SHA256SUMS and puts an onimite launcher in
~/.local/bin (on Windows its folder on the user PATH). Run it again to
update; ONIMITE_VERSION=vX.Y.Z pins a release.
onimite --version prints the release it is. onimite update replaces it with
the latest release: it reads that release's SHA256SUMS, downloads this
platform's archive, checks it, runs the new binary once, then swaps it in (an
installer's current link moves to the new version's directory; anywhere else,
a Desktop extension or an unpacked archive, the files are replaced in place).
onimite update --check only says whether a newer release is out. onimite mcp
does that check once as it starts (off with --update-check false or
ONIMITE_NO_UPDATE_CHECK=1).
Push a tag vX.Y.Z (git tag v0.1.0 && git push origin v0.1.0; a tag with
a -, like v0.2.0-rc1, makes a prerelease, which the installers skip).
.github/workflows/release.yml builds -o:speed stripped binaries against
ovg, ocurves, oglyph, oksl, oicut, ottis, o3d and odawg at their pinned tags,
with the tag as their --version, and publishes a GitHub release: