Before History, Chapter 0
A 67-second narrated documentary about India's deep past. Every frame is drawn in code with Canvas, and every sound is synthesised with Web Audio. No video tools, no stock footage, no audio files.
- Made
- Length
- 67 seconds, 1080p
- Written by
- Claude Opus 5.5
- Built with
- Canvas 2D, Web Audio, Node, ffmpeg
- Status
- Paused after version 2
The question
Can Claude Opus 5.5 make a short film with nothing but code? Not generate a video, but write the program that draws and scores it: the scenes, the camera, the light, the music and the sound effects, all in JavaScript.
I set the brief, directed and reviewed. Claude wrote the code, with most scenes built by parallel agents working one scene file each.
How it's made
- Each frame is a pure function of time.
render(t)draws the film at any second using seeded noise, so it is deterministic and can be scrubbed like a video. - Six scenes: India drifting north as an island plate, toolmakers at Attirampakkam 1.5 million years ago, the Toba supervolcano, the Bhimbetka rock shelters, the first farms at Mehrgarh, and the first cities.
- Coastlines and rivers are real geography from Natural Earth, not hand-drawn shapes.
- The soundtrack is synthesised: wind, fire and crickets, a tanpura drone, frame drums and a bansuri phrase in raga Bhupali, mixed under a neural text-to-speech voice.
- To export, a script drives headless Chrome frame by frame through the DevTools protocol, renders the audio offline, and joins the two with ffmpeg.
What didn't work
The first version's scene briefs used adjectives like "premium" and "layered depth". The results were flat vector scenes. Only Bhimbetka, which started life as a 10-second sample and had the most iteration, looked right.
For version 2 I turned the Bhimbetka scene into an art bible. It listed concrete techniques: every surface is a material, one motivated light source, a strict two-hue palette, and figures as silhouettes with a rim light. It also made a rule that every scene is reviewed side by side against Bhimbetka reference frames. The scenes improved, but only Bhimbetka reaches the standard. I've paused the series there.
The lesson I'd keep: brief visual work with references and techniques, not adjectives.
Smaller things that bit:
- A bulk rename turned one line into
HIT = HIT, which silently killed the whole soundtrack. - AAC encoding pushed the audio peak above 0 dBFS until a limiter went into the final mix.
- Synthesising 67 seconds of audio in the browser takes about a minute before playback can start. That's why this page shows a rendered video rather than the live player.
Narration
- Long before kingdoms, before cities, before writing, India was an island, drifting north across an ancient sea.
- Fifty million years ago, it struck Asia, and the Himalayas began to rise.
- One and a half million years ago, near today's Chennai, early humans shaped stone into tools.
- Seventy-four thousand years ago, a supervolcano in Sumatra buried India in ash. Yet people endured.
- In the hills of central India, they painted their world onto stone.
- Nine thousand years ago, at Mehrgarh, they sowed wheat and barley, tamed cattle, and built homes of mud brick.
- From villages like these, the first great cities would rise.
Source
Everything needed to run, change and re-render the film. Serve the folder locally and open it in Chrome or Edge. The README covers the rest.
before-history-source.zip 127 KB: the player, six scenes, export and narration tools, and the art bibleCode is MIT licensed. The film is CC BY 4.0, so you can share and adapt it with credit. The narration voice isn't included in the download; the README shows how to generate one.