evo-video-sampling

SkillFiles & storage

Extracts frames from an MP4 video file at a specified target FPS using sequential reading. Returns sampled grayscale frames and their original frame indices.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the evo-video-sampling skill

What this skill tells your AI

The instructions your AI receives, as published by openlair/openskill in tasks-evolved/dynamic-object-aware-egomotion/environment/skills/evo-video-sampling/SKILL.md and read by ahel’s review.

Extracts frames from an MP4 video at a target FPS using reliable sequential reading (avoids unreliable CAP_PROP_POS_FRAMES seeking in compressed MP4s).

Key Function

  • sample_video_frames(video_path, target_fps=6) — Returns (sampled_frames, frame_indices, original_fps)
    • sampled_frames: list of grayscale np.uint8 2D arrays
    • frame_indices: list of original frame indices (0-based)
    • original_fps: the video's native FPS

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-video-sampling/scripts')
from utils import sample_video_frames

frames, indices, fps = sample_video_frames('/root/input.mp4', target_fps=6)
print(f"Sampled {len(frames)} frames from video at {fps} FPS")

Implementation Details

  • Uses cv2.VideoCapture with sequential read() loop (no seeking)
  • Frame step = max(1, int(round(original_fps / target_fps)))
  • Converts BGR to grayscale immediately via cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  • Fallback FPS of 30.0 if CAP_PROP_FPS returns <= 0

Signals

GitHub stars
91
Forks
4
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
evo-video-sampling
Source
github.com/openlair/openskill