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…

Что это такое?Генеративный, отрисовываемый кодом клип на песню 'I'm Upping My P(doom)' с синхронизированной по словам типографикой в стиле караоке, где каждый кадр — детерминированная функция времени песни.
Это готовый видеофайл или рендерер?Это приложение-рендерер на TypeScript + three.js, а не заранее отрендеренный видеофайл: один и тот же код управляет и живым предпросмотром в браузере, и офлайн-экспортом в 1080p60 или 4K60, поэтому они выглядят одинаково.
Как самому посмотреть предпросмотр или отрендерить видео?Запустите приложение на bun + Vite, чтобы получить интерактивный предпросмотр в браузере в реальном времени, затем используйте scripts/render.ts для офлайн-экспорта — он управляет headless Chrome по WebSocket и передаёт результат в ffmpeg.
Что нужно установить заранее?Нужны bun, Google Chrome (управляется в headless-режиме через playwright-core) и ffmpeg с libx264; для повторной генерации таймингов текста и аудио дополнительно нужен uv для Python-инструментов анализа.
Экспорт идёт в реальном времени, как предпросмотр?Нет — живой предпросмотр идёт в реальном времени на современном Mac, но офлайн-экспорт намного тяжелее: рендеринг всей песни в 4K занял около 2,5 часов на M5 Pro.
Что именно покрывает здесь лицензия MIT?Под MIT лицензирован только код рендерера; включённые шрифты сохраняют свои лицензии, а песня и текст принадлежат своим авторам и исключены из объёма лицензии MIT.
Насколько 4K-рендер нагружает GPU?Очень — всё упирается в GPU: стоимость кадра колеблется от примерно 40 мс для статичного кадра до более 10 секунд для комнат с ray marching при большом числе субкадров, а каждый процесс рендеринга использует около 5 ГБ на headless Chrome плюс 4 ГБ на ffmpeg.
Что определяет, сколько сэмплов motion blur получит кадр?Автоматический режим --samples рендерера адаптивно выбирает от 12 до 324 субкадров на кадр в зависимости от скорости движения, останавливаясь, когда дополнительные сэмплы уже не меняют картинку за пределами заданного допуска.
Как был создан тайминг текста на уровне слов?Python-инструменты, запускаемые через uv, используют Demucs для разделения стемов, CTC forced alignment, перепроверенную с помощью Whisper, и анализ битов и атак (beat/onset), чтобы создать закоммиченные файлы таймингов data/lyrics.json и data/audio.json.
Почему версия на YouTube выглядит иначе, чем локальный 4K-рендер?Версия на YouTube усредняет лишь 4 субкадра на кадр для motion blur и проходит перекодирование, поэтому быстрое движение выглядит ступенчато, а зерно плёнки размазано; локальный рендер может использовать до 324 субкадров и сохраняет полную детализацию.
Какую роль сыграл Claude в создании видео?Claude (Opus 5.5) в Claude Code использовался в диалоге с автором, чтобы проработать концепцию, выравнивание текста, код рендерера, каждую сцену и финальные рендеры.
Creator
mexicat
Size
15.9 MB
Stars
2.9K
Updated
CommitOct 05
Age
24d
Commits · 90 Days