pdoom-video: The Music Video Engine That Compiles Time Into Pixels

A deterministic Three.js pipeline turns song time into frame-perfect motion, beat-synced typography, and 4K60 exports that match the browser preview.

10 min read • View on GitHub • More from mexicat

A wide editorial scene showing a mechanical clockwork projector on a white desk. Sheet music feeds into one side of the machine, while film frames and waveform fragments emerge from the other side in perfect alignment. Small gears and dials suggest the code layers that make the system deterministic.
The project treats time like an input to a compiler, not a timeline to drag around.

The video was made with Claude (Opus 5.5) in Claude Code: the concept and treatment, the lyric alignment and audio analysis, the renderer, every scene and the renders were all worked out in conversation with Claude.

John Heibel, Creator / Maintainer · mexicat/pdoom-video README
Key Takeaways

The Strange Promise of Deterministic Video

Most video tools assume a timeline you scrub, trim, and nudge by hand. pdoom-video flips that model: the song is the source of truth, and every frame is a function of time. That means the browser preview is not a sketch. It is the same system that produces the final export.

The engine does not guess at blur. It samples time until the frame is good enough.

Every frame is a deterministic function of song time, so the live preview in the browser and the offline 1080p60 (or 4K60) export are identical.

John Heibel, Creator / Maintainer · mexicat/pdoom-video README

Why This Isn’t a Timeline, It’s a Compiler

The repository’s editing model lives in code, not in a GUI. Scene boundaries are expressed through helpers like cut() and after(), which snap transitions to musical structure rather than arbitrary timestamps. That makes the edit decision list readable, reviewable, and reproducible.

// Conceptual shape of the timeline
const scenes = [
  cut("intro", after("kick", 2)),
  cut("verse", after("snare", 8)),
  cut("chorus", after("downbeat", 16)),
]

export function timeline(t: number) {
  return scenes.find((scene) => scene.contains(t))
}
DimensionTraditional editorpdoom-video
Editing modelDrag-and-drop timelineCode-defined scene graph
DeterminismPreview can drift from exportPreview and export share the same path
Beat precisionManual alignmentBeat-aware helpers and audio timing
ExtensibilityPlugin or UI dependentScene modules are isolated TypeScript files
DebuggabilityVisual inspection in the appReadable logic plus reproducible frames
Best fitGeneral-purpose editingGenerative music videos and motion graphics

The deeper design choice is isolation. Scene modules are lazy-loaded, so the engine behaves more like a compilation pipeline than a monolithic app. One scene can fail without poisoning the whole system, which is a useful property when every chapter is effectively a small program.

The 324-Frame Secret

The article’s most surprising trick is the adaptive motion blur loop. A single output frame is not treated as a single moment. The engine samples multiple subframes around that moment, measures error, and keeps increasing density until the blur converges.

A close-up editorial illustration of one glowing moving object being sampled at multiple sub-frame positions around a center point. Faint echoes of the object converge into a single smooth blur trail, while a small sampling gauge steps upward from low to high counts.
Fast motion stays smooth because the engine keeps sampling until the frame converges.

This matters because most motion blur in generative video is either too blunt or too expensive. Here, the system decides how much time it needs to inspect. Low motion gets fewer samples. High motion gets many more. The result is cleaner motion without pretending every frame is equally simple.

How Audio Becomes Motion

The audio layer is not a vague reactive signal. It is structured data. Stem separation and lyric alignment turn the track into queryable timing information, so scenes can key off drum hits, word progress, and musical phrasing with millisecond-level control.

// Conceptual helpers from the audio and lyric layers
const hitStrength = audio.hit("kick", t)
const word = lyrics.wordProgress("doom", t)

if (hitStrength > 0.6) {
  pulse()
}

if (word > 0.8) {
  revealText()
}

That distinction is the difference between reactive visuals and compositional visuals. Reactive systems respond. Queryable systems orchestrate. The latter gives the artist much finer control over synchronization, especially when the goal is precise typography and musical timing.

Claude as Co-Architect, Not Just Co-Pilot

A hedcut-style portrait of John Heibel, the creator of pdoom-video, rendered in black ink on a white background. The likeness is based on his public GitHub avatar and should feel like a newspaper portrait rather than a stylized illustration.

The AI story here is more interesting than a simple prompt-to-video headline. According to the README, Claude helped shape the concept, lyric alignment, audio analysis, renderer, and every scene. That makes the repo a case study in AI-assisted systems design, where the model acts more like an architectural partner than an effects generator.

Why This Beats Direct-Generation Video Tools for This Use Case

The right comparison is not whether this is more magical than AI video generators. It is whether the workflow is better for a problem that demands inspection, repeatability, and beat-level control. For that job, code wins.

QuestionPremiere / After EffectsRemotionDirect AI video toolspdoom-video
Editing modelManual timeline and keyframesReact-based compositionPrompt-first generationCode-defined time compiler
DeterminismStrong, but editor-dependentStrong and inspectableOften variableStrong and frame-accurate
Beat precisionPossible, but manualGood with codeInconsistentCore design goal
Preview vs export parityCan driftUsually alignedOften uncertainExplicitly matched
ExtensibilityPlugin ecosystemVery extensibleLimited internal controlScene modules and engine code
DebuggabilityUI-basedCode and logsLowHigh
Best fitGeneral video workProgrammatic videoFast ideationGenerative music videos

That does not make pdoom-video a universal replacement. It makes it a specialist tool for a narrow but demanding category: projects where the music is fixed, the timing must be exact, and the visual language needs the consistency of software, not improvisation.

The Bigger Lesson

The real invention in pdoom-video is not one shader, one helper, or one song. It is a reproducible workflow for cinematic motion graphics, built so that timing, rendering, and compositional logic all live together in the repo. That is why the project feels less like a video and more like a compiler for motion.