---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://framesfield.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
title: "AI Video Object Removal, Inpainting & 3D Game Rigging Guide"
description: "Two notoriously expensive post-production tasks—frame-by-frame VFX video cleanup and 3D character rigging—now run deterministically for under a dollar per shot when you respect upstream geometry hygiene. For pixel-isolated video object removal, conform phone VFR to 24fps CFR, track with Meta SAM 2 ($0 Apache-2.0 local), dilate the binary mask +12px in FFmpeg to swallow cast shadows, and inpaint via Alibaba Wan VACE 14B ($0.08/s = $0.40/5s)—or use Kling O1 V2V Edit ($0.168/s, keep_audio: true) for mask-free wardrobe swaps. For game-ready 3D characters, generate a clean symmetrical A-pose, sanitize manifold holes in Blender (<25k tris), and auto-rig via Meshy (+$0.20) or Mixamo."
canonical: "https://framesfield.com/guides/ai-video-object-removal-inpainting-and-3d-rigging-guide"
---

# AI Video Object Removal, Inpainting & 3D Game Rigging Guide

> Two notoriously expensive post-production tasks—frame-by-frame VFX video cleanup and 3D character rigging—now run deterministically for under a dollar per shot when you respect upstream geometry hygiene. For pixel-isolated video object removal, conform phone VFR to 24fps CFR, track with Meta SAM 2 ($0 Apache-2.0 local), dilate the binary mask +12px in FFmpeg to swallow cast shadows, and inpaint via Alibaba Wan VACE 14B ($0.08/s = $0.40/5s)—or use Kling O1 V2V Edit ($0.168/s, keep_audio: true) for mask-free wardrobe swaps. For game-ready 3D characters, generate a clean symmetrical A-pose, sanitize manifold holes in Blender (<25k tris), and auto-rig via Meshy (+$0.20) or Mixamo.

- **Canonical URL:** https://framesfield.com/guides/ai-video-object-removal-inpainting-and-3d-rigging-guide
- **Category:** Creative Craft
- **Level:** Intermediate
- **Reading Time:** 16 min read
- **Who It's For:** Video editors, indie VFX artists, social ad producers, technical artists, and indie game developers replacing slow manual rotoscoping and broken 3D skinning pipelines.
- **Published:** 2026-12-01
- **Last Verified:** 2026-12-01

## Key Takeaways

- Separate surgical masked object removal (Meta SAM 2 + +12px FFmpeg mask dilation + Wan VACE 14B at $0.08/s or $0 Apache-2.0 local) from mask-free natural-language V2V swaps (Kling O1 Edit at $0.168/s with keep_audio: true) and broadcast cinema relighting (Runway Aleph 2.0 at $0.28/s + ProRes).
- Eliminate drifting masks and phantom floor shadows using two verified FFmpeg pre-flight steps: -r 24 -fps_mode cfr (replacing removed -vsync in FFmpeg 7–9) and a 12px boxblur+lut binary matte dilation.
- Ship 4K live-action VFX cleanups for ~$0.82 per 5-second shot by upscaling only the Wan VACE edit via Topaz Video API ($0.40) and compositing strictly inside a feathered SAM 2 mask over the untouched 4K camera plate.
- Fix 95% of broken AI 3D character rigs before skinning starts: enforce symmetrical front-facing A-pose generation, delight textures (Tripo Texture v3.5), run Blender Merge by Distance + <25k poly cleanup, then auto-rig via Meshy Rigging Check API (+$0.20) or Mixamo.

Two technical bottlenecks quietly burn more indie post-production and game-studio hours than almost anything else: **frame-by-frame VFX paint-and-roto cleanup** (erasing a stray boom mic, tripod, crew reflection, or wardrobe logo across a moving camera shot) and **turning raw AI 3D triangle meshes into cleanly deforming rigged characters** inside Unity, Unreal Engine 5, Blender, or Godot.

On the surface, video inpainting and 3D character rigging look like unrelated disciplines. In practice, both fail for the **exact same engineering reason**: feeding raw, un-sanitized geometry directly into a generative or skinning model. Variable-frame-rate phone footage and tight un-dilated masks break video object removal with sliding phantom shadows; dynamic action poses and non-manifold triangle soups break 3D auto-riggers with candy-wrapper shoulders and failed heat weights.

