frame-sampling

Extract and sample frames from video streams using OpenCV.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/bettercallfan/deerflow --skill frame-sampling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frame-sampling
Source: https://github.com/bettercallfan/deerflow/tree/main/skills/custom/video_surveillance/frame-sampling
Command: npx skills add https://github.com/bettercallfan/deerflow --skill frame-sampling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of extracting and sampling frames from video streams, saving time and effort in video analysis tasks.

Core Features & Use Cases

  • Frame Extraction: Extracts frames from video streams or segments.
  • Sampling Strategy: Supports interval, fps, keyframe, and adaptive sampling strategies.
  • Output Schema: Generates stable frame IDs and returns Frame schema records.
  • Use Case: Ideal for use in video surveillance or any scenario where frame sampling from a video stream is required.

Quick Start

To sample frames from a video file 'input.mp4', use the frame-sampling skill with the following command:

python frame-sampling/scripts/run.py --video input.mp4 --camera-id CAM_DEERFLOW_001 --capture-seconds 10 --interval-seconds 1 --output-dir ./output --config config.json --output frames.json

Frequently Asked Questions about frame-sampling

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

FAQPage Schema
How do I extract frames from a video stream using OpenCV?

You can extract frames from video streams by providing the raw segment URI and camera ID to this Skill. It uses OpenCV to process the video and applies your chosen sampling strategy to generate stable frame IDs and Frame schema records.

What video frame sampling strategies can I use for surveillance content analysis?

For video surveillance and content analysis, supported frame sampling strategies include interval, fps, keyframe, and adaptive sampling. You select the desired strategy when configuring the extraction parameters to control how frames are captured from the stream.

How do I generate a frame schema from a video file?

To generate a frame schema from a video file, run the extraction script with the video path, camera ID, and capture seconds. The Skill processes the video and outputs structured JSON records containing stable frame IDs and metadata for each sampled frame.

Do I need to install dependencies to sample keyframes from a video segment?

No external dependencies are required by the Skill itself to sample keyframes from a video segment. However, since it utilizes OpenCV for video processing, your environment must have OpenCV available to execute the frame extraction scripts successfully.

What inputs are required to start sampling frames from video streams?

Required inputs to start sampling frames include camera_id, raw_segment_uri, source_type, sampling_strategy, and capture_seconds. You can also provide optional frame records to generate a complete frame schema for your video surveillance workflow.