DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to cut a generated move clip into keyed sprite frames with H3 Game Sprites

Turn one AI-generated punch or kick clip into transparent, keyed sprite frames you can check.

Short answer: Generate the character still on a flat magenta backdrop in side view, then generate the move clip with the first and last frame set to the same idle still (the idle pin); then save the clip as clips/punch.mp4; run python3 scripts/sprite_cut.py clips/punch.mp4 sprites/punch --frames 12. All steps.

Credentials. If you use the bundled gen_still.py for the character still, it reads OPENROUTER_API_KEY, so keep that key in your environment and out of the repo and your commits.

Who it is forA solo indie game developer with a 2D fighter or action character who has one generated move clip and needs usable frames for the engine.

The problemA raw video clip has a flat magenta backdrop, dozens of near-identical frames and no transparency, so it cannot go into a game as is.

The outcomeA folder of keyed frames with a strip, a GIF and a metrics report showing key purity and how closely the move returns to its starting pose.

What you need first

  • ffmpeg installed locally
  • Python 3 with Pillow and numpy
  • A video model such as H3 / Hailuo 3 via OpenRouter, fal or MiniMax, or an ordinary video file you already have
  • An image model or illustrator for the character still (gen_still.py defaults to Nano Banana through OpenRouter and reads OPENROUTER_API_KEY)
  • Budget of roughly $0.60-0.70 per five-second clip plus a few cents per still, varying by provider

Steps

  1. Generate the character still on a flat magenta backdrop in side view, then generate the move clip with the first and last frame set to the same idle still (the idle pin).
  2. Save the clip as clips/punch.mp4.
  3. Run python3 scripts/sprite_cut.py clips/punch.mp4 sprites/punch --frames 12.
  4. Open the strip, the GIF and the metrics report in sprites/punch and check key purity per frame and the return-to-start figure.
  5. If the pose extremes look wrong, change the --frames value and run the same command again.

Prompt for your agent

Using the h3-game-sprites repo, cut the move clip at <path to clip.mp4> into 12 keyed frames with scripts/sprite_cut.py, writing to sprites/<move-name>. Report the output folder contents and the key purity and return-to-start numbers from the metrics report, and confirm the first and last frames match the idle still.

Caveat. The README gives the chroma-key and clip recipe but does not promise that any generated clip will return cleanly to idle, so check the metrics report before trusting a move.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for gary149/h3-game-sprites and "Cut a generated move clip into keyed sprite frames"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer