Skip to content

feat(vision-replay): video normalization, smart dedup, and static ffmpeg - #1

Merged
mrrobertkent merged 3 commits into
mainfrom
feat/frame-dedup
Mar 3, 2026
Merged

mrrobertkent merged 3 commits into
mainfrom
feat/frame-dedup

Conversation

@mrrobertkent

Copy link
Copy Markdown
Owner

Summary

  • normalize-video.sh (new): Downscales high-res recordings (retina, mobile, tablet) to max 1920px longest side while preserving aspect ratio. Burns white timestamp overlay (top-left) into frames before deduplication so timing gaps are visible in final output.
  • dedupe-video.sh (rewritten): VFR 120fps normalization for screen recorder compatibility, profile-based sensitivity with hi/lo/frac tuning (threshold 1=animation, 3=page-load, 15=workflow), lime green deduped timestamp overlay (top-right) providing dual-timestamp frames.
  • setup.sh: Drawtext filter detection, architecture-aware static ffmpeg download from martin-riedl.de (macOS ARM64/Intel, Linux amd64/arm64), auto-install via --yes flag. Replaces brew install ffmpeg which lacks drawtext support.
  • Pipeline reorder: normalize → dedup → extract. Timestamps are burned in before dedup so agents can see original timing in deduped output.
  • Question Template 8: Workflow review animation sensitivity selection for dedup threshold tuning.
  • README/AGENTS.md/.cursor/rules: Updated prerequisites (static builds), new pipeline steps, dedup threshold table.
  • Version bump: 1.0.5 → 1.1.0

Why static ffmpeg builds?

The Homebrew core ffmpeg formula does not include libfreetype/harfbuzz — the drawtext filter is unavailable. The homebrew-ffmpeg/ffmpeg tap requires specific Python versions that conflict with user environments. Static builds from martin-riedl.de are self-contained binaries with all filters included, signed and notarized for macOS.

Test plan

  • bash tests/test-scripts.sh --check-ffmpeg — 30/30 pass
  • Full pipeline: normalize → dedup (threshold 1) → contact-sheet → extract-frames → cleanup
  • Dedup threshold 1 preserves more frames than threshold 15 (80% vs 90% reduction)
  • Version 1.1.0 in both plugin.json and marketplace.json
  • No skills/record-browser/ files included (stashed for separate branch)

Merge note: Please use Squash and merge to collapse iterative development commits into a single clean commit.

Add dedupe-video.sh script that removes static/unchanged frames from
video files using ffmpeg mpdecimate filter. Integrated as Step 2 in the
universal pipeline between metadata and contact sheet generation.

Supports --pre-deduped flag so other skills (e.g., future record-browser)
can signal that deduplication was already performed.

Updated SKILL.md, AGENTS.md, Cursor rules, and tests (24/24 pass).
… and dual timestamps

- Add normalize-video.sh: downscale high-res recordings + burn timestamp overlay
- Rewrite dedupe-video.sh: VFR 120fps normalization, profile-based sensitivity tuning,
  deduped timeline overlay (dual timestamps: original white + deduped lime green)
- Add Template 8 for workflow review animation sensitivity
- Update setup.sh to detect drawtext and download static ffmpeg builds from martin-riedl.de
- Update pipeline ordering: normalize -> dedup -> extract (timestamps before dedup)
- Update README with static build instructions and new pipeline steps
- Bump version to 1.1.0
Replace grep -q with grep > /dev/null in drawtext filter checks. With
set -o pipefail, grep -q exits immediately on match, sending SIGPIPE
to the upstream ffmpeg process, causing the pipe to return exit code 141.
@mrrobertkent
mrrobertkent merged commit a323b65 into main Mar 3, 2026
4 checks passed
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.

1 participant