Communitygithub.com

documentaire-animé

Créez un documentaire cartoon (histoire vraie, 3-12 min, 16:9) entièrement en code avec Claude - sans modèle de vidéo IA. Personnages à tête de capsule dessinés en code, décors peints en couches avec parallaxe, texte peint sur les objets du monde, coupures nettes sur les mots de narration, narrateur ElevenLabs, rendu avec Remotion.

Qu'est-ce que documentaire-animé ?

Cette compétence permet à un agent IA (comme Claude) de réaliser un documentaire animé complet uniquement à l'aide de code, sans recourir à un modèle de génération vidéo. Le processus repose sur Remotion pour dessiner chaque image : personnages, décors, lumières, panneaux et mouvements de caméra sont programmés image par image. Cela garantit une cohérence visuelle parfaite (pas de coupures bizarres, pas de changement de visage entre les plans) et une possibilité de re-rendu après correction. La seule étape payante est la voix off (ElevenLabs). L'agent suit un pipeline structuré : recherche des faits avec vérification des sources, rédaction d'un script narratif rythmé, définition des personnages et de leurs tenues, puis construction des scènes et des plans. Le rendu final est une vidéo au format 16:9, avec des personnages au style distinctif (têtes capsules blanches, encre épaisse, ombres marquées), des décors peints en couches avec parallaxe, et un texte intégré aux objets (panneaux, tableaux, journaux). La compétence impose des règles strictes : pas de texte flottant ni de génériques bas, pas de scintillement, pas de personnages coupés par le cadre, et une attribution rigoureuse des citations et des faits.

Compatible avec✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/generalizingai/claude-animated-documentary-skill/tree/HEAD/animated-documentary

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Animated documentary in code

You (Claude) build the whole film as code: every character, set, light, sign and camera move is drawn on a canvas each frame by Remotion. No video generation model is used, so characters never get cut off, never change faces between shots, and every frame can be re-rendered after a fix. The only paid step is the voiceover.

The starter project lives next to this file in starter/. It already contains a working engine and a 12-second demo.

First run (set up once)

  1. Copy starter/ into the user's project folder (for example ./my-doc/). Work only in that copy.
  2. cd my-doc && npm install (needs Node 18+).
  3. npx remotion still src/index.ts Demo out/check.png --frame=180 and look at the image. If it shows an office with a seated character and a caption, the engine works. Show it to the user.

The engine (what is in starter/src/engine/)

  • rig.ts - the character rig drawHisto(pen, outfit, opts). Outfits: jacket/pants/shoes/shirt/tie colours, hat (fedora/cap/none), hairStyle (slick, bald, tufts, short, swept, long, swoop, mop, curly, spiky, bun, buzz, ponytail, afro, combover, quiff), stache, glasses + glassesStyle, leather, medals, build (lanky/stout/normal/slim), headShape, earrings, lashes... Opts: expr (neutral, smug, grin, happy, shock, angry, yell, worried, panic, content, stern, pout, laugh, sad, sneaky), talk 0..1, blink, look -1..1, mode (stand/stroll/sit), phase (walk cycle), lean, hand positions l/r, prop (newspaper/papers). Design box 600 x 1000, feet at y 975.
  • kit.ts - drawing helpers for sets: shape (filled + ink outline), box, rect, rrect, lin/rad gradients, soft (contact shadow), beam/glow/patch (painted light), dust, and lettering that lives ON things: board (wooden signboard), card (taped paper note), hand (painted/chalk/stamp text, auto-shrinks to fit its board), label, print. Fonts: F.sign (Londrina Solid), F.chalk (Caveat Brush), F.stamp (Special Elite), F.paper (Inter). CTX = per-shot switches the set reads (sign text, event frames).
  • types.ts - a SET is Layer[], back to front. Each layer has par (parallax depth: 0.8 far sky, 1.0 the character plane, 1.1-1.25 foreground) and either draw(pen, frame) or cast: "slotName" (where characters stand).
  • film.tsx - the compositor: spline camera, parallax, character lighting from the shot's look, light pool, vignette, bloom, grade, burned-in captions, and an audit mode that logs text touching edges/captions/characters.
  • shots.ts - buildPlan(sets, shots, total, audio, subs), camera helper P(x, y, zoom, roll), act(...) to place a character, blinkAt, and timingHelpers(timing) giving C("l03") (cut before line 3) and W("l03", "word") (the frame a word is spoken).

Study src/demo/office.ts and src/demo/street.ts before writing any set: that is the target finish.

