How to Disable Frame Deduplication in Claude Video Using the --no-dedup Flag

To disable near-duplicate frame removal in claude-video, invoke the watch command with the --no-dedup flag, which sets dedup=False in the frame extraction pipeline and skips the dedupe_perceptual check.

The bradautomates/claude-video repository automatically removes visually identical frames when processing videos to reduce redundancy. By default, the watch entry point enables perceptual deduplication to collapse near-duplicate frames before analysis. You can override this behavior using the --no-dedup command-line flag to preserve every extracted frame.

How Frame Deduplication Works in claude-video

Out of the box, claude-video analyzes video streams for perceptual similarity using the dedupe_perceptual function defined in skills/watch/scripts/frames.py. This logic runs conditionally based on the dedup parameter, which defaults to True in extraction functions like extract_keyframes and extract_scene_or_uniform.

When dedup=True, the code executes conditional blocks such as:

if dedup:
    frames, n_dropped = dedupe_perceptual(frames)

These checks appear at multiple points in skills/watch/scripts/frames.py (lines 443, 560, and 665-670). This filtering prevents static or near-identical frames from cluttering the analysis output, particularly useful for videos with smooth motion or held shots.

Using the --no-dedup Flag to Disable Deduplication

The --no-dedup argument is defined in skills/watch/scripts/watch.py (lines 64-68) as a boolean flag. When present, the argument parser sets args.no_dedup to True. The script then inverts this value and passes dedup=not args.no_dedup to the frame-extraction functions (lines 212-224).

Because the extraction functions default to dedup=True, setting the flag makes the parameter False, which bypasses the dedupe_perceptual call entirely.

Default Behavior (Deduplication Enabled)

Run the watch command without flags to enable automatic duplicate removal:

watch https://example.com/video.mp4

In this mode, near-duplicate frames are collapsed and the final report includes a deduped count showing how many frames were removed.

Disable Deduplication with --no-dedup

Add the --no-dedup flag to retain all extracted frames, even visually identical ones:

watch https://example.com/video.mp4 --no-dedup

This is particularly useful for static screen recordings or presentation slides where every frame must be preserved for analysis. The final report will show deduped count 0.

Combining with Other Options

You can combine --no-dedup with extraction mode and resolution flags:

watch https://example.com/video.mp4 \
      --detail efficient \
      --resolution 720 \
      --no-dedup

This command performs efficient key-frame extraction at 720-pixel width while keeping all frames regardless of visual similarity.

When to Disable Frame Deduplication

Disable deduplication when analyzing:

  • Static screen recordings where the display does not change between frames
  • Presentation slides with long hold times on identical images
  • Low-motion video where subtle differences between similar frames matter for your analysis

The test suite in tests/test_watch.py validates this behavior through test_no_dedup_preserves_static_frames (lines 82-84), which confirms that static frames remain in the output when the flag is set. Additional unit tests in tests/test_dedup.py verify that passing dedup=False correctly skips the removal functions.

Summary

  • claude-video removes near-duplicate frames by default using dedupe_perceptual in skills/watch/scripts/frames.py.
  • The --no-dedup flag in skills/watch/scripts/watch.py (lines 64-68) inverts the boolean to set dedup=False for all extraction functions.
  • When disabled, conditional blocks at lines 443, 560, and 665-670 in frames.py skip the deduplication logic.
  • Use --no-dedup for static content or when you require frame-perfect extraction without perceptual filtering.

Frequently Asked Questions

What is frame deduplication in claude-video?

Frame deduplication is a filtering mechanism that removes visually identical or near-identical frames during video processing. According to the source code in skills/watch/scripts/frames.py, the system uses dedupe_perceptual to compare frames and drop duplicates before analysis, reducing redundant data when processing videos with static scenes or smooth motion.

Does using --no-dedup affect video quality or extraction speed?

Using --no-dedup preserves video quality by keeping all frames, but it may increase processing time and memory usage because the pipeline processes more frames. The extraction speed remains the same per frame, but the total volume of frames sent for analysis increases significantly for videos with static content or held shots.

How can I verify that deduplication is actually disabled?

Check the processing report output after running the watch command. When --no-dedup is active, the deduped count in the final report displays 0, indicating no frames were removed. You can also inspect the test test_no_dedup_preserves_static_frames in tests/test_watch.py (lines 82-84) to see how the codebase validates this behavior programmatically.

Can I disable deduplication for specific frame extraction modes only?

No, the --no-dedup flag applies globally to all frame extraction functions called during a single watch invocation. In skills/watch/scripts/watch.py (lines 212-224), the script passes the same dedup=not args.no_dedup value to extract_keyframes, extract_scene_or_uniform, and other extraction methods, ensuring consistent behavior across the entire pipeline.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →