OPEN SOURCE DEEP DIVE
OpenMotion: Agentic, Editable Motion Graphics from Reference Video
OpenMotion reconstructs reference videos as editable code projects, using an agent to map shots, transitions, typography, motion, and sound before rebuilding them with HTML, CSS, JavaScript, and managed media. The same workspace preserves versions and hands a pinned snapshot to a Chromium and FFmpeg render pipeline that verifies the MP4. It does not claim automatic pixel-perfect recreation, and channel publishing, scheduling, and automatic reframing remain planned.
OpenMotion is an open-source workspace for building motion videos as editable code. Instead of asking a model to emit a finished file that cannot be revised, it gives an agent a project made from HTML, CSS, JavaScript, animation code, and managed media. The agent can study a reference clip, reconstruct its shots and transitions, and leave the result in a visual timeline that a person can continue to inspect and refine.
That makes the project closer to an agent-assisted motion development environment than a conventional text-to-video service. The reference supplies structure and pacing; the creator supplies a new script, brand system, footage, and generated or licensed assets. Source files, media, versions, and export evidence remain together, so a recreated sequence can become the starting point for later work rather than a disposable output.
From reference clip to editable project
The repository describes a four-part recreation loop. First, break the reference into shots and record transitions, sound cues, and the elements that should change. Next, have an agent rebuild the shots with the new copy, brand, and material, then place them on an editable timeline. Third, compare the original and the remake at matching moments and correct timing, motion, and audio. Finally, export an MP4 while retaining the editable source and the rights-cleared assets.
Motion.md records the creative context around that work. It can describe the narrative grammar, visual hierarchy, timing and motion, material and sound roles, invariants, replaceable inputs, and review rules. Brand facts, approved assets, typography, and voice guidance can live alongside the motion notes. This gives an agent a concrete basis for deciding what should remain recognizable and what must be replaced.
The document is not a universal video parser or animation importer. The project deliberately separates creative intent, agent procedure, executable source, and evidence. Markdown explains the desired result; the HTML project actually produces it; paired previews show what still differs. OpenMotion makes no claim of compatibility with an external .motion container and does not present a similarity score for arbitrary references. Fidelity depends on available source, assets, fonts, timing, camera behavior, and the render environment.
Why video becomes code
HTML, CSS, JavaScript, and an animation timeline keep composition and timing inspectable. A title hold, an entrance frame, or a transition boundary can be represented directly in the project. An agent can read and change those details without inventing a second editing model, while a person can return to the visual workspace for frame-level adjustments. The same representation can be versioned and compared rather than living only inside an opaque binary timeline.
Media remains part of the system. Footage, screenshots, images, music, and voice-over enter the same managed project as the code. An agent can replace a product shot, add a presenter, revise captions, or change an ending. Supported model integrations can generate images, video, music, and speech, but candidates are adopted into the film rather than inserted automatically. Existing media can be used without invoking any generation API.
The practical benefit is not that every output is automated. It is that revisions remain anchored to a durable production object. Changing copy, a product image, a scene order, or a delivery format does not require regenerating the entire piece from a prompt and hoping that the rest survives.
One project shared by the workspace and agents
The Studio interface is built with React, TypeScript, and Vite, with CodeMirror for source editing, Dockview for panel layout, and Zustand for state. It exposes project files, preview, timeline, media, version history, and export controls. External agents do not maintain a shadow copy of the film. Through the project contract, they edit the same source and media inventory that the visual workspace observes.
This shared representation is central to the design. If an agent writes prompts into one system while a person edits a separate timeline, the two versions inevitably diverge. OpenMotion instead routes both kinds of work through one project and one version history. Writes carry a stable request identifier and an expected revision; an outdated request is rejected rather than allowed to overwrite newer work.
The repository supports both a local development path and a hosted agent path. The default connection is a hosted Streamable HTTP MCP endpoint authenticated with OAuth 2.1, with a personal access token available for clients that cannot complete OAuth. The MCP surface covers project creation and reading, edits, preview, asset import, model generation, version restoration, archives, cancellation, and export. Resources served through the same connection explain template selection, reference reconstruction, media handling, and delivery checks.
Cloud execution and render verification
The hosted design separates fast API work from long-running media and rendering jobs. Service roles cover the API, media workers, render workers, and catalog synchronization. PostgreSQL stores relational state, Redis and BullMQ coordinate background work, and an S3-compatible content-addressed store holds media. A creation request can therefore establish a project before model generation, rendering, and other costly steps finish.
An export starts by pinning a specific project version. The system copies and verifies the complete content snapshot, records dimensions, frame rate, and duration, then passes the snapshot to the pinned HyperFrames renderer. Chromium captures the composition and FFmpeg produces the MP4. A successful process exit is not sufficient: the pipeline also checks the file header, expected media properties, complete audio and video decoding, and representative seek points before marking the export complete.
Those checks establish technical validity, not creative quality. A person still needs to judge composition, sound, pacing, and meaning. The render chain uses HyperFrames 0.9.7 with a separate runtime lock so that an environment change does not silently alter the meaning of a saved project. Temporary media snapshots are removed after the job, while the project keeps the version and export record associated with the request.
Concurrency and paid jobs
Agents and people may work on a project at the same time, so mutations require both a request identity and the revision the caller observed. Retrying the same operation can reuse a stable request identifier, but a write against an older project state fails with a conflict. This is a conservative choice: it can require the caller to read the project again, but it avoids pretending that two incompatible changes were merged safely.
Media generation and rendering can incur real provider or compute costs, so the system intentionally does not auto-retry paid generation and render jobs. After a lost connection, a client should query the existing job rather than submit the work again. For an open-source production system, that distinction matters more than an attractive but unsafe “keep retrying until something happens” policy.
Where it fits
The published examples cover product launches, brand films, explainers, data stories, music visuals, and presenter-led edits. They share a useful condition: the creator knows which content should change and expects to review the result. OpenMotion is not a promise that any reference video can be reproduced at pixel fidelity in one pass. Its own documentation treats reconstruction quality as dependent on source availability, assets, typography, camera behavior, and actual rendered comparison.
The delivery workflow also remains deliberately manual at its final edge. Portrait, landscape, and square versions are separate compositions today; the creator exports an MP4 and uploads it to the chosen platform. Channel connectors, scheduled publishing, automatic reframing, and performance feedback are documented directions, not shipped features. Describing them as complete would misrepresent the project.
Why the project matters
OpenMotion’s most interesting contribution is the production model around the model. It connects reference analysis, code-based reconstruction, visual editing, asset generation, revision protection, and render verification in one inspectable system, while stating where the guarantees stop. The agent handles search, decomposition, and repeated source edits; the person remains responsible for intent, factual accuracy, visual acceptance, and final delivery.
The repository is licensed under Apache-2.0 and is primarily written in TypeScript. It includes a template library, agent skills, deployment files, and an explicit MCP contract. For teams studying how video production can move from one-shot generation toward sustained editing, it is a runnable and auditable reference. For users seeking a fully automatic final cut from a single prompt, it still asks for engineering understanding and human judgment.