video-screenshot

Extract and deduplicate keyframes from screen recordings for legal evidence review.

636|91|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/cat-xierluo/legal-skills --skill video-screenshot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: video-screenshot
Source: https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-screenshot
Command: npx skills add https://github.com/cat-xierluo/legal-skills --skill video-screenshot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, rapidocr-onnxruntime, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Screen recordings of chat histories, social media, and web pages used as legal evidence often contain hundreds of redundant, blurry, or transitional frames, making manual review slow and error-prone. This Skill extracts high-recall keyframes locally, filters transition and loading frames, and produces traceable evidence lead indexes without uploading sensitive footage to the cloud.

Core Features & Use Cases

  • Bounded high-recall frame extraction: Uses ffmpeg scene detection plus temporal clustering, SSIM/dHash deduplication, scroll-overlap merging, and optional offline RapidOCR content-delta protection to keep frames containing new amounts, IDs, or text.
  • Non-destructive evidence lead ranking: Generates a privacy-preserving evidence index and contact sheets classifying frames into closed categories (parties, transactions, communications, public statements) without storing OCR raw text.
  • Budgeted multimodal audit with safety gates: Prepares small audit packages (max 8 groups/24 images, or a weak-model profile) where deletions only apply when confidence, local risk signals, and coverage-frame survival checks all pass; failures roll back transactionally.
  • Use Case: A lawyer has a 3.5-minute screen recording of a WeChat conversation. The Skill reduces 411 candidate frames to about 54 traceable evidence screenshots with SHA256 hashes, then produces a curated subset via visual audit without ever modifying the base frames.

Quick Start

Extract key evidence frames from my screen recording chat-log.mp4 and generate a deduplicated, traceable screenshot set with an evidence lead index.

Frequently Asked Questions about video-screenshot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract keyframes from a screen recording video?

Run the extract script with ffmpeg-based scene detection: uv run scripts/extract.py -i <video path>. It generates high-recall candidates, applies temporal clustering and image deduplication, and writes frames plus a _report.json with timestamps and SHA256 hashes.

How to deduplicate screenshots from chat history recordings?

The pipeline chains SHA256, dHash, pixel difference, SSIM, scroll merging, and optional OCR text comparison to remove duplicates. For text-heavy recordings, add --ocr-dedup with rapidocr-onnxruntime so frames containing new amounts or IDs are protected from deletion.

Does video frame extraction work offline without cloud upload?

Yes, frame extraction and OCR run fully offline using local ffmpeg and RapidOCR. Only the optional multimodal audit step sends contact sheets to whatever model provider you use, so review its privacy policy before processing unsanitized evidence.

What video formats are supported for screenshot extraction?

Supported inputs are .mp4, .mov, .avi, .mkv, .webm, .flv, .wmv, and .ts files. The tool requires ffmpeg 5.0 or later and Python 3.10 or later installed on macOS or Linux.

Why does OCR mode keep more frames than pure visual mode?

OCR content-delta protection preserves frames where new amounts, long IDs, or substantial text appear, even if they look visually similar to neighbors. Frame count alone is not the accuracy goal; evidence completeness takes priority.

When should I not use this screen recording extraction approach?

Do not use it for video compression, video editing, audio extraction, or legal admissibility determinations. The evidence lead layer only ranks and classifies visible content; it never assesses authenticity, legality, or probative value.