Skip to content

feat: let --fps exceed the 2 fps cap on short/fast-action clips - #60

Open
mvanhorn wants to merge 2 commits into
bradautomates:mainfrom
mvanhorn:fix/37-feat-watch-short-clip-fps-override
Open

mvanhorn wants to merge 2 commits into
bradautomates:mainfrom
mvanhorn:fix/37-feat-watch-short-clip-fps-override

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Jul 9, 2026

Copy link
Copy Markdown

Summary

Let --fps exceed the 2 fps cap on short/fast-action clips.

Why this matters

/watch's frame extractor hard-caps sampling at MAX_FPS = 2.0 (frames.py:19). For a very short, fast-action clip (the reporter's example: 0.72 s, 25 fps, 18 frames of a dancer jumping toward the lens) the 2 fps cap yields only 1 frame in full mode and 2 in focused mode - far too sparse to reason about motion. Critically, the --fps override is itself clamped in watch.py (fps = min(args.fps, MAX_FPS), line 160), so even --fps 25 is ignored and the user must bypass the skill and run raw ffmpeg. The reporter verified the root cause against the code and confirmed it is not a duplicate of any of the 11 existing issues. The 2 fps cap is the correct default for long videos; the gap is

Testing

Changes are scoped to the files named in the fix; added or updated tests where the project has a suite, and matched existing conventions.

Fixes #37

abe238 added a commit to abe238/claude-video-plus that referenced this pull request Jul 18, 2026
…anged)

L2 of the competitive plan (docs/plans/COMPETITIVE-PLAN-2026-07.md). Contract
tests written red-first; 23 pass; default engine byte-identical.

- RGB max-channel changed-cell comparator (_changed_cell_pct): sees equal-luma
  color cuts and caption swaps that grayscale mean-diff is blind to; grain
  stays collapsed. Fail-open on length mismatch, same as v1.
- Sliding-window dedup (N=4) with a 90s time horizon: A-B-A cutaways collapse,
  a genuine return to a shot beyond the horizon is kept. Deferred deletion so
  the floor can reinstate.
- Density floor as post-dedup gap-fill: bounded to 30% of the cap, interval
  auto-widens (span/max_fill) so it can never starve scene selection; scoped
  to full-video scene runs (focused ranges and uniform fallback are already
  dense/even).
- --fps opt-out: an explicit fps above 2 is honored (upstream's most-requested
  capability, PR bradautomates#60/bradautomates#37), unified across watch.py and the frames.py
  standalone (which was previously unclamped-but-unvalidated); nonpositive
  rejected; auto-fps stays capped; frame budget still bounds output.

Prior art for the mechanism ideas: HUANGCHIHHUNGLeo/claude-real-video (MIT),
reimplemented, no code copied. Post-implementation Codex review
(CONTINUE-WITH-CHANGES) hardening folded: exact-horizon boundary,
non-tautological fill budget, partition-level keep/drop, delete/reindex
contract test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZ9hZUyojD9f2fQ53yhVWh
Upstream rewrote watch.py, README.md and SKILL.md, so this takes upstream's
versions and re-applies the change: an explicit --fps on a clip or range of
5 seconds or less is no longer clamped to 2 fps. extract() now applies the
same rule, since it caps the uniform sampling rate itself. Adds a test that
extract keeps a 5 fps override on a 3 second clip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sub-second / fast-action clips: 2 fps hard cap yields 1–2 frames, no all-frames mode

1 participant