Communitygithub.com

comic-to-video

Automatically create high-definition dynamic comic videos (MP4) from multi-panel or serial comics without altering the original artwork, with multi-role Chinese neural dubbing, panel camera motions, non-destructive effects, sound effects, and ambient music. Ideal for dynamic comic showcases, award-winning comic video adaptations, large-screen presentations, and short video publishing.

What is comic-to-video?

This skill, comic-to-video, is designed for AI agents to automatically transform static comic pages into engaging dynamic video content while strictly preserving the original artwork. It supports platforms like Claude Code, Cursor, and Codex, and is particularly useful for creators, publishers, or developers who need to convert comics into high-definition MP4 videos for display, award submissions, or social media without any redrawing or AI-generated modifications. The skill follows a four-step workflow: first, it reads and analyzes the comic pages to accurately measure panel splits, ensuring that speech bubbles, sound effects, and narration boxes are never cropped. Next, it creates a detailed storyboard JSON that defines panel crops, multi-role dubbing using eight built-in Chinese neural voices, camera motions (zoom, pan, tilt), non-destructive effects (vignette, rain, sparks), transitions, and sound effects. It then renders the video using a Python script via `uv`, which automatically manages dependencies and can fallback to macOS `say` if offline. Finally, it validates the output by generating a preview grid to check for any distortion or cropping issues and uses `ffprobe` to verify technical specs. The core principle is to never violate the original art—crops must include extra margins, aspect ratios are preserved with blurred padding, and video timing is driven by audio duration to ensure natural pacing.

Works with~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/didi4007/comic-to-video/tree/HEAD

Ask in your favorite AI

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

Documentation

Comic-to-Video Skill (comic-to-video)

When a user provides a comic directory or a set of comic images and requests to create a video with dubbing and lightweight effects without altering the original artwork in any way, follow the 4 steps below.

Core Red Lines (Never Violate)

  1. Strictly forbid redrawing or modifying the original artwork: Never call AI image generation or image-to-video models to alter the comic frames. All visuals must be 100% derived from the original high-definition image pixels.
  2. Strictly forbid cropping speech bubbles and text: When defining panel crop coordinates (crop: [x, y, w, h]), you must fully encompass speech bubbles, onomatopoeia burst boxes, and cross-panel narration boxes that extend beyond the frame borders. Non-16:9 panels automatically use a Gaussian-blurred darkened background from the same image with the original aspect ratio centered intact, without any stretching or distortion.
  3. Audio-driven pacing, natural rhythm: Generate dubbing first, then measure the speech duration to determine shot length, avoiding scenarios where "the shot changes before the speech finishes" or long, awkward silences.

Step 1: Read the Comic and Precisely Measure Panel Splits

  1. List all comic images in the target directory (sorted by filename naturally), and batch-call read_file to fully read each page's visuals, characters, emotions, and all text (narration, dialogue, onomatopoeia).
  2. For precise panel crop coordinates, use a short Python script or estimate each panel's normalized coordinates [x, y, w, h] (ranging from 0.0 to 1.0), following the principle: leave an extra 1-2% margin, never cut into the edges of bubbles.
    • If a page has multiple tightly packed small panels expressing a continuous action (e.g., a three-frame close-up sequence), split them into consecutive independent shots, using cut for a cinematic editing feel.
    • If a cross-panel narration connects two images, present it as a combined frame containing the narration's panel, or start with single panels and end with a combined frame.

Step 2: Write the Storyboard, Dubbing, and Effects Plan (storyboard.json)

In the target project directory, create <work_name>_storyboard.json, fully planning each shot with:

  • Panel Crop: image, crop: [x, y, w, h]
  • Multi-role Dubbing (lines): Eight built-in Chinese neural voice presets (role), or directly specify voice / rate / pitch:
    • narrator (steady narration, zh-CN-YunyangNeural)
    • youth / youth_excited (young male voice, zh-CN-YunxiNeural)
    • uncle / uncle_cheer (deep/cheerful middle-aged male, zh-CN-YunjianNeural)
    • female / female_lively (natural/lively female voice, zh-CN-XiaoxiaoNeural / XiaoyiNeural)
    • elder (aged, seasoned voice)
  • Camera Motion (motion): zoom_in, zoom_out, impact_zoom, pan_left, pan_right, tilt_up, tilt_down, static
  • Non-destructive Lightweight Effects (effects): Freely combinable:
    • vignette (cinematic darkening, focus)
    • candle_flicker (warm, subtle flickering of oil lamp/candlelight)
    • rain (fine slanted rain streaks)
    • steam (rising steam from hot air/alcohol)
    • sparks (firecracker/celebratory Mars particle effect)
    • sunbeams (slanted morning light rays/sunbeams)
    • film_grain (retro film micro-grain)
    • shake (brief camera shake, suitable for explosions/impact)
  • Transitions (transition_in / transition_out): fade (black fade), fadeblack (black scene change, suitable for entering/awakening from dreams), fadewhite (white flash, suitable for time travel), cut (sharp hard cut)
  • Sound Effects (sfx): rain_ambience, sizzle, bottle_open, water_drop, firecracker, chime_dream, whoosh

Example JSON structure:

{
  "title": "A Sip Across a Century",
  "fps": 30,
  "bgm_mood": "nostalgic",
  "title_card": { "title": "A Sip Across a Century", "subtitle": "That one taste of life spanning a hundred years", "duration": 2.4 },
  "end_card": { "title": "A Sip Across a Century", "subtitle": "To the past, and even more to the beautiful struggle of our generation", "duration": 2.8 },
  "shots": [
    {
      "id": "p01_1",
      "image": "01.png",
      "crop": [0.02, 0.01, 0.48, 0.46],
      "motion": "zoom_in",
      "effects": ["vignette", "film_grain"],
      "sfx": [],
      "transition_in": "fadeblack",
      "transition_out": "fade",
      "lines": [
        { "role": "narrator", "text": "In July of the sixth year of the Republic, the flags in Beijing changed faster than the sky." }
      ]
    }
  ]
}

Step 3: One-Click Render High-Definition Video and Preview Grid

Use uv to run the built-in rendering script (automatically manages edge-tts, pillow, numpy, zero system pollution; automatically degrades to macOS say when offline):

uv run --with edge-tts --with pillow --with numpy python3 \
  "$HOME/.gemini/config/skills/comic-to-video/scripts/build_comic_video.py" \
  --storyboard "<work_directory>/<work_name>_storyboard.json" \
  --output "<work_directory>/<work_name>_dynamic_comic.mp4" \
  --aspect 16:9 \
  --save-preview-frames
  • For vertical screen (Douyin/WeChat Video), change --aspect 16:9 to --aspect 9:16.
  • If the user provides external background music, append --bgm "/path/to/music.mp3"; otherwise, automatically generate a gentle pentatonic-scale ambient score with automatic voice ducking enabled.

Step 4: Visual Inspection and Delivery

  1. Use read_file to open the auto-generated <work_name>_dynamic_comic_preview_grid.jpg collage, and check each panel:
    • Are all original comic artworks 100% intact without distortion?
    • Are all speech bubbles, narration boxes, and onomatopoeia fully visible without being cropped?
    • Are the ambient effects natural, restrained, and not covering any text?
  2. Use ffprobe to verify the output MP4's resolution, frame rate, audio/video streams, and total duration.
  3. Deliver the final MP4, storyboard.json (for the user to fine-tune dialogue, change voice lines, or adjust effects for re-rendering), and a concise summary of dubbing and effects.

Related Skills