Skip to content

Add Lottie Studio: web UI + agent job-bridge + MP4 export#13

Open
hasaneyldrm wants to merge 1 commit into
diffusionstudio:mainfrom
hasaneyldrm:feat/lottie-studio
Open

Add Lottie Studio: web UI + agent job-bridge + MP4 export#13
hasaneyldrm wants to merge 1 commit into
diffusionstudio:mainfrom
hasaneyldrm:feat/lottie-studio

Conversation

@hasaneyldrm

Copy link
Copy Markdown

Lottie Studio: web UI + agent job-bridge + MP4 export

A small, self-contained addition on top of the existing Skottie player.

What it adds

  • public/studio.html (served at /studio) — drop a photo/SVG, write a prompt, pick options (size, fps, frames, background, loop, editable controls, notes). Live player iframe + recent-jobs feed.
  • vite-plugins/studio.ts — a job queue on the dev server:
    • POST /api/jobs writes each request to .studio-jobs/<id>/job.json (+ image), GET /api/jobs[/:id] reads status.
    • A watching coding agent picks up pending jobs, authors public/projects/<project>/<scene-N>/lottie.json, and writes the result back. No API key lives in the app — the agent is the generation engine, reusing the existing scene contract the player already watches.
  • MP4 exportGET /api/export?project=&scene=&bg=&fps=&loops= renders a scene frame-by-frame through Skottie/CanvasKit, composites transparent scenes on a chosen background (MP4 has no alpha), and encodes H.264 via a bundled ffmpeg-static binary (no system ffmpeg needed). Streamed back as a download; there's an MP4 indir button on each finished scene.

Notes

  • Only touches additive surfaces: a new HTML page, a new Vite plugin, one dependency (ffmpeg-static), and small vite.config.ts / .gitignore edits. No changes to the player, scene loader, or existing scenes.
  • No example scenes shipped; .studio-jobs/ is gitignored.
  • Adds ffmpeg-static to package.json (I develop with npm; the lockfile isn't included — run bun install to update bun.lock).

This is an opinionated feature (the "agent watches a folder" bridge). Happy to split the MP4 export into its own PR if that's more useful on its own, or to adjust anything.

🤖 Generated with Claude Code

A small web UI (public/studio.html at /studio) that lets you drop a photo/SVG,
write a prompt, and pick options; a Vite dev-server plugin exposes a job queue
(/api/jobs) writing requests to .studio-jobs/<id>/. A watching coding agent
authors the scene under public/projects/ and the player shows it live — no API
key in the app.

Also adds MP4 export: GET /api/export renders a scene frame-by-frame through
Skottie (CanvasKit) and encodes H.264 via a bundled ffmpeg-static binary
(no system ffmpeg required), streamed back as a download.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant