pdoom-video README

The project's README from github.com/mexicat/pdoom-video. As one markdown file: README.md.

I'm Upping My P(doom) — music video

A generative, code-rendered music video with word-synced karaoke typography. 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.

Watch it in 4K on YouTube: https://www.youtube.com/watch?v=5EoO5413dBY

The YouTube upload is an earlier render: it averages only 4 sub-frames per frame for motion blur, so fast motion shows stepped copies, and YouTube's compression smears the film grain. For the best version, render it locally (see Render the video): the current code picks up to 324 sub-frames per frame where the motion needs them.

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.

The song is not ours: see Credits for who wrote and made it.

The concept, style bible and plate-by-plate treatment are in docs/TREATMENT.md. The engine and scene API are documented in docs/ENGINE.md.

Layout

Requirements

bun, Google Chrome (the offline renderer drives it headless through playwright-core) and ffmpeg with libx264. The analysis tools need uv; the renderer doesn't.

Preview

cd app
bun install
bunx vite

Open http://localhost:5173 and use the keys below. ?t=23 starts at a given time.

Key Action
space play / pause
← / → seek ±1 s (±5 s with shift)
, / . step one frame
[ / ] previous / next scene
l loop the current scene
h hide the UI

The preview renders in real time on a recent Mac. The export is not real time and is heavier.

Render the video

cd app
bun scripts/render.ts video --samples auto --shutter 0.2 --out ../out/pdoom.mp4

4K

cd app
bun scripts/render.ts video --scale 2 --samples auto --shutter 0.2 --x264 aq-mode=3:rc-lookahead=30 --out ../out/pdoom-4k.mp4

Regenerate the timing data

The committed data/*.json files are all the renderer needs. Regenerating them needs the stems and intermediates, which are not in the repo:

cd analysis
uv run python align.py      # data/lyrics.json
uv run python analyze.py    # data/audio.json

The models download about 4 GB of weights into analysis/.cache/; delete that folder afterwards.

Credits

License

The code is released under the MIT License. The fonts in app/public/fonts/ keep their own licenses (see Credits), and the song and lyrics (audio/, lyrics/, data/lyrics.json) are not covered by it: they belong to their authors (see Credits).

pdoom-video (mexicat/pdoom-video)

Searching Database…

What is this?A generative, code-rendered music video for the song 'I'm Upping My P(doom)' with word-synced karaoke-style typography, where every frame is a deterministic function of song time.
Is this a finished video file or a renderer?It's a TypeScript + three.js renderer app, not a pre-rendered video file: the same code drives both the live browser preview and the offline 1080p60 or 4K60 export, so they look identical.
How do I preview or render the video myself?Run the bun + Vite app to get a real-time interactive browser preview, then use scripts/render.ts to export offline — it drives headless Chrome over WebSocket into ffmpeg.
What do I need installed first?You need bun, Google Chrome (driven headless via playwright-core) and ffmpeg with libx264; regenerating the lyric/audio timing data additionally needs uv for the Python analysis tools.
Does the export run in real time like the preview?No — the live preview runs in real time on a recent Mac, but the offline export is much heavier: rendering the whole song in 4K took about 2.5 hours on an M5 Pro.
What exactly does the MIT license cover here?Only the renderer code is MIT-licensed; the bundled fonts keep their own licenses, and the song and lyrics belong to their original authors and are excluded from the MIT grant.
How GPU-intensive is a 4K render?Very — it's GPU-bound, with per-frame cost ranging from about 40ms for a still frame to over 10 seconds for ray-marched rooms at high sub-frame counts, and each render pipeline uses roughly 5GB for headless Chrome plus 4GB for ffmpeg.
What determines how much motion-blur sampling a frame gets?The renderer's --samples auto mode adaptively picks between 12 and 324 sub-frames per frame depending on how fast things are moving, stopping once more samples wouldn't change the image beyond a set tolerance.
How was the word-level lyric timing created?Python tools run via uv use Demucs for stem separation, CTC forced alignment cross-checked with Whisper, and beat/onset analysis to produce the committed data/lyrics.json and data/audio.json timing files.
Why does the YouTube upload look different from a local 4K render?The YouTube version only averages 4 sub-frames per frame for motion blur and gets recompressed, so fast motion looks stepped and the film grain is smeared, while a local render can use up to 324 sub-frames and keeps full detail.
What role did Claude play in making the video?Claude (Opus 5.5) in Claude Code was used in conversation with the author to work out the concept, lyric alignment, renderer code, every scene, and the final renders.
Creator
mexicat
Size
15.9 MB
Stars
2.9K
Updated
CommitOct 05
Age
23d
Commits · 90 Days