diff --git a/README.md b/README.md index 27cb2f2..14944d6 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,21 @@ This repo houses the code-like files for NCMR music videos. Binary assets live e 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 +- **`scripts/`** — Python toolchain (stdlib only) for subtitles, ffmpeg and asset manifests - **Build config** — TypeScript, ESLint, Prettier, Remotion studio +### `src/` vs `scripts/` + +Two directories, two jobs: + +- **`src/`** — Remotion input only. Everything here is compiled by `tsc`/Remotion + and linted by `npm run lint`. +- **`scripts/`** — operator tooling. Python, standard library only, run directly + (`python3 scripts/tools.py --help`). Nothing here is part of the Remotion build. + +Keep the boundary sharp: anything the video build compiles belongs in `src/`, and +anything you run by hand belongs in `scripts/`. + ### Song branches For each song, create a branch `/master` (and optionally feature branches diff --git a/REMOTION-QUICKSTART.md b/REMOTION-QUICKSTART.md index ddfa4b1..d4ef7d9 100644 --- a/REMOTION-QUICKSTART.md +++ b/REMOTION-QUICKSTART.md @@ -42,17 +42,25 @@ The Studio auto-reloads on file changes. No manual refresh needed. ``` . -├── src/ +├── src/ # Remotion input — compiled by tsc/Remotion │ ├── index.ts # Entry point — calls registerRoot() │ ├── Root.tsx # React root component -│ ├── Composition.tsx # Composition definitions (placeholder) -│ └── lrc2srt.ts # LRC → SRT subtitle converter +│ └── Composition.tsx # Composition definitions (placeholder) +├── scripts/ # Operator tooling — Python, stdlib only +│ ├── tools.py # Dispatcher: python3 scripts/tools.py --help +│ ├── ffmpeg_tools.py # mux / bake / still / strip / probe +│ ├── lrc2srt.py # LRC → SRT +│ ├── srt2ass.py # SRT → ASS (the step before baking) +│ ├── bom_gen.py # Bill of materials for untracked assets +│ └── hwprobe.py # What this machine can actually encode ├── package.json # Remotion + React + Tailwind deps ├── remotion.config.ts # CLI config (rspack, jpeg output format) -├── tsconfig.json # TypeScript (strict, ES2018) -└── ffmpeg.sh # Helper for ASS subtitle baking +└── tsconfig.json # TypeScript (strict, ES2018) ``` +`src/` and `scripts/` do not mix: the former is what the video build compiles, the +latter is what you run by hand. + ## Compositions Compositions are defined in `src/Composition.tsx`. Each has: diff --git a/ffmpeg.sh b/ffmpeg.sh deleted file mode 100644 index 9bbd8d9..0000000 --- a/ffmpeg.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash -# ffmpeg helper — bake ASS subtitles into video, or bypass with static image + audio -# -# Usage: -# ffmpeg.sh bake