MV (Create → Review → Fix → OK)
Prerequisites
- The master audio is a finalized
<Title>.wav(mastering step completed first). Do not useaudio.wav. - First read
templates/mv/README.md(how to create the project, role of each script, how to fix). - Do not write custom commands for tasks that already exist. Use the template scripts.
- Credit text comes from
workflow.config.json'scredits. Do not copy it into the video side.
Choose a Visual Style (Optional)
- Only do this if the user says "I want to choose the MV style", "I want it more elaborate", or "I want a different style". If nothing is said, skip this and proceed to steps 0 & 1 (
make_mv.sh= the default style). Do not proactively suggest this every time. - Use the skill
mv-stylesto write the selection table and 18 axes intosongs/<song folder>/STYLE-SELECTION.md, and let the user choose which style to adopt. - If the chosen style is the default (spectrum-still), go to steps 0 & 1. Otherwise, follow the instructions in
styles/<chosen style>/README.mdto create the MV, then merge into step 2.
0. Background Loop Video (Optional)
Determined by node engine/config.js providers.video's use field. If bg_loop.mp4 already exists in the song folder, skip to step 1.
none: Skip (background is the static cover image).kling-mcp: Create it with the following steps:- Generation costs money. Before starting, ask the user "May I create one ~5 second loop video from cover.png?" and get approval before proceeding.
- Verify the Kling MCP connection and account using that MCP's check tool. If not connected, stop and inform the user.
- Use the image-to-video tool, passing
songs/<song folder>/cover.pngas both the start and end image (aligning start and end makes the seam invisible). Write the prompt in English, describing only small movements (hair, light, particles)—no large motion. Audio off. - Only submit one generation at a time. Do not auto-retry on failure or timeout. Report the result and let the user decide whether to retry or change the prompt.
- Save the resulting video as
songs/<song folder>/bg_loop.mp4, then extract the first and last frames and view them with Read:ffmpeg -y -i "songs/<song folder>/bg_loop.mp4" -frames:v 1 /tmp/loop_first.jpg ffmpeg -y -sseof -0.1 -i "songs/<song folder>/bg_loop.mp4" -frames:v 1 /tmp/loop_last.jpg - If a watermark is present, inform the user to check Kling's terms of service to see if it can be used as-is or removed. Do not modify it without confirming the terms.
other: Create it according to thenoteinstructions, and place it atsongs/<song folder>/bg_loop.mp4. If it costs money, ask the user before creating. If the steps are unclear, ask the user.- If creating a separate vertical version, name it
bg_loop_vertical.mp4(if missing, the horizontal version is center-cropped). For placement details, see "Background Loop Video" intemplates/mv/README.md.
1. Create (Once)
./tools/make_mv.sh "songs/<song folder>"
- This script runs in one pass: lyric timing extraction → tempo measurement → image/loop video preparation → lyric synchronization → rendering → inspection. The project for the song is created under
projects/<slug>/, and is recorded insong.json'smv_projectentry. - If whisper cannot align a line (e.g., ad-libs), inform the user about that line, get their approval, then re-run with
--allow-unaligned(which estimates timing from neighboring lines). - If the tempo estimation is off by a factor of 2 (double/half), constrain the range with
--bpm <min> <max>(the actual measured BPM is written by make_mv.sh toprofile/ledger.md). - Lyric timing extraction (whisper) and rendering may take tens of minutes. Run long processes in the background and wait for them to finish.
- Do not trust the exit code; verify the outputs:
ls -la "songs/<song folder>/<Title>.mp4" "songs/<song folder>/<Title> (Short).mp4" "songs/<song folder>/thumbnail.jpg" ffprobe -v error -show_entries format=duration -of csv=p=0 "songs/<song folder>/<Title>.mp4" - If the script stops mid-way, read the last error in the output, identify which stage (lyric timing, tempo, image, rendering, inspection) failed, and then fix it.
2. User Review (Human Step)
- If
providers.notifyisslack, make_mv.sh also sends the video to Slack. - Ask the user with the following message and then stop:
The MV is ready. - Main: songs/<song folder>/<Title>.mp4 - Short: songs/<song folder>/<Title> (Short).mp4 - Thumbnail: songs/<song folder>/thumbnail.jpg Please watch it and tell me if it's OK or what you'd like to fix. Examples: - Lyric timing is off (at around X minutes X seconds) - Font is too large/too small/hard to read - Want to change colors, background, or character visibility - Only the first time you ask for review on this song, add the following extra line at the end of the above message (do not add it for subsequent reviews or for other songs):
You can freely modify this from here. Pick from 18 axes (how lyrics appear, character movement, background, camera, beat hits) and a direction library (direction-library/), and I'll rewrite the template and recreate the MV. If you're happy as is, just say OK. - If the user says nothing beyond OK, proceed to steps 3 & 4 as before. Do not re-suggest.
3. Fix
When the user tells you what to fix, propose 2–3 options for how to fix it, let them choose, then apply the fix. The fix location depends on scope: "only this song" or "from the next song onward too". If not specified, ask:
| Scope | Fix Location |
|---|---|
| This song only | projects/<slug>/ (input/song.config.ts, src/) and the song folder (LYRICS.md, scenes.json, etc.) |
| From next song onward (default style) | Also fix templates/mv/. Does not affect already-created song projects = also apply to this song |
| From next song onward (style) | Fix styles/<name>/ (skill mv-styles "Add or modify a style") |
| Save as a new visual style | Add to styles/ using skill mv-styles "Add or modify a style" |
| Config values (text, names, volume, etc.) | workflow.config.json (skill setup config change) |
Common fixes and how to apply them:
| Issue | Fix |
|---|---|
| Lyric timing is off | Change line breaks in LYRICS.md's "Lyrics (for display)" and re-run make_mv.sh (lyrics.json is overwritten each time) |
| Font too large/small/overflows | ① Split long "Lyrics (for display)" lines into two (font size is determined by line length) ② Change font size settings in projects/<slug>/input/song.config.ts |
| Hard to read | ① Increase text outline/shadow ② Darken the background (both in song.config.ts or style) |
| Want to change colors | ① Change the style's color palette ② Specify colors that match the cover image |
| Want to change background/character | ① Replace cover.png ② Re-cut out the character ③ Make the background move or stop (step 0 – to stop, remove bg_loop.mp4) |
| Want different background per section / multiple images | See "Scene switching" below |
| Credit text | Fix workflow.config.json's credits |
- Check
projects/<slug>/README.mdto find which file contains which setting. Do not write settings that don't exist. - After fixing, re-run
make_mv.sh, then extract a frame of the fixed part and view it with Read before showing to the user:ffmpeg -y -ss <seconds> -i "songs/<song folder>/<Title>.mp4" -frames:v 1 /tmp/check.jpg - You can iterate as many times as needed. After each fix, ask for review using the message from step 2.
Scene Switching (Multiple Images)
Switch background images per section (format in templates/mv/README.md "Scene switching").
- Determine the sections. For each section, align the start second (from
projects/<slug>/input/lyrics.json) to the nearest beat before it (frominput/beats.json). For interludes, start from the end of the previous line. - Show a table of section background proposals, and get approval for the number of new images to generate (generation costs money):
| Section | Seconds (beat-aligned) | Background | Image (new / existing & reuse) |
- You can reuse the same image for identical sections in verse 1 and verse 2. The first section should reuse the cover.
- Derive image ideas from BRIEF.md and LYRICS.md (depict the scene's situation rather than a close-up of the lyric object).
- Write the prompt into
songs/<song folder>/scenes/<NN>_<name>.txt. Append a common suffix to all prompts:same world, art style, light as the cover, no people (if no character), no text, no letters, no typography, 16:9 landscape. - Generate one image at a time, view it with Read, then proceed to the next. Pass the cover as a reference image to keep style consistent:
If an image doesn't match, stop and consult the user (do not auto-retry)../tools/gen_image.sh "$(cat "songs/<song folder>/scenes/<NN>_<name>.txt")" "songs/<song folder>/scenes/<NN>_<name>.png" "songs/<song folder>/cover.png" - Write
songs/<song folder>/scenes.json, then run./tools/make_mv.sh. - Extract frames from the start and middle of each section and view with Read (check switching works and the main subject is in frame).
3b. Remake (Only When the User Wants)
The template is a starting point. If the user wants to change the visual style more drastically than simple fixes (step 3):
- Ask how they want to choose: "Decide axis by axis" or "Pick from the direction library".
- Axes: For each axis they want to change, consult the 18 axes in
mv-stylesskill'sreferences/axes.md. Only ask about axes they mention. - Library: Filter
direction-library/INDEX.mdby emotion/timing, show 2–3 candidates with a one-line description, and let them choose.
- Axes: For each axis they want to change, consult the 18 axes in
- Write the selected choices per section into
songs/<song folder>/DIRECTION.md(axes asaxisCode=value, directions as slug). - Modify
projects/<slug>/(the project created fromtemplates/mv) ininput/song.config.tsandsrc/. Insert direction values exactly as specified in the library record. Only modifytemplates/mvif the user says "from the next song onward" (because it's the starting point for the next song). - Re-create with
./tools/make_mv.sh "songs/<song folder>", extract frames of the changed sections and view, then show to the user with the message from step 2, along with the "Quality check" from the used direction record.
- If they want to switch to a completely different style, go back to "Choose a Visual Style (Optional)".
4. When OK
node -e 'const f=process.argv[1],fs=require("fs"),j=JSON.parse(fs.readFileSync(f));j.approved_at=new Date().toLocaleDateString("sv-SE");fs.writeFileSync(f,JSON.stringify(j,null,2)+"\n")' "songs/<song folder>/song.json"
./next.sh "<song folder>"
- Do not set
approved_atbefore hearing the user's OK.