# SAM 3 Rotoscoping

<figure><img src="/files/LVomv2UlV0c9ZccJTSCB" alt=""><figcaption></figcaption></figure>

### Tutorial

{% embed url="<https://youtu.be/6vHPRgheHTQ?si=BqWh4DEvM7BBQpb2>" %}

### How It Works

1. **Import video** - Use Import Clip button or drag & drop
2. **Click "Edit"** - On video thumbnail
3. **Select SAM 3** - From model selector (default for videos)
4. **Choose selection method** - Text prompt, box, or point selection
5. **Track Frame** - Preview mask on first frame (optional)
6. **Track Entire Video** - Process all frames
7. **Remove Background** - Export transparent ProRes 4444 video

### Selection Methods

<div align="left"><figure><img src="/files/Gd6RhzHwW4CnNOM0DwCm" alt=""><figcaption></figcaption></figure></div>

#### Text Prompt Selection

**Best for:** Clear subjects, simple scenes

1. **Select "Text" input mode**
2. **Type description:** "the person in the white shirt"
3. **Click "Track Frame"** - Preview on first frame
4. **Review mask** - Ensure correct selection
5. **Track Entire Video** - Process all frames

**Example prompts:**

* "the person"
* "the car"
* "the product"
* "the dancer in the center"

<figure><img src="/files/7kKF8iSjSpcDYngcVeJW" alt=""><figcaption></figcaption></figure>

#### Box Selection

**Best for:** Precise control, complex scenes

1. **Select "Box" input mode**
2. **Draw rectangle** around subject
3. **Optional:** Add helper text describing selection
4. **Click "Track Frame"** - Preview mask
5. **Track Entire Video** - Process all frames

**Tips:**

* Draw box tightly around subject
* Include entire subject in box
* Helper text improves accuracy

<figure><img src="/files/qUWyl3kKNSKY62ymMTLe" alt=""><figcaption></figcaption></figure>

#### Point Selection

**Best for:** Quick selection, single objects

1. **Select "Point" input mode**
2. **Click on subject** to add points
3. **Add multiple points** for better accuracy
4. **Optional:** Add helper text
5. **Click "Track Frame"** - Preview
6. **Track Entire Video** - Process

**Tips:**

* Click on center of subject
* Multiple points improve tracking
* Use for objects, not complex scenes

### Workflow Steps

#### Step 1: Track Frame (Preview)

**Purpose:** Preview your selection before processing entire video

1. **Make selection** (text, box, or point)
2. **Click "Track Frame"**
3. **Wait for processing** (few seconds)
4. **Review mask overlay** on first frame
5. **Adjust if needed** - Change selection and track again

**Why this matters:**

* Saves time and credits
* Ensures correct selection
* Allows refinement before full processing
* Shows mask quality

#### Step 2: Track Entire Video

**Purpose:** Process all frames of your video

1. **Confirm selection** looks good from Track Frame
2. **Click "Track Entire Video"**
3. **Wait for processing** (scales with video length)
4. **Progress indicator** shows status
5. **Mask data generated** for all frames

**Processing time:**

* 10-second clip: \~30-60 seconds
* 30-second clip: \~2-3 minutes
* Longer clips take proportionally longer

#### Step 3: Remove Background

**Purpose:** Export transparent video file

1. **After tracking completes**
2. **Click "Remove Background"**
3. **FFmpeg conversion** creates transparent video
4. **ProRes 4444 output** with alpha channel
5. **Download or Import** to Premiere Pro

**Output format:**

* **Format:** ProRes 4444 (.mov)
* **Alpha channel:** Full transparency
* **Quality:** Professional grade
* **Compatibility:** Premiere Pro ready

### Best Practices

#### Video Preparation

1. **Keep clips short** - Under 30 seconds for faster processing
2. **Good contrast** - Subject should stand out from background
3. **Stable footage** - Works best with steady shots
4. **Clear subject** - Well-defined subjects track better
5. **Good lighting** - Well-lit subjects produce cleaner masks

#### Selection Tips

1. **Be specific in text prompts** - "the person" vs. "person in blue shirt"
2. **Draw tight boxes** - Include entire subject, minimal background
3. **Use multiple points** - For point selection, add 2-3 points
4. **Preview first** - Always use Track Frame before full processing
5. **Refine if needed** - Adjust selection and re-track if mask is wrong

#### Processing Tips

1. **Start with short clips** - Test workflow with 5-10 second clips
2. **Check first frame** - Ensure Track Frame looks good
3. **Be patient** - Full video processing takes time
4. **Monitor progress** - Watch progress indicator
5. **Save results** - Download or import when complete

### Use Cases

#### Product Isolation

**Example:**

* Import product demo video
* Text prompt: "the product"
* Track Entire Video
* Remove Background
* Result: Product on transparent background for compositing

#### Portrait Background Removal

**Example:**

* Import talking head video
* Box selection around person
* Track Entire Video
* Remove Background
* Result: Person isolated for new background

#### Object Extraction

**Example:**

* Import video with multiple objects
* Text prompt: "the car in the foreground"
* Track Entire Video
* Remove Background
* Result: Car isolated for compositing

### Output Details

#### ProRes 4444 Format

**Characteristics:**

* **Codec:** Apple ProRes 4444
* **Alpha channel:** Full transparency support
* **Quality:** Professional, lossless alpha
* **File size:** Larger than MP4 (high quality)
* **Compatibility:** Premiere Pro, After Effects, Final Cut Pro

#### Importing to Premiere Pro

1. **Download** transparent video
2. **Import** into Premiere Pro project
3. **Place on timeline** above background
4. **Composite** with other footage
5. **Alpha channel** automatically used

### Limitations

#### Video Length

* **Recommended:** Under 30 seconds
* **Maximum:** 5 minutes
* **Processing time:** Scales with length
* **Longer clips:** Consider trimming first

#### Resolution

* **Maximum:** 2160p (4K) for Kling O3 VFX
* **Standard:** 1080p recommended
* **Higher resolution:** Slower processing
* **Lower resolution:** Faster processing

#### Subject Complexity

* **Simple subjects:** Work best (single person, object)
* **Complex scenes:** May require refinement
* **Multiple subjects:** May need separate passes
* **Overlapping objects:** Can be challenging

### Troubleshooting

#### "Track Frame not working"

**Solutions:**

* Ensure you've made a selection (text, box, or point)
* Check video is properly loaded
* Try different selection method
* Verify API keys are configured

#### "Mask is wrong on some frames"

**Solutions:**

* Use more specific text prompt
* Try box selection for better control
* Add helper text for box/point selection
* Process in shorter segments if needed

#### "Processing is too slow"

**Solutions:**

* Trim video to shorter duration
* Use lower resolution source
* Keep clips under 30 seconds
* Check internet connection

#### "Background not fully removed"

**Solutions:**

* Refine selection with Track Frame
* Use box selection for precise control
* Try different selection method
* Process again with adjusted selection

***

**Next:** Learn about Reshoot for video regeneration and style transfer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatvideopro.com/features/video-editing-tools/sam-3-rotoscoping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
