Video Craftsmanship Handover Package
One-liner: Making a video = measure music first, write script second, draw scenes third, verify with numbers last; Reading a video = extract frames first, OCR second, align timelines third. Both paths share one toolchain (ffmpeg + Python + Remotion + vlkit).
0 Thirty-Second Route Selection
| What you want to do | Read first | Main output |
|---|---|---|
| Create a video from scratch | references/01-making-videos.md | Script, beat sheet, Remotion project, final mp4 |
| Deconstruct someone else's video (lyrics, subtitles, rhythm, comments) | references/02-reading-videos.md | Timeline JSON, comment report, reference frames |
| Draw scenes / write Remotion components | references/03-scenes-and-engineering.md | Components, shots, effects |
| Call external models (Claude / GPT / image gen) | references/04-external-models.md | Generated code / concept art |
| Video is almost done, needs verification | references/05-verification.md | Six numbers + frame extraction conclusion |
| Need sound effects / image assets (including licenses) | references/08-sound-and-assets.md | Selection, download, license list |
| Use default BGM / check verified BPM | references/09-track-parameters.md | Ready-to-copy BPM, first beat, frames/beat |
| Make a long video (>40 shots / >3 minutes) | references/10-long-videos-and-multi-shots.md | Manifest, shot allocation, empty frame check |
| Do sound design / mixing / fix clipping | references/11-sound-design-and-mixing.md | Per-shot sound effects table, limiter |
| Deliver: transcode, package, anonymize | references/12-delivery-and-packaging.md | Distribution mp4, source code package |
| Find reusable premade parts | references/06-example-index.md | Locations of six projects |
| Stuck on a problem again | references/07-bug-list.md | 30 tested entries |
1 Nine Golden Rules (Order Cannot Be Changed)
- Choose music first: Measure BPM / first beat / frames per beat, write them as code constants. Changing the track requires re-measuring; for music with dense attack transients, use check_tempo with low-frequency verification (see
01§1.1), otherwise the end will be off by a few seconds. - Write the script second: First define the time structure (flashback / three-act / chapter), then sentences. The script is the single source of truth.
- Write the beat sheet third: Each segment gets 'time / frame / visual / action / note / subtitle'; frame numbers must be calculated, never estimated.
- One motion, one meaning: Each shot conveys only one thing; after key information lands, it must hold (brand logo ≥ 1 second).
- Things in the frame must move on their own, not rely on an overlaid floating light leak. Using global brightness/light leaks to inflate 'motion density' is cheating—verification will expose it, and the audience will notice.
- Render probes first, then full render: Use
--frames=A-Bfor tens of seconds, verify, then render the whole film. - Verification relies only on numbers and frame extraction: Duration/frame count, motion density, audio per window, frame extraction with recognition. Visual models can detect layout defects, do not use them to paraphrase text.
- For long videos, write time in one place only: The shot table (manifest) is the single source of truth; subtitles, narration, sound effects all derive from it; changing duration requires a full rebuild from the start, otherwise black frames appear every few shots.
- Narrative films arrange shots by story time, don't be led by lyric blocks; default to fixed shots (push-in ≤ 4%); for energy, rely on actions inside the frame, not camera movement.
2 Making Videos: Seven Steps and Outputs
| Step | Action | Output | Tool |
|---|---|---|---|
| 1 | Measure music | BPM, first beat, frames per beat, per-2s level | templates/verification-scripts/analyze_music.py |
| 2 | Write script | Structure + per-segment task + visual motif | templates/script-template.md |
| 3 | Write beat sheet | A table of time/frame/visual/subtitle/sound effects; for long videos, write as manifest.json (single source of truth) | templates/beat-sheet-template.md |
| 4 | Set up project | Remotion 4 + React 19 + TS | Skeleton from references/03-scenes-and-engineering.md |
| 5 | Draw scenes | One component per segment; data comes from the table | Same as above |
| 6 | Integrate audio | BGM + sound effects (+ narration, if any) | ffmpeg / composition script |
| 7 | Verify | Six numbers + frame extraction | templates/verification-scripts/verify_film.py |
Layout Rule: Subtitles/lyrics occupy y 118–260; all scene main text goes at y ≥ 300; place a radial dark background beneath lyrics to ensure readability over any frame.
3 Reading Videos: Five Tools
- Basic info: Use
ffprobeto get resolution/framerate/duration/audio tracks. - Frame extraction: Use
ffmpeg -vf fps=2to extract frames; first tryfps=1/5for a quick overview to find the structure. - Frame-by-frame OCR: Use vlkit
askto batch read images (only ask 'read out all text character by character'), merge 0.5s-granularity text into a timeline; merge repeated lines by musical phrase. - Music: Onset envelope + autocorrelation to find BPM, sweep phase to find the first beat.
- Public opinion/background: Bilibili comments (use
bili_full.pywith logged-in state for full data), news search, license verification.
4 Environment (Already Installed Locally, Do Not Reinstall)
| Item | Path / Version | Purpose |
|---|---|---|
| ffmpeg / ffprobe | PATH, v9 | Frame extraction, audio mixing, verification |
| Node / npm | 24.x / 11.x | Remotion |
| Remotion | 4.0.484 (within project) | Rendering |
| Chrome headless shell | Downloaded automatically on first render, cached inside project at node_modules/.remotion/chrome-headless-shell | Rendering browser |
| vlkit (image recognition/OCR/ASR) | ~/.dsh/tools/vlkit/cli.py | View images, read text, transcribe |
| Bilibili tools | ~/.dsh/tools/find-bgm/ | Fetch video info, comments |
| Model proxy | https://la-api.vxvxvx.top/v1 | Code generation, image gen |
5 Six Verification Numbers
| Item | Criterion | How to Measure |
|---|---|---|
| Specs | Frame count = duration × fps, audio track present | ffprobe -count_frames |
| Motion density | P10 ≥ 0.30, peak ≥ 3, peak ÷ valley ≥ 5 | verify_film.py (MAD per 1/6s window) |
| Static window | Percentage of frozen frames; if > 40%, question why | Same as above |
| Subtitle sync | Sample 3 time points, OCR matches expectations | Frame extraction + vlkit |
| Color/style | Variables or gradients follow design (e.g., red to blue) | Sample pixels |
| Layout defect | No overlaps / out-of-bounds | Frame extraction + visual model (layout only) |
| Empty frame (mandatory for long videos) | Per shot at 15/50/85%: brightness ≥ 9, contrast ≥ 6 | templates/verification-scripts/blank_shots.py |
6 Division of Labor with Existing Skills
code-rendered-video: Deprecated to pointer (original content merged into this package); all video creation follows this skill; when rules conflict, this package takes precedence.video-shotcraft: 124 lens composition cards + Ink Press template + workbench (use when you need ready-made lens language).aliyun-vl: Specific commands and pitfalls for image recognition/OCR/ASR.bilibili-comments: Three methods for scraping comments and rate limiting.find-video-bgm: Identify BGM, extract audio.visual-verification-discipline: Discipline for layered verification.
7 Remember in One Sentence
Music determines the skeleton, script determines cause and effect, anything on screen that doesn't actually move doesn't count, verification only trusts numbers and frame extraction.