This studio handbook unpacks both halves cleanly—pairing verified late-2026 unit economics across [Alibaba Wan VACE 14B](/specs/wan-vace-14b), [Meta SAM 2](/specs/sam2-video), [Kling O1 V2V Edit](/specs/kling-o1-v2v-edit), [Runway Aleph 2.0](/specs/runway-aleph-2), [Meshy 3D](/specs/meshy-3d), and [Tripo 3D](/specs/tripo-3d) with reproducible FFmpeg and headless Blender sanitation commands.

## Which AI video-to-video editor should you pick: Wan VACE 14B vs. Kling O1 vs. Aleph 2.0?

**Choose Meta SAM 2 + Wan VACE 14B (`$0.08/s` or `$0` Apache-2.0 local) for surgical mask-locked object removal; choose Kling O1 Edit (`$0.168/s`) for mask-free wardrobe/set swaps that keep original speech audio; reserve Runway Aleph 2.0 (`$0.28/s`) for broadcast relighting and ProRes 10-bit finishing.**

Every video-to-video editing job falls cleanly into one of three lanes depending on whether untouched background pixels must remain 100% locked, whether original spoken dialogue must pass through automatically, and whether footage is under strict offline NDA restrictions:

![Three-column comparison table contrasting Alibaba Wan VACE 14B ($0.08/s and Apache-2.0 local), Kling O1 V2V Edit ($0.168/s with keep_audio: true), and Runway Aleph 2.0 ($0.28/s with ProRes and 10-bit Rec.709).](https://framesfield.com/images/guides/v2v-object-removal-and-inpaint-matrix.webp)
*FIG 01: FIG 01 — Verified late-2026 video-to-video editing comparison covering per-second API rates, mask isolation, audio retention, ProRes delivery, and offline NDA self-hosting.*

Look at how real 5-second and 10-second shot budgets scale across all three engines plus optional 4K mastering:

| Post-Production Task | Recommended Stack | 5s Shot Cost | 10s Shot Cost | Key Advantage |
| --- | --- | --- | --- | --- |
| **Surgical Boom-Mic / Bystander Removal (720p)** | [Meta SAM 2](/specs/sam2-video) (`~$0.02`) + [Wan VACE 14B](/specs/wan-vace-14b) (`$0.08/s`) | **`$0.42`** | **`$0.82`** | Untouched pixels stay locked outside dilated mask |
| **Surgical Removal Finished to 4K Plate** | SAM 2 + Wan VACE 14B (`$0.42`) + [Topaz Video API](/specs/topaz-video-upscale) 4K (`$0.08/s`) | **`$0.82`** | **`$1.62`** | Composite feathered patch over untouched 4K original |
| **Private Offline NDA Commercial Cleanup** | Local Apache-2.0 SAM 2 + Wan VACE 14B (24GB ComfyUI) | **`$0.00`** | **`$0.00`** | Zero external video upload; permissive commercial weights |
| **Talking-Head Wardrobe / Prop / Set Swap** | [Kling O1 V2V Edit](/specs/kling-o1-v2v-edit) (`$0.168/s`, `keep_audio: true`) | **`$0.84`** | **`$1.68`** | Zero rotoscoping; `@Image1` product/garment lock + speech sync |
| **Broadcast Relighting (MP4 / ProRes 422)** | [Runway Aleph 2.0](/specs/runway-aleph-2) (`$0.28/s`, `+$0.05/s` ProRes) | **`$1.40 / $1.65`** | **`$2.80 / $3.30`** | Keyframe-guided cinema lighting & 10-bit Rec.709 (`+$0.20/s`) |

## How does the SAM 2 → FFmpeg Dilation → Wan VACE 14B removal pipeline work?

**Conform phone clips to constant 24fps CFR (`-fps_mode cfr`) before tracking, generate a binary object matte in Meta SAM 2, expand that matte `+10` to `+16` pixels via FFmpeg so cast shadows disappear too, and prompt Wan VACE 14B strictly for the revealed empty background.**

![Dual-track 4-stage production diagram showing Track A (CFR conform, SAM 2 + 12px mask dilation, Wan VACE 14B inpaint, Topaz 4K patch composite) and Track B (clean A-pose concept, Meshy/Tripo mesh, Blender manifold gate, auto-rig export).](https://framesfield.com/images/guides/sam2-mask-to-vace-and-3d-rigging-flow.webp)
*FIG 02: FIG 02 — Shared geometry-first architecture across surgical VFX video cleanup (Track A) and game-ready 3D character rigging (Track B).*

### Step A1: Eliminate Variable Frame Rate (VFR) Drift Before Step 1

Smartphones record variable frame rate video—a nominal 30fps iPhone clip frequently drifts between 24fps and 30fps between frames. Feeding raw VFR footage into Meta SAM 2 and Alibaba Wan VACE 14B causes the binary matte to slip two to four frames behind fast pans.

Always conform source clips to constant 24fps CFR (`yuv420p` BT.709) and archive an uncompressed 48 kHz WAV audio master first. Note an important modern FFmpeg breaking change verified on FFmpeg 9.0.1: **`-vsync cfr` was removed**—always use **`-fps_mode cfr`** (or build exact commands interactively in our [FFmpeg Studio Command Builder](/tools/ffmpeg-command-builder)):

```bash
ffmpeg -i raw_phone.mov -r 24 -fps_mode cfr -pix_fmt yuv420p -c:v libx264 -crf 16 -an plate_cfr24.mp4
ffmpeg -i raw_phone.mov -vn -c:a pcm_s16le -ar 48000 original_audio_48k.wav
```

### Step A2: Track in Meta SAM 2 & Dilate the Binary Matte `+12px`

Send `plate_cfr24.mp4` into [Meta SAM 2](/specs/sam2-video) (`fal-ai/sam2/video` at ~$0.02/clip, or `$0` locally in ComfyUI under Apache-2.0) with a positive click (`label: 1`) on the unwanted mic stand, trash bin, or bystander on frame `0`—and add a negative click (`label: 0`) on any foreground actor passing in front of the target so SAM 2 protects the actor cleanly.

**Never pipe the raw SAM 2 matte straight into Wan VACE 14B.** Because SAM 2 hugs the physical silhouette tightly, dark cast shadows and 2px motion-blur fringes sit just outside the white mask in the black "preserve" zone, creating eerie floating shadow smudges after removal. Expanding the matte by ~11–12 pixels radially in FFmpeg fixes this deterministically (verified locally on FFmpeg 9.0.1):

```bash
ffmpeg -i sam2_mask.mp4 \
  -vf "format=gray,boxblur=12:1,lut=y='if(gt(val,18),255,0)',boxblur=2:1,format=yuv420p" \
  -r 24 -fps_mode cfr -c:v libx264 -crf 18 -an mask_dilated.mp4
```

### Step A3 & A4: Prompt Strictly for Clean Background, Then Patch Over 4K

Submit `plate_cfr24.mp4` and `mask_dilated.mp4` asynchronously via `queue.fal.run/fal-ai/wan-vace-14b` (`$0.08/sec`, setting `match_input_frames_per_second: true` and `match_input_num_frames: true`). Follow one golden prompting rule: **never name the deleted object in your positive prompt**. Writing `"Remove the black boom microphone from the beige ceiling"` injects the noun *microphone* right into diffusion attention and risks hallucinating pole shapes inside the hole. Describe strictly what replaces it:

- **Broken Positive Prompt:** `"Remove the tripod and orange safety cone standing on the wet cobblestone street"`
- **Fixed Clean-Plate Prompt:** `"Empty wet grey cobblestone European street with subtle damp light reflections, consistent soft overcast daylight, natural 35mm film grain, static architectural pavement"` (put `"tripod, orange cone, debris, smudge, blur"` inside `negative_prompt`).

Finally, if your original camera shot was 4K, avoid delivering the whole frame at 720p: upscale the approved 5-second Wan VACE output through [Topaz Video Upscale API](/specs/topaz-video-upscale) (`$0.40`), feather `mask_dilated.mp4` by 6 pixels in DaVinci Resolve or After Effects, and composite **only the patched region** on top of your untouched original 4K plate alongside `original_audio_48k.wav`. Over 90% of your frame stays 100% camera-original while the object vanishes seamlessly. Walk through the exact API script in our [Meta SAM 2 + Wan VACE 14B Video Object Removal Pipeline](/workflows/sam2-masking-and-wan-vace-video-object-removal-pipeline).

## When does mask-free Kling O1 V2V Edit beat masked removal?

**Skip SAM 2 masking entirely whenever you are changing wardrobe, swapping a handheld prop, replacing an entire background environment, or transforming an actor on a talking-head clip—Kling O1 V2V Edit (`$0.168/s`) keeps original spoken audio intact via `keep_audio: true`.**

Drawing or tracking masks makes zero sense when changing an actor's leather jacket to a tailored navy linen blazer, replacing an empty coffee mug with a branded stoneware tumbler, or shifting a plain home office into a warm sunlit architectural studio—because sleeves crease, shadows bounce across faces, and lighting spills naturally across the whole subject.

[Kling O1 Video-to-Video Edit](/specs/kling-o1-v2v-edit) (`fal-ai/kling-video/o1/video-to-video/edit`, `$0.168/sec` = `$0.84` per 5s shot) solves mask-free edits cleanly via three native parameters:

1. **Reference Anchoring (`image_urls` / `elements`):** Instead of typing vague garment adjectives, pass clean product or wardrobe stills in `image_urls` (or multi-angle `elements` with `frontal_image_url` + `reference_image_urls`) and bind them directly inside your edit prompt (`"Replace the speaker's black hoodie in @Video1 with the structured sage wool overshirt from @Image1, matching shoulder creases and soft key light"`).
2. **Native Speech Preservation (`keep_audio: true`):** Original actor dialogue, breath cadence, and room tone flow straight through the V2V render without manual FFmpeg audio stripping and re-syncing.
3. **40% Lower Unit Cost Than Aleph 2.0:** At `$0.84` per 5s shot versus `$1.40` on [Runway Aleph 2.0](/specs/runway-aleph-2), Kling O1 handles high-velocity UGC ad variants and social wardrobe testing economically—reserving Runway Aleph 2.0 (`+$0.05/s` ProRes / `+$0.20/s` 10-bit Rec.709) strictly for commercial cinema plates requiring heavy DaVinci Resolve color grading. See our complete [Kling O1 Natural-Language V2V Subject & Wardrobe Swap Pipeline](/workflows/kling-o1-natural-language-v2v-subject-swap-pipeline) and [V2V Prompt Builder](/skills/v2v-object-removal-and-subject-swap-prompt-builder).

## How do you turn AI-generated 3D meshes into cleanly rigged game characters?

**Rigging quality is decided before the 3D generator ever runs: lock a clean symmetrical front-facing A-pose at the 2D image stage, generate quad-friendly delighted geometry in Meshy or Tripo, sanitize non-manifold defects under `25,000` triangles in Blender, and then auto-rig.**

Almost every horror story about AI 3D characters—elbows twisting like candy wrappers, thighs fusing during a run cycle, Mixamo throwing *"unable to map your existing skeleton"*, or textures looking muddy under Unity URP lights—comes from trying to rig a raw turntable showcase mesh.

Compare the five verified 3D generation and retopology engines specifically through a game-engine and rigging lens:

| 3D Model / Platform | Verified Pricing | Topology & Parts Control | Texture Delighting | Auto-Rigging / Animation | Best Game-Dev Role |
| --- | --- | --- | --- | --- | --- |
| **[Meshy 3D](/specs/meshy-3d)** | `$0.60` textured (Pro API) · fal.ai `$0.80–$1.20` + `$0.20` rig + `$0.12` anim | Clean mesh + up to 8K PBR | Balanced PBR maps | **Built-in Biped & Quadruped + Rigging Check API** | Turnkey rigged NPCs & four-legged creatures |
| **[Tripo 3D](/specs/tripo-3d)** | `$0.30` std textured (`+$0.05` quad · `+$0.10` low-poly · `+$0.20` parts) | **Native quad FBX, smart low-poly & segmented parts** | **Texture v3.5 `delight` strips baked shadows** | Export clean quad FBX → Blender / Mixamo | Budget low-poly props, articulated machines & Mixamo base meshes |
| **[Hyper3D Rodin](/specs/hyper3d-rodin)** | `$0.40` flat on fal.ai | Multi-view hard-surface precision + quad FBX | Sharp metallic/roughness | Export → Blender hard-surface rigging | Weapons, vehicles, sci-fi armor & hero props |
| **[Hunyuan3D 2.0](/specs/hunyuan-3d-2)** | `$0.00` local GPU (~`$0.48` API) | Raw dense mesh (decimate in Blender) | Clean local PBR | Export → Blender / Mixamo | Offline studio prop/character iteration on 16–24GB GPUs |
| **[TRELLIS 3D](/specs/trellis-3d)** | `$0.00` MIT local (~`$0.02` API) | Raw mesh (decimate in Blender) | Fast stylized albedo | Greybox / static props | Rapid 100-prop game-jam level greyboxing |

### The Non-Negotiable A-Pose Rule (Before Calling Image-to-3D)

Never send an illustration of a knight crossing his arms, holding a broadsword in front of his chest, or wearing a floor-length cape touching his boots into an Image-to-3D generator if you plan to rig it. Neural 3D reconstruction physically welds touching polygons into a single solid mass.

Instead, render your 2D character concept in [FLUX 3](/specs/flux-3) (`$0.048`) or [Seedream 5.5](/specs/seedream-5-5) (`$0.035`) with five explicit structural locks:
1. **Front-facing orthographic full-body view**, centered cleanly from head to boots with generous margin on all sides.
2. **Symmetrical 45-degree A-pose** (arms extended 45° downward from the torso—better than horizontal 90° T-pose because it halves shoulder armpit pinching across both idle and raised-arm animations).
3. **Clear air gaps** between inner arms and ribs, between hands and hips, and between left and right legs.
4. **Flat, shadowless overcast studio lighting** on a plain `#E8E8E8` neutral background (so dark directional shadows never bake permanently onto the albedo map).
5. **Zero handheld weapons, shields, or trailing capes**—generate weapons separately via [Hyper3D Rodin](/specs/hyper3d-rodin) or [Tripo 3D](/specs/tripo-3d) and parent them to a hand socket bone in Unity, Unreal, or Godot.

## Why do raw AI 3D meshes fail rigging—and what does the Blender sanitation gate fix?

**Automatic weight skinners shoot heat rays inside a closed volume; raw AI GLBs frequently contain duplicate vertices, floating disconnected micro-shells, inverted normals, and 180k-triangle bloat that cause instant bone-heat errors unless sanitized in Blender first.**

Before uploading any AI character mesh to Adobe Mixamo or running automatic skin weights inside Blender, pass the downloaded GLB/FBX through a 20-second headless Blender Python gate (full script inside our [AI 3D Mesh Rigging & Non-Manifold Fix Playbook](/fixes/ai-3d-mesh-broken-rigging-weights-and-non-manifold-fix)):

1. **Join & Apply Transforms:** Merge stray sub-objects into one unified character mesh (`Ctrl+J`), center `X/Y` cleanly at `0.0`, ground the lowest boot vertex directly on `Z = 0.0`, and run `Apply All Transforms` (`Scale = 1.0, 1.0, 1.0`).
2. **Merge by Distance (`0.0005m`) & Delete Loose Geometry:** Welds microscopic UV seam cracks that break watertight manifold checks and purges stray floating noise triangles.
3. **Recalculate Outside Normals (`Shift+N`):** Fixes inside-out dark faces that turn invisible under Unity/Unreal back-face culling.
4. **Hit Real-Time Triangle Budgets:** Bring deforming hero characters down to **`10,000 – 25,000` clean triangles** (using Tripo's `+$0.05` quad-mesh option or Blender Quad/Decimate + Cycles map baking) and background props to **`1,500 – 6,000` triangles**.
5. **Pre-Flight Check & Rig:** When using [Meshy 3D](/specs/meshy-3d), invoke `/openapi/v1/rigging/check` before paying for auto-rigging (`+$0.20` on fal.ai) and animation (`+$0.12`), or upload your sanitized FBX to Adobe Mixamo for free humanoid skeleton retargeting. Always inspect a 90-degree shoulder lift and 110-degree knee bend in Blender Pose Mode before shipping to your engine.

For WebGL, Three.js, and Godot runtime shipping, finish every static or rigged GLB through `gltf-transform optimize --texture-compress webp --compress draco` so uncompressed 4K PNG textures never balloon a single character past 30 MB on mobile browsers. Walk through every command end to end in our [AI 3D Mesh Auto-Rigging, Retopology & Game Animation Pipeline](/workflows/ai-3d-mesh-auto-rigging-retopology-and-game-animation-pipeline).

## Unified troubleshooting matrix: VFX video cleanup & 3D rigging errors

**Almost every failure across both tracks maps to one measurable upstream defect you can verify locally with `ffprobe`, `PIL`, or Blender's Non-Manifold selector.**

| Track | Symptom | Root Cause | Verified Fix |
| --- | --- | --- | --- |
| **Video Cleanup** | Floating dark shadow smudge remains after object vanishes | Tight SAM 2 mask excluded cast floor shadow | Dilate SAM 2 matte `+12px` via FFmpeg `boxblur+lut` before Wan VACE 14B |
| **Video Cleanup** | Mask lags 2–4 frames behind pan; audio slips out of sync | Raw smartphone variable frame rate (VFR) | Conform first via `ffmpeg -r 24 -fps_mode cfr` before SAM 2 tracking |
| **Video Cleanup** | `Unrecognized option 'vsync'` error on macOS/Linux | FFmpeg 7–9 removed deprecated `-vsync` flag | Replace `-vsync cfr` with `-fps_mode cfr` (works FFmpeg 5.1 through 9.x) |
| **Video Cleanup** | HTTP 504 timeout mid-job on Wan VACE or Kling O1 | Called synchronous `fal.run` on 90–180s video job | Submit asynchronously to `queue.fal.run` and poll `status_url` |
| **3D Rigging** | Mixamo `"unable to map skeleton"` or Blender Bone Heat error | Non-manifold cracks, loose shells, or unapplied scale | Run headless Blender `remove_doubles` + `delete_loose` + `Apply Transforms` |
| **3D Rigging** | Armpit tears or hips pull sideways when arm lifts | Character generated in action pose or loose cape fused to legs | Re-generate from clean symmetrical 45° A-pose; generate weapons separately |
| **3D Rigging** | Model looks weirdly dark/flat under Unreal or Unity lights | Baked directional shadows in albedo OR inverted normals | Enable Tripo Texture v3.5 `delight` + Blender `normals_make_consistent` |

## Choosing the right starting workflow for your project

- **Need to remove a mic, tripod, logo, or bystander cleanly for `$0.42–$0.82`?** Follow the [SAM 2 Masking + Wan VACE 14B Video Object Removal Pipeline](/workflows/sam2-masking-and-wan-vace-video-object-removal-pipeline).
- **Need to swap wardrobe, props, or sets on speaking footage without rotoscoping?** Follow the [Kling O1 Natural-Language V2V Subject & Wardrobe Swap Pipeline](/workflows/kling-o1-natural-language-v2v-subject-swap-pipeline).
- **Need clean Unity, Unreal, or WebGL game characters rigged from concept art?** Follow the [AI 3D Mesh Auto-Rigging, Retopology & Game Animation Pipeline](/workflows/ai-3d-mesh-auto-rigging-retopology-and-game-animation-pipeline).
- **Automating fal.ai video masking and editing inside Claude Code or Cursor?** Install our [Meta SAM 2 Masking & Kling O1 V2V Agent Skill](/skills/sam2-video-masking-and-kling-o1-v2v-fal-skill) or [FLUX LoRA & Wan VACE Agent Skill](/skills/flux-lora-training-and-wan-vace-fal-skill).

## Copyable Reference: V2V Object Removal & 3D Game Rigging Pocket Sheet (v2v-removal-and-3d-rigging-cheatsheet.md)

```markdown
# AI Video Object Removal & 3D Rigging Reference (2026-12-01)

## 1. Video Cleanup & V2V Model Routing
- Surgical Removal (0% BG drift):   Meta SAM 2 (~$0.02 / $0 local) + Wan VACE 14B ($0.08/s = $0.40/5s)
- Mask-Free Swap + Speech Audio:    Kling O1 V2V Edit ($0.168/s = $0.84/5s, keep_audio: true)
- Broadcast Relight + ProRes/10b:   Runway Aleph 2.0 ($0.28/s = $1.40/5s; +$0.05 ProRes)
- Offline NDA Commercial Cleanup:   Local Apache-2.0 SAM 2 + Wan VACE 14B in 24GB ComfyUI ($0)

## 2. Mandatory FFmpeg Pre-Flight (Verified FFmpeg 5.1–9.x)
# Conform phone VFR -> 24fps CFR (-fps_mode cfr replaces removed -vsync):
ffmpeg -i raw.mov -r 24 -fps_mode cfr -pix_fmt yuv420p -c:v libx264 -crf 16 plate_cfr24.mp4
# Dilate SAM 2 binary mask +11-12px radius so cast floor shadows vanish cleanly:
ffmpeg -i sam2_mask.mp4 -vf "format=gray,boxblur=12:1,lut=y='if(gt(val,18),255,0)',boxblur=2:1,format=yuv420p" -r 24 -fps_mode cfr -c:v libx264 -crf 18 mask_dilated.mp4

## 3. Wan VACE Clean-Plate Prompt Rule
- NEVER write "remove the boom mic" in the positive prompt!
- Describe ONLY the revealed background surface ("clean warm plaster ceiling, soft interior light").

## 4. Game-Ready 3D Character Rigging Gate
[ ] 2D Reference: Symmetrical front A-pose (arms 45° out, legs apart, flat light, zero handheld props)
[ ] Mesh + Texture: Tripo 3D ($0.30 + $0.05 quad, delight: true) OR Meshy 3D ($0.60 Pro / fal.ai +$0.20 rig)
[ ] Blender Cleanup: Merge by Distance (0.0005m) -> Delete Loose -> Normals Outside -> <25k tris -> Feet Z=0
[ ] Rig & Export: Meshy /openapi/v1/rigging/check -> Auto-Rig OR Mixamo FBX -> glTF-Transform WebP+Draco
```

## FAQ

### What is the cheapest way to remove a boom mic, tripod, or bystander from a 5-second video clip?

Conform the clip to 24fps CFR, track the object with Meta SAM 2 ($0 local Apache-2.0 or ~$0.02 on fal.ai), dilate the binary mask by +12px in FFmpeg to swallow its cast shadow, and inpaint via Alibaba Wan VACE 14B at $0.08/sec ($0.40/5s)—or $0 locally in 24GB ComfyUI.

### When should I use Kling O1 V2V Edit ($0.168/s) instead of Wan VACE 14B ($0.08/s) or Runway Aleph 2.0 ($0.28/s)?

Use Wan VACE 14B + SAM 2 when removing a specific prop while keeping 100% of untouched background pixels strictly locked. Use Kling O1 Edit when swapping wardrobe, props, or sets on speaking creators without drawing masks (thanks to keep_audio: true and @Image1 referencing). Use Runway Aleph 2.0 for cinema relighting needing ProRes (+$0.05/s) or 10-bit Rec.709 grading.

### Why did my Wan VACE 14B video removal leave a dark moving smudge on the floor?

Meta SAM 2 tracks the exact physical silhouette of the object, leaving its dark contact shadow outside the white mask. Expanding (dilating) the binary matte by 10 to 16 pixels via FFmpeg boxblur+lut places the entire shadow footprint inside the inpaint region so Wan VACE replaces it cleanly.

### Why do AI-generated 3D characters fail Mixamo or twist horribly at the shoulders?

Three upstream causes: dynamic action-pose inputs that fuse arms or capes to the body, raw 150k-triangle non-manifold meshes with duplicate vertices or loose shells, and unapplied transforms. Generating strictly from a clean symmetrical front A-pose and running a Blender Merge-by-Distance + <25k poly sanitation pass resolves 95% of auto-rig failures.

### Which AI 3D generator supports quadruped (four-legged) auto-rigging and separated animated mechanical parts?

Meshy 3D supports both biped and quadruped auto-rigging via API (including a pre-flight /openapi/v1/rigging/check endpoint, or +$0.20 auto-rig / +$0.12 animation on fal.ai). Tripo 3D leads for separated mechanical parts (+$0.20 Generate in Parts), clean quad-mesh FBX (+$0.05), smart low-poly (+$0.10), and Texture v3.5 shadow delighting.
