Communitygithub.com

perler-bead-mv

Interactive step-by-step director skill for turning a character concept or Perler-bead image and BGM audio into a glossy 1080p pixel Perler-bead game style animation MV (or 4K die-cut bead sticker sheet).

What is perler-bead-mv?

This skill serves as an interactive director for creating high-quality Perler-bead pixel art music videos. It guides the user through a step-by-step process: first, gathering character art, BGM audio, theme, and lyrics preferences interactively. Then it extracts exact bead grids from images using a Node.js script, analyzes BGM beats with another script, and builds a complete animation engine with sprite sheets, scenes, and beat-synced effects. The skill ensures user satisfaction by always generating and showing visual previews (sprite sheet + 16-frame storyboard) for critique before rendering the final 1080p MP4 using Headless Chromium and FFmpeg. It is designed for Claude Code, Cursor, Codex, and similar AI coding agents that can execute Node.js scripts and shell commands, and relies on bundled zero-dependency helper scripts and reference prompts for turnkey generation.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/xyong934-gif/perler-bead-mv-skill/tree/HEAD/skills/perler-bead-mv

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Perler-Bead Pixel Game MV Director (perler-bead-mv)

Turn any character idea (or uploaded Perler-bead reference image) + music track into a crisp, zero-blur 1080p glossy Perler-bead pixel-game animation MV (or 4K die-cut Perler-bead sticker sheet & bead pattern).

Instead of feeding images into AI video models (which melt beads into blurry mush), this workflow extracts/constructs crisp 2D bead grids, renders every single bead procedurally with a signature center pinhole + plastic specular highlight + white die-cut sticker rim, syncs stage themes and particle bursts to real audio beat analysis, and encodes directly to 1080p MP4 via Headless Chromium + FFmpeg.


Core Interaction Rule (MUST FOLLOW)

ALWAYS guide the user interactively step by step. Never guess unstated creative choices or jump straight into final 1080p rendering without user confirmation at the key checkpoints:

  1. Ask concise, friendly questions (skip anything the user already supplied).
  2. Offer turnkey prompts when the user doesn't have an image or BGM yet (load references/prompts.md).
  3. Always show visual previews first (sprite sticker sheet + 16-frame storyboard) and invite the user to critique/refine before running the full MP4 render.

Step-by-Step Guided Workflow

Step 1 — Interactive Creative Intake (Ask & Collect Assets)

Start by greeting the user and checking what they already have. Ask only the missing items from these 4 short questions (use plain numbered questions or multiple-choice UI):

  1. Character Art:
    • Do you already have a character image/Perler bead image you want? If so, please send it directly.
    • If not: Tell me what character you want to draw (animal/person/color scheme/outfit/small action), and I'll directly give you a set of Codex / AI image generation prompts (see references/prompts.md), or directly call available image generation tools to help you create it. Wait until you select the one you like best before continuing!
  2. BGM Audio:
    • Do you already have a song (.mp3 / .wav) you want? If so, please upload or provide the path.
    • If not: Tell me what musical atmosphere you want (e.g., cute Nintendo retro pixel / energetic candy / intense boss battle), and I'll write ready-to-copy Suno / Udio style prompts + segmented lyric template (see references/prompts.md). You generate it, download it, and drag it in.
    • (If the user doesn't need a video and only wants a 4K transparent Perler bead sticker sheet / physical bead color chart, skip the audio and video steps, and directly use scripts/perler_renderer.js to export high-res stickers and charts!)
  3. Theme & Props:
    • What themed world do you want to put the character in? (e.g., Paris dessert adventure, cherry blossom school, forest treasure hunt, cyber neon, space odyssey)
    • Are there any exclusive props, landmarks, ultimate bosses, or cameo friends you want to add?
  4. Lyrics & Output:
    • Do you need on-screen synchronized lyrics/speech bubbles? (If so, please provide the lyrics, or let me write cute pixel game lines for you based on the music sections.)
    • Output preference: Default 1920×1080 · 30fps (or 60fps) MP4. If you need a different aspect ratio (e.g., 9:16 short video), let me know in advance.

Wait for the user's reply before moving to Step 2. If they need image or music prompts first, give them ready-to-copy prompts from references/prompts.md and wait until they return with the image and/or audio file.


Step 2 — Extract 1:1 Bead Grid & Analyze BGM Beats

Once you have the character image and audio file, create a clean working directory for the user's project and run the bundled zero-dependency Node.js helper scripts:

  1. Extract 1:1 Perler-Bead Grid & Limited Palette from Character Image:

    node "<skill_dir>/scripts/extract_beads.js" \
      --input "<user_character_image>" \
      --output "<project_dir>/hero_beads.json" \
      --cols 28 \
      --colors 10
    
    • Inspect the terminal ASCII grid preview (and refine --cols / --colors or clean stray edge beads if needed) so the character silhouette, eyes, outline, and signature colors match the uploaded art faithfully.
    • Design 4–5 expressive pose variations (wave, run1, run2, happy, starry) plus 6–8 themed Perler-bead props and a themed Boss sprite based on Step 1's theme.
  2. Analyze Audio Duration, BPM, Beat Phase & Per-Frame Energy:

    node "<skill_dir>/scripts/analyze_audio.js" \
      --input "<user_audio_file>" \
      --output "<project_dir>/audio_analysis.json" \
      --fps 30
    
    • Read the printed energy timeline (0s .. duration) to map exact song sections (Intro, Verse, Pre-Chorus, Fever Chorus, Boss Battle, Final Chorus, STAGE CLEAR) to real musical drops and pauses.

Step 3 — Build the Perler-Bead Animation Engine & Preview First

Assemble the project's rendering files in <project_dir>/ using scripts/perler_renderer.js and stage design recipes from references/scene-recipes.md:

  • perler_renderer.js: Copy from <skill_dir>/scripts/perler_renderer.js — provides drawBead (radial plastic gradient + center pinhole + upper-left specular glint), getStickerCanvas (thick #FFFFFF die-cut sticker rim + soft purple-tinted drop shadow), and extractBeadList (for Boss bead-shatter particle explosions!).
  • sprites.js: Stores the extracted hero bead grids (hero_beads.json + poses), custom palette, themed props, and Boss grids.
  • lyrics.js (optional): Timestamped kinetic game-style lyrics / speech bubbles.
  • scenes.js: Multi-stage pixel-game director synced to audio_analysis.json:
    • Scrolling perspective checkerboard floor + subtle graph-paper sky grid + layered pastel hills;
    • Retro arcade HUD (stage badge, live combo counter, heart icons);
    • Beat-reactive hero squash-and-stretch bounces, afterimage trails during Fever Time, ? question blocks popping themed props, Boss HP bar + full-screen colorful bead-shatter KO burst, and STAGE CLEAR S++ victory celebration!
  • render.html: Loads perler_renderer.js, sprites.js, lyrics.js, scenes.js, supporting ?mode=keyframes (saves preview_perler_sprites.png + storyboard_perler_16.png) and ?mode=render (streams 1080p raw RGBA frames to render_mv.js).

MANDATORY PREVIEW GATE (DO NOT SKIP): Run keyframes preview first:

node "<skill_dir>/scripts/render_mv.js" \
  --workdir "<project_dir>" \
  --audio "<user_audio_file>" \
  --keyframes

Inspect BOTH preview_perler_sprites.png and storyboard_perler_16.png yourself first (fix any clipping, ugly outline, misaligned ground shadow, or unreadable text), then show both preview images to the user and ask for feedback!


Step 4 — Interactive Polish Loop (Invite User Critique)

When presenting preview_perler_sprites.png and storyboard_perler_16.png to the user, briefly highlight what's included and offer quick polish options so they can steer the look effortlessly:

  • Are the bead pinholes and plastic highlights obvious enough? Should the white sticker outline be thicker?
  • Are you satisfied with how well the character's design, poses, and expressions match the original art?
  • Do you want to adjust stage color schemes, props, Boss bead-shatter effects, or subtitle styles for any sections?

Iterate quickly on sprites.js / scenes.js and re-run --keyframes until the user replies approving the preview (e.g., "OK, start rendering").


Step 5 — Render 1080p MP4 & Mandatory Decoded-Frame Verification

  1. Run the full 1080p render:
    node "<skill_dir>/scripts/render_mv.js" \
      --workdir "<project_dir>" \
      --audio "<user_audio_file>" \
      --output "<project_dir>/perler_mv_1080p.mp4"
    
    • render_mv.js automatically detects FFmpeg (prefers h264_nvenc when available, smoothly falls back to libx264) and local Chromium/Chrome.
  2. Mandatory Verification:
    • Check output MP4 stream metadata (resolution 1920x1080, frame rate, duration matching audio, AAC audio track present).
    • Decode 4 representative frames directly from the encoded MP4 into qa_encoded_4.png via FFmpeg and visually inspect it to confirm zero black frames, zero corruption, and crisp Perler-bead detail.
  3. Deliver the final MP4 path (plus preview/QA sheets and any optional 4K sticker exports) clearly to the user!

Related Skills