mv-maker

Verified@kingdomrushdev/mv-maker
Installation
npx -y @neta-art/neta-search-cli@latest skills add @kingdomrushdev/mv-maker
Use in Neta Studio Open it in Neta Studio and see what people made with it.
Summary

Turn your song and character art into a finished anime-style music video with designed lyrics, no video AI needed.

  • Give it a song with timed lyrics and your character images. You get a full music video with the original song as the only soundtrack.
  • Default look blends a moody starry-night style with a bright pop style: colour blocks, chibi stickers and bouncing lyrics in the choruses.
  • Cuts land on the beat, with glowing particles, light leaks, speed lines and pulses. Flashes are kept within photosensitivity limits and checked at the end.
  • Your own character images are used first, so your characters stay recognisable. A few new illustrations are made within a budget you set.
  • Works for music videos, lyric videos, anime-style openings and birthday or anniversary videos. You also get the storyboard and a quality report.
SKILL.md
# mv-maker — storyboard, illustrate, edit and render the MV

One project directory, one `project.json`; every script is re-runnable. The only paid calls are illustrations
(budget-gated); editing and rendering are local and free: **Blender 4.2 LTS (VSE)**, **ffmpeg**, **libass**, **numpy**.
The song is an input — this skill never generates music.

> **Language:** reply in the language the user wrote the request in — not the language of the song, of this
> skill or of any notes around the request. Rule 0 below has the details.
>
> **Work one step at a time:** run one line of the quick path, read only the reference that step names, check
> the output, then go on. Do not read every reference first or write several files in one message.
>
> **Use the scripts, not raw `cohub generate` / ffmpeg slideshows.** They give the budget gate, the beat grid,
> lyric typography, the Blender edit and QC; a hand-made slideshow skips all of that and is not an MV.

## Inputs

| Input | Required | Counts as given when |
|---|---|---|
| The song | yes | a song package (song.json) or an audio file is attached or named; timed lyrics as LRC/SRT if it has vocals |
| Who appears | no | images are attached (they are the top reference), or a known character is named (make a character sheet first) |
| Budget for illustrations | yes, to generate images | a dollar amount or an explicit go-ahead; 0 = user images and procedural graphics only |
| Size, style, render workers | no | stated; otherwise 1920x1080, the default style, 3 workers (1 on a shared machine) - say what you chose |

If a required item is missing, ask once - every missing item in one message - before building anything, then stop.
When all required items are given, build to delivery without asking; never ask again for something already given.

## Quick path (copy, replace `DIR` and `<...>`)

```bash
S=<this skill>/scripts; T=<this skill>/templates
python3 $S/doctor.py        # first: checks ffmpeg/libass, fonts, Blender (in ~/tools, NOT on PATH - that is fine), cohub
# 0 import: a song package ...
python3 $S/mv_init.py DIR --song-package <PKG> --image <user1.png> --image <user2.png> --budget 2 --ui-lang <zh|en|ja>
#   ... or any song + timed lyrics (tempo/downbeat are estimated; librosa optional)
python3 $S/mv_init.py DIR --song <x.mp3> --lyrics <x.lrc> --analyze --image <user1.png> --budget 2 --ui-lang <zh|en|ja>
#   draft / 540p only: add --size 960x540 (fonts, renders and QC follow the project size)
python3 $S/mv_map.py DIR                                   # 1 bars, sections, lyric lines (picture time)
cp $T/storyboard.md DIR/plan/storyboard.md                 # 2 concept, motifs, one row per shot (references/storyboard.md)
python3 $S/mv_jobs.py DIR image kf01 --prompt-file DIR/prompts/kf01.txt --image-size 1K   # 3 one job per illustration (+ a 3x3 grid)
python3 $S/mv_jobs.py DIR plan && python3 $S/mv_jobs.py DIR submit --yes && python3 $S/mv_jobs.py DIR poll --wait 600
cp $T/build_motion.py DIR/plan/ && (cd DIR && python3 plan/build_motion.py)   # 4 one S(...) per storyboard row
python3 $S/mv_motion.py DIR check                          #   until "OK" (schema, continuity, cuts on the grid, flashes)
bash $S/install_blender.sh                                 # 5 once per sandbox (portable Blender 4.2 LTS)
python3 $S/mv_motion.py DIR build && python3 $S/mv_motion.py DIR render --workers 1   # 3 if the machine is free; long: run detached
python3 $S/mv_lyrics.py DIR text add --start 1.2 --end 7.6 --style Title "<song title>"   # 6 titles / credits (text list / rm N)
python3 $S/mv_lyrics.py DIR check && python3 $S/mv_lyrics.py DIR ass
python3 $S/mv_motion.py DIR final --subs --fade-out 1.5    # 7 -> DIR/out/mv_final.mp4
python3 $S/mv_qc.py DIR                                    # 8 out/qc_report.md + out/contact_sheet.jpg: ERROR 0
```

`build` makes all graphics first (1–12 min, longer on a busy machine); `poll` already puts take 1 of every
illustration in place (`keyframes/ID.png`) - `select ID K` is only for switching to another take.
Render time in this sandbox (busier machine = slower): 960x540, 1 worker ≈ 2 s per second of picture; 1280x720,
1 worker ≈ 8–25 s per second (a 100 s MV ≈ 15–40 min); 1920x1080, 3 workers ≈ 10 s per second. Start the render
detached and keep working on titles meanwhile. Look at `examples/wanxiang/` (44-shot storyboard + `build_motion.py`) before writing your own. Re-render
single shots with `mv_motion.py DIR patch S27`. Details: `references/workflow.md`.

**Pacing**: about one shot per 3 s — nocturne shots 2–4 bars, pop (chorus) shots 1–2 bars, cuts on `bar(n)`.
**Illustrations**: 6–10 at `--image-size 1K` (≈ $0.07 each) + one 3×3 variant grid for stickers; crop and push
each illustration into several shots. User images may also be used directly as layers.
**No user images** (a known character, or one described in words): make ONE character sheet first and use it as
the reference for everything else, or the character changes from picture to picture:
`mv_jobs.py DIR image charsheet --refs "" --aspect 3:4 --prompt-file …` (full body, front view, plain background,
the design in words) → `submit --only charsheet --yes` → `poll --wait 300` → look at it → register every other
illustration with `--refs ref:charsheet` and submit them.

## When a check fails

| Message | Fix |
|---|---|
| `mv_motion check`: `S07: layer 2: ...` | The message names the shot, layer and field; fix it in `plan/build_motion.py`, re-run it, check again |
| `img file not found` | Paths are relative to DIR: `keyframes/kf01.png`, `refs/user_01.png`; illustrations exist only after `poll` |
| `hard cut ... off the beat grid` | Build times with `bar(n)` from the template (it reads BPM and downbeat from project.json) |
| `pacing: N shots for X s` | Split long shots: crop/push the same illustration, add pop shots in choruses |
| `more than 3 flashes within 1s` / `flash peak` | Flash only on section downbeats, peak ≤ 0.7 |
| `over budget` | Fewer illustrations or `--image-size 1K`; ask the user before raising `budget_usd` |
| `FAILED ... 503` / timeout (not moderation) | Run `mv_jobs.py DIR submit --yes` again: failed jobs are resubmitted; `--retake` is only for an extra take of a finished job, or after a moderation rejection with the user's consent |
| `came back 1024x1024, not 16:9` | That model ignores the aspect: frame the picture with `crop` in build_motion.py |
| `Blender not found` | `bash $S/install_blender.sh` (after every sandbox reset) |
| title/credit `displayed for only` | Title ≥ 6 s, credit ≥ 4 s; in a short song put them over the intro |
| beat grid looks wrong in `mv_map` | Lyric lines should start near bar lines: `mv_map.py DIR --bpm N --downbeat S [--sections ...]` |

## Default style

Unless the user asks otherwise, use the Touhou doujin fusion in `references/style-presets.md`:
- **Nocturne (Yuuhei Satellite grammar)** for intro, verses, bridge, outro — one detailed illustration pushed and
  cropped into many shots, indigo night, nebula, particles, light leaks, dissolves, vertical serif lyrics.
- **Pop (Shinra-Bansho grammar)** for choruses — saturated colour-block backgrounds, chibi stickers slamming in on
  the beat, halftone and speed lines, bold yellow-on-black lyrics popping in.
- **Fusion** in the final chorus (pop graphics over the nebula).
Write the grammar into prompts, never the circles' names or song titles.

## Deliver

1. `python3 $S/mv_motion.py DIR final --subs --fade-out 1.5` -> `DIR/out/mv_final.mp4`; `python3 $S/mv_qc.py DIR` must
   end with ERROR 0 and photosensitivity E 0 (`DIR/out/qc_report.md`, `DIR/out/contact_sheet.jpg`).
2. Report in the user's language: size, fps, length, QC result, cost (`mv_jobs.py DIR status`), what was not verified
   (nobody listened; beat grid confirmed only from the lyrics).
3. Hand over with an interaction-components file card (required - the run is not delivered until it is done):
   `out/mv_final.mp4` plus `edit/mv_motion.blend`, `out/subs.ass`, the storyboard and the QC report;
   paths from the output of `final` and `mv_qc.py`; without that skill, give the file paths.

## Out of scope

- Changing world or space settings or config (visibility, members, slugs), WORLD.md or the world's visual style.
- Deleting or overwriting files that existed before the run, other skills' folders, or anything outside the project
  directory; publishing apps or permanent public links unless the user asks.
- Generating or changing the music (the song is an input); video-generation models.
- Paid calls beyond `budget_usd`; resubmitting after a moderation rejection without the user's consent; text drawn
  by image models.

## Rules

0. **Language: the user's language in every message, above all the final handover; translate script output.** Reply in the language the user writes in; titles and credits use it too
   (`mv_init.py --ui-lang`). Lyrics stay in the song's language (`language` from the package, or `--lang`); fonts
   follow it automatically (Noto CJK SC/TC/JP/KR; Latin-script lyrics are set horizontally). Keep the song's own
   title as given (translate only on request); captions you write use the user's language. Commands, file names,
   JSON keys and image prompts stay English.
1. **User-uploaded images are the top-priority reference** for character identity; they are attached first to every
   illustration request. Generated images only add scenes and variants.
2. **Storyboard first**: a concept, numbered motifs that return changed at start/middle/end, an intent for every
   shot; never illustrate the lyrics line by line; avoid stock shots unless the concept needs them.
3. **No text from image models.** Lyrics, titles and credits are typeset in ASS.
4. **The original song is the only soundtrack**; cuts sit on the bar/beat grid (`mv_motion.py check`).
5. **Money**: set `budget_usd`; check `mv_jobs.py plan`; never resubmit after a moderation rejection without consent.
6. **Photosensitivity**: full white flashes only on section downbeats, peak ≤ 0.7; any flashes (also small coloured
   on-beat accents) ≤ 3 per second; QC must pass.
7. **Rendering**: one `mv_motion.py` build/render at a time per project (a lock enforces it); ≤ 3 Blender workers
   in total on the machine (use `--workers 1` when it is shared; the lock is released when a command ends, so
   "another mv_motion.py command is running" means one still is); run long renders detached
   (`cd DIR && setsid nohup python3 $S/mv_motion.py . render --workers 1 > edit/render.log 2>&1 &`) and poll with
   `python3 $S/mv_motion.py DIR status` (frames done, ETA; other projects' renders do not count - `pgrep` sees them
   all). Blender is found in `~/tools` even when not on PATH; re-run `install_blender.sh` after a
   sandbox reset. Fade the end once: `final --fade-out` (use `out: black` only inside the film).
8. **Unattended runs**: when nobody can confirm the beat grid, verify it yourself — lyric lines should start on or
   just before bar lines in `mv_map.py` — and say in the report that it was not confirmed by listening.

## Files

| Path | Purpose |
|---|---|
| `scripts/doctor.py` | Environment check with exact fixes (run first) |
| `scripts/mv_init.py`, `mv_refs.py` | Create a project (song package or song + lyrics); register user images |
| `scripts/mv_map.py` | Bar/beat grid in picture time with sections and lyrics |
| `scripts/audio_map.py` | BPM, downbeat, sections for songs without a package (needs librosa) |
| `scripts/beat_grid.py` | BPM + first downbeat with numpy only (automatic fallback; lyric lines pick the bar phase) |
| `scripts/mv_jobs.py` | Illustration jobs: `image`, `plan`, `submit`, `poll`, `select`, `status` |
| `scripts/mv_motion.py`, `scripts/motion/` | `check`, `build`, `preview`, `render`, `patch`, `final`; motion.json validation (schema), procedural assets (mgfx) and the Blender VSE builder (vse_build) |
| `scripts/mv_lyrics.py` | Lyric timeline `import` / `shift`; titles/credits `text add`; ASS typography `ass`; on-screen text `check` |
| `scripts/mv_qc.py`, `flash_check.py` | Final QC and photosensitivity scan |
| `scripts/install_blender.sh` | Portable Blender LTS into `~/tools` |
| `references/workflow.md` | Every stage in detail, with commands |
| `references/storyboard.md` | Concept, motifs, one row per shot, cutting on the beat, photosensitivity |
| `references/style-presets.md` | The default nocturne / pop fusion style and alternatives |
| `references/motion-spec.md` | `motion.json` layers, fields and the Blender build |
| `references/song-package.md` | The song package format read by `mv_init.py --song-package` |
| `references/project-json.md` | Every field of `project.json` |
| `references/cost-safety.md` | Prices, the budget gate, moderation rejections, what attaching files means |
| `references/sources.md` | Where the methods and facts come from |
| `templates/` | `storyboard.md`, `build_motion.py`, `project.example.json` |
| `examples/wanxiang/` | A finished MV's storyboard (44 shots), motion generator, `motion.json`, and its song package metadata |
| `tests/run_tests.py` | Offline regression (illustration calls stubbed; renders a tiny MV when Blender is installed) |

## Requirements

Python 3.10+, ffmpeg with libass, numpy, a CJK font (Noto CJK) for Chinese/Japanese lyrics, the `cohub` CLI for
illustrations, Blender 4.2 LTS (installed by the script). Optional: librosa + soundfile (section guesses with
`--analyze`; without them tempo and downbeat are still estimated). PEP 668 systems: `python3 -m venv ~/.venvs/audio &&
PIP_USER=0 ~/.venvs/audio/bin/pip install librosa soundfile`, then `export MV_PYTHON=~/.venvs/audio/bin/python`.