The look (do not drift)

  • Characters: white capsule heads, no nose, small oval or line eyes, angular open mouths, thick dark-brown ink that swells on the shadow side, a hard cel shadow plus a soft gradient, a warm rim light. Same outfit in every scene.
  • Real people: recognisable by silhouette props only (hair shape, glasses, a signature jacket). Never a traced likeness. Private individuals: deliberately not a likeness.
  • Sets: painted in code, layered back to front, drawn past the frame edges (overscan) so the camera can move, painted light (window beams, lamp glows, floor patches), contact shadows where things meet the floor, rich grounded colour.
  • Text goes ON things: place names on signboards, dates on chalkboards or calendars, money and headlines on newspapers, documents on paper cards. No floating stickers, no lower-thirds.
  • Edit: hard cuts on narration words, shots 2-6 s, every shot a slow eased camera move (never a locked frame), the first 7 seconds cut fast (3-4 shots). No whooshes, no card flips, no glitch effects.

Hard rules (check every one before you deliver)

  1. Text never leaves its board and never touches a frame edge, even during camera moves. Prefer wide framings over crops of text-heavy sets. Run the audit render (below) and fix every EDGE / SUB / ACTOR line.
  2. No flicker: nothing switches on/off in a single frame. Never use Math.random() (use the seeded hh(i, s)), never step things with Math.floor(f / n). Lights ease on, counters roll, signs fade in with sm().
  3. No body problems: nobody is cut by the frame bottom mid-chest unless it is a deliberate close-up; people behind a desk sit in a cast slot BETWEEN the chair layer and the desk layer; nobody walks through furniture; nobody vanishes mid-shot; characters are never blurred.
  4. Facts: every claim in the script has a source. Real people never get invented dialogue: only verbatim, on-record quotes, and the narrator says who said it. Allegations are attributed ("according to reports in ...").
  5. Never clone a real person's voice. The narrator is a stock ElevenLabs voice the user picks.
  6. No set more than about 5 shots in a row unless it is a deliberate recurring device.
  7. Ask the user before anything that costs money, and say what it costs.

Pipeline

  1. Research. Pick a true story. Build docs/FACTS.md: every fact on its own line with its source URL and a tag: CONFIRMED / REPORTED / DENIED / UNKNOWN. Use web search; prefer primary sources.
  2. Script. Write docs/script.txt: one narration line per paragraph, blank line between them (this is what voice.py reads). About 150 words per minute. A narrator with attitude, short punchy lines, a new turn every 20-45 seconds, chapters for anything over 4 minutes, and an ending that separates what is confirmed from what is not. Show the user the script and get a yes before voicing.
  3. Cast. Define each character as an outfit in src/episode/cast.ts. Render a model sheet (a still of each character in a simple set) and get the user's approval before building scenes.
  4. Voice. The user needs an ElevenLabs account. Ask them to set the key in their own terminal (export ELEVENLABS_API_KEY=..., never paste it into chat or a file) and pick a narrator voice id. Then: python3 scripts/voice.py docs/script.txt . --voice <id> This writes public/vo/lNN.mp3 and src/episode/timing.json. Re-voice one line with --only l07. Fix pronunciation by rewriting the text (spell years and odd names out).
  5. Sets. One file per set in src/episode/sets/, exported as Layer[], registered in Episode.tsx with a look (LK(ambient, shade, keyColour, keyX, keyY, shadowPool, vignette)). Build 4-8 sets for a 4-minute film. Check each set with a still before using it.
  6. Shot plan. In src/episode/Episode.tsx, list the shots in time order: { set, a: C("l04"), from, to, ctx, cast }. Cut on words with W(line, word). Split any shot longer than ~8 s. npx tsc --noEmit -p tsconfig.json must pass.
  7. Check before rendering. One still per shot at its middle frame: npx remotion still src/index.ts Episode out/shot07.png --frame=<frame> --scale=0.5 Look at every still yourself. Fix cut-off text, heads hidden by desks, characters through furniture.
  8. Audit + render. Audit pass (fast, half size): npx remotion render src/index.ts Episode out/audit.mp4 --scale=0.5 --props='{"audit":true}' 2>&1 | grep "AUD|" Fix every reported line. Then the final: npx remotion render src/index.ts Episode out/episode.mp4
  9. Sound. Optional but recommended: a quiet music bed (about 20 dB under the voice) and a few real sound effects on key moments (a door, a stamp, a crowd). Mix with ffmpeg, keep the voice at about -14 LUFS.
  10. QA. Pull a contact sheet (ffmpeg -i out/episode.mp4 -vf fps=1/3,scale=480:-1,tile=6x6 out/sheet.jpg) and look for black frames, frozen shots, text off its board. Fix, re-render, deliver with a title that says the payoff.

Gotchas

  • F.* fonts load from Google Fonts at render time; the compositor waits for them. Renders need internet once.
  • Remotion copies public/ into a temp folder for every render: keep public/ small (voice files only).
  • Long films render faster in chunks: --frames=0-2999, --frames=3000-5999, then join with ffmpeg concat.
  • A set's draw function gets the shot-local frame f (0 at the cut). Use it for anything that moves.
  • If W(line, word) throws, the word is not in that line: check timing.json for how the voice spelled it.

Skills associés