> For the complete documentation index, see [llms.txt](https://docs.dreamerland.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dreamerland.ai/video/minimax-h3/video-inpaint.md).

# Video Inpaint

Video Inpaint lets you **edit an existing video with words**. Swap a subject, change an outfit, replace an object, restyle part of the scene — while everything else in the footage stays exactly as it was. There's no frame-by-frame masking and no rotoscoping: you simply *name* what you want changed, and MiniMax H3 finds it, tracks it through the whole clip, and repaints it.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FNMup4q1GDWFotXRdn1F8%2Fdownload%20(1)%20(1).mp4?alt=media&token=888fc48a-0e00-4a6a-bdc6-af4a872bb703>" %}

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2Fg6j8IX2Vq8k56sg6EVuy%2FScreenshot_20260827_003934.jpg?alt=media&amp;token=e0a6fccc-a172-4a0d-9b96-20923125fd64" alt="" width="375"><figcaption></figcaption></figure>

### How It Works

1. In the MiniMax H3 tab, select the **Inpaint** task.
2. **Upload your source video** — the clip you want to edit (up to 15 seconds; longer uploads can be trimmed in the picker).
3. Type the **Video Mask Prompt** — a short phrase naming what should be replaced (e.g. *"the red car"*).
4. Pick a **control type** (see below).
5. Optionally add up to **5 reference images** to show exactly what the replacement should look like.
6. Type the **Prompt** — a description of what should appear instead. Recommend to use AI Writer to help you write once and change the prompt based on the structure.&#x20;

The result keeps the source clip's **length** and **aspect ratio** automatically — that's why the duration slider and aspect ratio control disappear for this task.

### What Is the Video Mask Prompt?

In classic image inpainting, you paint a mask over the area you want to change. In video, painting a mask on every frame would be impossibly tedious — so H3 masks **from text instead**. The Video Mask Prompt is that text: it tells the model *what to find* in the footage, and H3 detects it and follows it across every frame, even as it moves, turns, or is partially hidden.

The two text fields do different jobs, and keeping them straight is the key to this task:

| Field                 | Answers                           | Example                                            |
| --------------------- | --------------------------------- | -------------------------------------------------- |
| **Video Mask Prompt** | *What in the clip gets replaced?* | `the woman's jacket`                               |
| **Prompt**            | *What appears in its place?*      | `a black leather biker jacket with silver zippers` |

Think of the mask prompt as pointing, and the prompt as describing.

More Example:

<table><thead><tr><th width="282.48828125">Use Case</th><th>Video Mask Prompt</th></tr></thead><tbody><tr><td>Replace the entire person</td><td>person</td></tr><tr><td>Change the face and hair of a person</td><td>head, hair</td></tr><tr><td>Replace the woman on the right</td><td>woman on the right</td></tr><tr><td>Replace a red car</td><td>red car</td></tr></tbody></table>

### Control Type

* **None** — the masked region is freely regenerated from your prompt. Use this when replacing an object with something that moves differently (a car → a horse, a coffee cup → a crystal ball).
* **Pose** — the original motion is preserved as much as possible while the appearance changes. Use this when the *performance* matters: swapping a person's identity or outfit while keeping their exact dance, or gestures.
