Skip to main content
Glama

cosplay-vp

Open-source tools, AI agent skills and a knowledge base for CG cosplay virtual production.

Film a real cosplayer on a phone. Cut them out, recover the camera move, put them inside an Unreal Engine world, and finish with anime-style cut-ins and impact frames, for recorded shots or a live event booth.

Plan ─► Shoot ─► Prep ─► Matte ─► Track ─► Unreal comp ─► Anime FX ─► Deliver

Docs site: https://astralrc.github.io/cosplay-vp/ · Start with: Prompt library · Techniques A–Z · Showcase · How we built this

What's in the box:

Part

What it is

docs/

Knowledge base: shooting, matting, tracking, Unreal comp, anime FX, live booth architectures (Aximmetry vs Pixel Streaming), rights and consent, open questions

src/cosplay_vp/

Python library and MCP server with 14 tools built on ffmpeg and COLMAP

skills/

6 Agent Skills (SKILL.md) that teach an AI agent the pipeline step by step

unreal/

Unreal Engine 5 Python script that imports a solved camera as a keyed CineCamera

tests/

Round-trip tests for the COLMAP → Unreal maths and ffmpeg tools on synthetic footage

MCP tools

Tool

Does

probe

Resolution, fps, rotation, alpha, with warnings for phone quirks

conform

Constant frame rate, rotation baked in

extract_frames

Numbered frames for COLMAP or matting

chroma_key

Green/blue key + despill to ProRes 4444, VP9 alpha or PNG

matte_external

Runs an AI matting model you installed (RVM, MatAnyone, ...)

composite_preview

Alpha foreground over a background to check edges

colmap_solve

COLMAP sparse reconstruction, exported as TXT

colmap_to_ue

COLMAP cameras → Unreal location (cm), pitch/yaw/roll, FOV, focal length

on_twos

Anime "on twos" timing

impact_frames

Invert or white flash frames on hits

side_by_side

Raw vs final demo

vertical

9:16 crop for TikTok, Reels and Shorts

latency_budget

Plan a live booth's latency against a target

knowledge

Read any page of the knowledge base

Related MCP server: video-editor-mcp

Quick start

Requirements: Python 3.10+, ffmpeg. Optional: COLMAP, Unreal Engine 5, Blender, OBS.

git clone https://github.com/AstralRC/cosplay-vp.git
cd cosplay-vp
pip install -e ".[dev]"
pytest            # 14 tests, including a live MCP stdio session

Connect the MCP server

Claude Code

claude mcp add cosplay-vp -- cosplay-vp-mcp

Claude Desktop (claude_desktop_config.json), or any MCP client:

{
  "mcpServers": {
    "cosplay-vp": { "command": "cosplay-vp-mcp" }
  }
}

If the command isn't on your PATH, use "command": "python", "args": ["-m", "cosplay_vp.server"].

Install the skills

  • Claude Code: copy the folders in skills/ to ~/.claude/skills/ (all projects) or .claude/skills/ (one project).

  • Claude apps: zip a skill folder and upload it under Settings → Capabilities → Skills.

Then ask, for example:

Plan a 15-second ultimate-move cut-in for an original character, then prep take3.mp4, key it, and track the camera into Unreal.

Without an AI agent

cosplay-vp-colmap2ue colmap_ws/sparse_txt camera.csv --scale 100

and in Unreal's Python console:

py "path/to/unreal/import_camera_csv.py" "path/to/camera.csv" 24

Status

Area

Status

ffmpeg tools, COLMAP → UE conversion

Working, tested in CI

colmap_solve

Wraps the COLMAP CLI; needs COLMAP installed

Unreal import script

Written for UE 5.x, not yet tested across versions; reports welcome

Live booth architectures B and C (cloud)

Hypotheses, see doc 07 and doc 09

Roadmap

  1. Local booth prototype: Unreal + OBS key, measured latency.

  2. Cloud experiment: Pixel Streaming with a camera uplink, latency against the local build.

  3. Matting benchmark: hair and lace edges, speed per model.

  4. Unreal MCP bridge: place media plates and queue Movie Render Queue jobs from an agent.

  5. Rotation-only (nodal) solve for tripod pans.

Ground rules

  • Only film people who agreed, with guardian consent for anyone under 18.

  • Paid work uses characters the client owns or licensed, or original characters.

  • No ripped game assets, logos or music in this repo.

  • Label ads, and label AI-generated content where platforms require it.

Details: docs/08-rights-consent-disclosure.md.

Contributing

