irene 68c12caef9 feat(scripts): unified Python toolchain, stdlib only
Replaces the scattered TypeScript/shell helpers with one Python toolchain that
runs as plain files (`python3 scripts/tools.py <tool> ...`) with no third-party
dependencies.

New tools
- `_common.py`     shared plumbing (Report, run, ffmpeg discovery, argparse ergonomics)
- `hwprobe.py`     what this machine can actually encode (software + hardware)
- `srt2ass.py`     SRT -> ASS, the missing step between lrc2srt and baking
- `ffmpeg_tools.py` mux / bake / still / strip / probe, with hardware encode
- `bom_gen.py`     BOM generator, ported from scripts/bom-gen.ts
- `tools.py`       dispatcher so any tool is one command away
- `README.md`      usage for all of the above

Rewritten
- `lrc2srt.py` now handles multiple timestamps per line, timestamp-less cue lines
  and blank/comment lines, and survives malformed input. The legacy version
  emitted an empty cue plus a stray cue for every line.

Hardware encoding
This host is AMD (Strix Halo, VCN 4.0.5), so nvenc in the legacy notes is
reference only. `hwprobe.py` probes and reports what genuinely works here:
VA-API via /dev/dri/renderD128 gives h264_vaapi, hevc_vaapi and av1_vaapi.
`ffmpeg_tools.py --video auto` picks the hardware encoder when the render node
is usable and falls back to libx264/libx265 when it is not.

Two bugs found and fixed while wiring this up:
- the VA-API capability probe fed frames straight to the encoder without
  `format=nv12,hwupload`, so ffmpeg failed with "Function not implemented" and
  the toolchain silently fell back to software on a machine where hardware
  works. VA-API encoders only accept GPU-resident frames; the probe now uploads.
- `bake --video copy` only failed when the copied stream happened to be VA-API.
  Burning subtitles always changes pixels, so it now refuses `copy` outright
  with a clear message.

Also makes -q/-n usable on either side of the mode word, and ignores
__pycache__ in .gitignore.
2026-09-10 17:47:02 +09:00
2026-09-09 17:38:21 +09:00

Video-related files for NCMR songs

This repo houses the code-like files for NCMR music videos. Binary assets live elsewhere.

Structure

master branch — shared template

This branch holds the common scaffolding:

  • Remotion project — entry point, root component, and a placeholder composition
  • ffmpeg.sh — helper for baking ASS subtitles or bypassing with static image + audio
  • src/lrc2srt.ts — legacy LRC → SRT subtitle converter
  • Build config — TypeScript, ESLint, Prettier, Remotion studio

Song branches

For each song, create a branch <song-name>/master (and optionally feature branches like <song-name>/synced-lyrics-remotion):

git checkout -b <song-name>/master

Copy the shared template into the song branch, then add song-specific files:

mkdir -p <song-name>
# Place your song-specific compositions, assets manifests, etc.

The master branch remains protected and mostly immutable. Song branches are independent.

Guideline

Git-ignored (not tracked here)

  • Binary input assets (audio, images, fonts, material video clips)
  • Video output (out/, rendered files)

For untracked input assets, a bill of materials listing everything and explaining what each file is will be mandatory. Keep it as BOM.md alongside your song assets.

Branching

  • master — minimal template, protected
  • <song>/master — song-specific work
  • <song>/<feature> — parallel features for a song

This repo's branching rules supersede any generic git operation conventions.

S
Description
music video related repo. not part of auto-wiki.
Readme 281 KiB
Languages
Python 98.6%
TypeScript 1.3%