Communitygithub.com

sprite-character-presenter

Use when building a 2D animated sprite presenter video over slides (PPTX, PDF, or PNGs) using chroma-keyed character sprite sheets, pupil-aligned lip-sync and blinks, 1x synced embedded GIF animations, a glowing laser pointer, and Remotion 1080p MP4 rendering.

sprite-character-presenter란 무엇인가요?

sprite-character-presenter is a Claude Code agent skill that use when building a 2D animated sprite presenter video over slides (PPTX, PDF, or PNGs) using chroma-keyed character sprite sheets, pupil-aligned lip-sync and blinks, 1x synced embedded GIF animations, a glowing laser pointer, and Remotion 1080p MP4 rendering.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/danielinspring/sprite-character-presenter/tree/HEAD

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Sprite Character Presenter

Build deterministic 1920×1080 (30 fps) presentation videos featuring a 2D chibi/cartoon sprite presenter walking between slide margins, talking with pupil-aligned 6-viseme lip-sync and natural blinks, pointing with a glowing laser pointer, syncing 1× embedded GIF animations, and closing with a front-facing 90° bow.

Pair with:

  • vercel-gateway-voice-cloning when narrating with a cloned voice (Fish Audio S2.1 Pro or Voxtral Mini TTS).
  • Garinmckayl/anima when generating short scientific/mechanism animation GIF clips to embed and sync 1× inside slides via scripts/extract_slides.py --gif.

Directory Layout

Create a working directory (e.g., video_work/) with:

video_work/
├── script.json                  # Slide timing, poses, laser cues, GIF anchors
├── sprites/
│   ├── sheet_poses.jpg          # 6 poses on solid #00FF00 green screen
│   ├── sheet_mouths_eyes.jpg    # 6 visemes + closed-eye blink + happy eyes
│   ├── sheet_turnaround.jpg     # 5 angles: front, q3_left, side_left, back, q3_right
│   ├── sheet_walk.jpg           # 8 walk frames facing right
│   └── sheet_bow.jpg            # (optional) 2 front-facing frames: bow_mid, bow_90
├── slides/                      # Generated by scripts/extract_slides.py
├── audio/                       # Generated by edge-tts or vercel-gateway-voice-cloning
└── remotion/                    # Copied from scripts/remotion-template/

Sprite Sheet Rules

  1. Solid bright green #00FF00 background with no shadows or gradient; avoid green clothing on the character.
  2. Resolution scaling: scripts/cut.py and scripts/face.py automatically scale connected-component minpx and pupil search bounds for both 1280×720 and 1024×576 sheets.
  3. Front-facing 90° bow (sheet_bow.jpg): Generate 2 side-by-side front-facing frames on #00FF00 — polite 35° bow (pose_bow_mid) and deep 90° bow (pose_bow_90). scripts/cut.py applies bow_mid's scale factor to bow_90 so the character bends downward naturally on the red feet baseline rather than stretching back up to TARGET_H.
  4. Horizontal flip derivation: pose_point_right, turn_side_right, walkL_0..7, face_point_right_m0..5, and blink_point_right are derived automatically by flipping around FX = CW / 2 = 450.

End-to-End Workflow

1. Cut Sprites and Composite Lip-Sync Faces

python3 scripts/cut.py --work-dir ./video_work
python3 scripts/face.py --work-dir ./video_work

Inspect video_work/sprites/preview/cuts.png, bow_check.png, and mouth_neutral.png before proceeding. Confirm every character's feet sit cleanly on the red baseline and no halo or misaligned mouth patch appears.

2. Export PPTX Slides and 1× GIF MP4s

Requires LibreOffice (soffice), Poppler (pdftoppm), and ffmpeg.

python3 scripts/extract_slides.py \
  --pptx /path/to/deck.pptx \
  --out-dir ./video_work/slides \
  --gif 5=/path/to/anim_slide5.gif \
  --gif 6=/path/to/anim_slide6.gif

extract_slides.py parses <p:pic> coordinates directly from ppt/slides/slideN.xml, transcodes each GIF to deterministic 30 fps CFR H.264 MP4 (crf 14), extracts first/last freeze frames (_start.png, _end.png), and writes slides/layout_meta.json.

3. Generate Narration Audio + Lip-Sync Cues

  • Fast prototype: Generate audio with edge-tts (-rate=+0%) and analyze lip-sync cues.
  • Cloned voice (recommended for final): Use the companion vercel-gateway-voice-cloning skill (fish-audio/s2.1-pro with lossless WAV + pure 2-pass linear -18 LUFS normalization) to populate video_work/audio/<id>_44k.wav, video_work/audio/<id>_cues.json, and video_work/audio/manifest.json.
  • macOS Rhubarb SIGSEGV fallback: Rhubarb v1.14.0 (x86_64) crashes with SIGSEGV under Rosetta 2 on Apple Silicon. Use the native Python RMS + Zero-Crossing Rate 30 fps viseme analyzer (included in vercel-gateway-voice-cloning/scripts/audio_utils.py), which emits the exact Rhubarb mouthCues JSON schema (X, A–F).

4. Compile Timeline

Write video_work/script.json (see examples/script.example.json), then compile:

python3 scripts/build_timeline.py --work-dir ./video_work --fps 30

Key timeline guarantees:

  • 1× GIF sync: Segments with gifAnchorSec and gifMaxEndSec assert that narration never overruns its visual milestone window.
  • Freeze frames: Slides with gifMode: "freeze_end" hold the final GIF frame cleanly after playback ends; "freeze_start_and_end" holds the first frame during pre-GIF intro narration and the last frame afterward.
  • Laser pointer placement: Place laserCues coordinates (x, y in 1920×1080 space) slightly left of bullet text or on diagram elements so the glowing red dot highlights without obscuring text.
  • Additive closing bow: Setting "closingBow": true on the final slide runs: 45f unobstructed slide → 36f backdrop dim + walk to center (x=960, scale=1.30) → front-facing closing line → 12f bow transition → 75f pose_bow_90 hold.

5. Render in Remotion and Run QA

Copy scripts/remotion-template/ to video_work/remotion/, symlink sprites/png, slides, and audio into remotion/public/, install dependencies, and render:

cp -R scripts/remotion-template ./video_work/remotion
cd ./video_work/remotion
mkdir -p public
ln -sfn ../../sprites/png public/sprites
ln -sfn ../../slides public/slides
ln -sfn ../../audio public/audio
npm install
npx remotion render Presenter ../rendered/presentation_final.mp4 --codec=h264 --crf=18 --concurrency=4

Then extract QA stills and 1× continuous audio-on review clips:

python3 scripts/qa_render.py rendered/presentation_final.mp4 rendered/qa_final --work-dir ./video_work

Common Pitfalls

SymptomCauseFix
expected N figures, found M in cut.pySheet resolution differs or extra noise blobCheck scale_minpx or remove stray markings on green screen
bow_90 stretches taller than bow_midNormalized independently to TARGET_HAlways cut both via cut_bow_sheet() sharing bow_mid's scale
Rhubarb crashes with signal 11 on macOSx86_64 binary under Rosetta 2Use native Python RMS+ZCR viseme analyzer instead
GIF drifts out of sync with narrationLooping or variable-framerate GIFTranscode via extract_slides.py (-fps_mode cfr -r 30) and anchor with gifAnchorSec
Character overlaps slide textStatic right-margin X on dense slidesVary characterX, characterSide, and characterScale (e.g. 0.56–0.72) per slide

관련 스킬