Anyone can contribute: fork, change, pull request. Benchmarks with methods, fixes for new Unreal versions, matting comparisons, techniques, prompts, showcase entries and translations are all welcome. Issue templates are ready for each. Regular contributors become triage collaborators: see GOVERNANCE.md and CONTRIBUTING.md.

Licence

Code: MIT. Docs and skills: CC BY 4.0. External tools keep their own licences (doc 10).

Started by Idea (Phakpaphon Jaiwanglok) of AstralRC / CELESTI.

Available Tools

14 tools
chroma_keyB

Green/blue screen key to a clip with alpha (.mov ProRes 4444, .webm VP9, or %05d.png). A fast first pass.

Inputs: input (required), output (required), blend, color, +2 more.

colmap_solveC

Solve the camera from a frame folder with COLMAP (must be installed) and export the model as TXT.

Inputs: image_dir (required), workspace (required), quality, single_camera.

colmap_to_ueA

Convert COLMAP cameras.txt + images.txt into Unreal camera keys (.csv or .json): location in cm, pitch/yaw/roll, FOV. scale = UE centimetres per COLMAP unit. Import with unreal/import_camera_csv.py.

Inputs: output (required), sparse_txt_dir (required), scale.

composite_previewB

Preview an alpha foreground over a background still or render. For checking edges, not the final comp.

Inputs: output (required), background (required), foreground (required), height.

conformA

Re-encode phone footage to a constant frame rate with rotation baked in. Do this before tracking or matting.

Inputs: input (required), output (required), fps.

extract_framesB

Export numbered frames (00001.jpg ...) for COLMAP or matting. Use fps to thin long clips.

Inputs: input (required), out_dir (required), ext, fps, +2 more.

impact_framesC

Add anime impact flashes at frame numbers. mode: 'invert' or 'white'.

Inputs: input (required), frames (required), output (required), mode, +1 more.

knowledgeA

Read the project's knowledge base. Call with no topic to list topics.

Inputs: topic.

latency_budgetC

Sum estimated latency per stage of a live booth (camera, key, render, stream, display) against a target.

Inputs: stages_ms (required), target_ms.

matte_externalB

Run an AI matting tool the user installed (e.g. RVM, MatAnyone) using {input}/{output} placeholders. Check that tool's licence first.

Inputs: input (required), output (required), command_template (required).

on_twosC

Give motion the anime 'on twos' feel by holding each frame hold times at the same frame rate.

Inputs: input (required), output (required), fps, hold.

probeB

Inspect a clip: resolution, fps, duration, codec, rotation, alpha, plus warnings (variable frame rate, rotation flags).

Inputs: path (required).

side_by_sideC

Raw plate next to the finished shot, for showreels and pitch demos.

Inputs: after (required), before (required), output (required), height.

verticalC

Fill-crop a render to 9:16 for TikTok, Reels and Shorts.

Inputs: input (required), output (required), width, height.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 14 tools

    Disambiguation4/5

    Each tool targets a distinct pipeline stage (probe, conform, key, matte, solve, anime effects, delivery), and the descriptions clearly frame the boundaries. The only real overlap is chroma_key vs matte_external, but the 'fast first pass' vs 'AI matting tool you installed' framing makes the choice workable, as does composite_preview vs side_by_side vs vertical.

    Naming Consistency3/5

    All names are readable snake_case, but grammatical structure is mixed: verb-only (probe, conform), verb_noun (extract_frames, impact_frames), noun_noun (chroma_key, latency_budget), noun_verb (colmap_solve), and prepositional/adjectival forms (on_twos, side_by_side, vertical). The vocabulary is descriptive but not a predictable pattern an agent can rely on.

    Tool Count5/5

    14 tools is well within the sweet spot and each maps to a concrete pipeline stage from ingest through anime stylization to social delivery. Nothing feels padded or redundant enough to remove.

    Completeness4/5

    The surface covers ingest, camera solve, UE export, keying/matting, anime effects, social reframing, and booth latency planning. The main gap is a final composite/render step — composite_preview explicitly is 'not the final comp' — plus no audio or delivery/export tooling, though those can be handled in Unreal.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients like Claude Code, Claude Desktop, and VS Code to build and edit inside a running Adobe After Effects, covering comps, layers, keyframes, effects, text animators, markers, and renders. It supports batched tool calls with single-step undo, frame previews for self-verification, reusable style tokens, and four one-call studio rigs.
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding assistants and agents to natively generate images, videos, 3D meshes, Gaussian splats, and speech, and to manage media assets, through natural language commands or automated scripts over the Model Context Protocol. It exposes 55 tools alongside a Python CLI automation suite for batch generation, camera-orbit passes, credit/cost estimation, and companion API bridge integration.
      37
      -