Token导航 LogoToken导航

Agent Skill · 研究检索

scikit-video(scikit 视频)

用于辅助视频生成、动画合成、脚本化剪辑或 Remotion 等视频项目开发。它适合让 Agent 组织镜头、生成素材说明、维护合成代码或排查渲染问题。使用时需要确认分辨率、时长、素材路径和导出格式;涉及外部素材、人物肖像或商业发布时,应先核对版权授权和内容审核要求。

scikit-video 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 62,244。

总安装 339周安装 14GitHub Stars 9下载 111核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:scikit-video(scikit 视频)
来源仓库:https://github.com/tondevrel/scientific-agent-skills
仓库路径:skills/scikit-video
安装命令:
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill scikit-video
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill scikit-video

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助视频生成、动画合成、脚本化剪辑或 Remotion 等视频项目开发,适合让 Agent 组织镜头或维护合成代码。适用于多媒体内容制作、教育视频、演示动画等需要时序编排的场景。

通过安装命令 npx skills add https://github.com/tondevrel/scientific-agent-skills --skill scikit-video 添加,需确认权限范围和维护状态。使用时需确认分辨率、时长、素材路径和导出格式;涉及外部素材或人物肖像时应核对版权授权。

建议结合原始 README 进一步核验具体用法和功能边界。

来源仓库内路径:skills/scikit-video

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tondevrel/scientific-agent-skills --skill scik…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

scikit-video 怎么安装?

在终端执行 npx skills add https://github.com/tondevrel/scientific-agent-skills --skill scikit-video。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

scikit-video 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

scikit-video 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/tondevrel/scientific-agent-skills --skill scikit-video 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

scikit-video 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

scikit-video 用的人多吗?

公开数据是累计安装 339 次,近一周安装 14 次,下载 111 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

scikit-video 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
scikit-video

scikit 视频 · 本页

3399执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

scikit-video - Scientific Video Processing

scikit-video simplifies the complex world of video codecs and containers by providing a consistent NumPy-based interface. It allows for the calculation of motion vectors, video quality assessment (VQA), and seamless integration with the rest of the scientific Python stack.

When to Use

  • Reading and writing video files in various formats (MP4, AVI, MKV) via FFmpeg.
  • Extracting specific frames or segments from long videos without loading them entirely into memory.
  • Calculating motion estimation (Block Matching, Optical Flow).
  • Measuring video quality (PSNR, SSIM, VIF, NIQE).
  • Generating video datasets for machine learning.
  • Visualizing temporal changes in pixel data (e.g., scientific recordings).
  • Handling raw YUV data streams.

Reference Documentation

Official docs: http://www.scikit-video.org/ GitHub: https://github.com/scikit-video/scikit-video Search patterns: skvideo.io.vread, skvideo.io.FFmpegReader, skvideo.motion, skvideo.measure

Core Principles

Video as 4D Arrays

A video is represented as a NumPy array with shape (T, H, W, C):

  • T: Time (number of frames)
  • H: Height
  • W: Width
  • C: Channels (usually 3 for RGB)

FFmpeg Backend

Scikit-video does not contain its own codecs; it is a bridge to FFmpeg. You must have FFmpeg installed on your system for skvideo.io to function.

Generators for Large Data

For long videos, scikit-video provides generator-based readers (vreader) to process frames one by one, preventing RAM exhaustion.

Quick Reference

Installation

pip install scikit-video
# Note: Ensure ffmpeg is in your system PATH

Standard Imports

import skvideo.io
import skvideo.motion
import skvideo.measure
import numpy as np

Basic Pattern - Read and Inspect

import skvideo.io

# 1. Read the whole video into a NumPy array
# Shape: (frames, height, width, 3)
video_data = skvideo.io.vread("experiment.mp4")

# 2. Get basic info
n_frames, height, width, channels = video_data.shape
print(f"FPS: {n_frames / 10}, Resolution: {width}x{height}")

# 3. Access a specific frame
frame_10 = video_data[10]

Critical Rules

✅ DO

  • Use vreader for large files - Always use generator-based reading for high-resolution or long videos.
  • Set num_frames - If you know the number of frames you need, specify it to avoid unnecessary scanning.
  • Check FFmpeg path - Use skvideo.setFFmpegPath() if FFmpeg is installed in a non-standard location.
  • Normalize for Metrics - Ensure pixel values are in the range expected by skvideo.measure (usually [0, 255] for uint8).
  • Use vwrite for simple output - It handles the complex FFmpeg command-line arguments for you.
  • Consider YUV - When working with raw transmission data, use the specific YUV reading capabilities.

❌ DON'T

  • Load 4K video with vread - A 1-minute 4K video will exceed most RAM capacities.
  • Ignore the inputdict and outputdict - These allow you to pass specific flags to FFmpeg (like bitrate, pixel format, or codec).
  • Assume RGB order - Always verify the channel order after reading, especially if using external codecs.
  • Process video without Denoising - Video noise can ruin motion estimation; apply spatial or temporal filters first.

Anti-Patterns (NEVER)

import skvideo.io

# ❌ BAD: Loading a massive file at once
# video = skvideo.io.vread("huge_4k_recording.mp4") # CRASH!

# ✅ GOOD: Processing frame by frame
reader = skvideo.io.vreader("huge_4k_recording.mp4")
for frame in reader:
    # Process frame
    pass

# ❌ BAD: Manual frame writing in a loop with manual codec setup
# (Fragile and complex)

# ✅ GOOD: Use FFmpegWriter
writer = skvideo.io.FFmpegWriter("output.mp4")
for frame in processed_frames:
    writer.writeFrame(frame)
writer.close()

# ❌ BAD: Relying on system default FFmpeg without checking
# ✅ GOOD: Verify backend
# print(skvideo._HAS_FFMPEG)

Reading and Writing (skvideo.io)

Advanced Video I/O

import skvideo.io

# 1. Reading with specific FFmpeg options
input_parameters = {
    "-ss": "00:00:10", # Start at 10 seconds
    "-t": "5"          # Duration 5 seconds
}
video = skvideo.io.vread("video.mp4", inputdict=input_parameters)

# 2. Writing with specific bitrate and codec
output_parameters = {
    "-vcodec": "libx264",
    "-b:v": "5000k", # 5 Mbps bitrate
    "-pix_fmt": "yuv420p"
}
skvideo.io.vwrite("output.mp4", video, outputdict=output_parameters)

Motion Estimation (skvideo.motion)

Calculating Movement

from skvideo.motion import blockMotion
from skvideo.io import vread

# Load two consecutive frames
video = vread("video.mp4")
frame1 = video[0]
frame2 = video[1]

# Block matching algorithm
# Returns motion vectors for each block
motion_vectors = blockMotion(frame1, frame2, method='DS', mbSize=16)

# motion_vectors shape: (H/mbSize, W/mbSize, 2)
# The last dimension contains (dy, dx) offsets

Video Quality Assessment (skvideo.measure)

Measuring Degradation

from skvideo.measure import psnr, ssim, mse

# Compare original and compressed video
original = vread("original.mp4")
distorted = vread("compressed.mp4")

# Calculate metrics frame by frame
psnr_scores = psnr(original, distorted)
ssim_scores = ssim(original, distorted)

print(f"Average PSNR: {np.mean(psnr_scores)}")

Datasets and Utilities

Using Internal Datasets

import skvideo.datasets

# Load a built-in sample video (useful for testing)
path = skvideo.datasets.bigbuckbunny()
reader = skvideo.io.vreader(path)

Practical Workflows

1. Simple Background Subtraction Pipeline

def extract_background(video_path):
    """Calculates the static background of a video using the median."""
    reader = skvideo.io.vreader(video_path)
    frames = []
    # Sample every 10th frame to save memory
    for i, frame in enumerate(reader):
        if i % 10 == 0:
            frames.append(frame)
        if len(frames) > 50: break

    # Background is the median of frames
    background = np.median(np.array(frames), axis=0).astype(np.uint8)
    return background

# Usage
# bg = extract_background("security_cam.mp4")

2. Video Stabilization (Frame Alignment)

def stabilize_frames(video_array):
    """Very basic stabilization using motion vectors."""
    stabilized = [video_array[0]]
    for i in range(1, len(video_array)):
        motion = skvideo.motion.blockMotion(video_array[i-1], video_array[i])
        avg_motion = np.mean(motion, axis=(0, 1)) # Global drift
        # Translate frame back (Simplified logic)
        # Use scipy.ndimage.shift for actual translation
        ...

3. Automated Video Quality Report

def generate_vqa_report(ref_path, test_path):
    ref = skvideo.io.vread(ref_path)
    test = skvideo.io.vread(test_path)

    report = {
        "MSE": np.mean(skvideo.measure.mse(ref, test)),
        "PSNR": np.mean(skvideo.measure.psnr(ref, test)),
        "SSIM": np.mean(skvideo.measure.ssim(ref, test))
    }
    return report

Performance Optimization

Using vreader with Multi-threading

If you are doing heavy processing on each frame, use a queue-based multi-threading approach to keep the FFmpeg pipe full.

Efficient Slicing

Instead of vread and then slicing, use FFmpeg's seek and duration flags via inputdict to only read the data you need from the disk.

Common Pitfalls and Solutions

FFmpeg Not Found

Scikit-video relies on the ffmpeg executable.

# ✅ Solution: Manually set the path if it's not in environment
import skvideo
skvideo.setFFmpegPath("C:/ffmpeg/bin")

Color Space Mismatches

Some videos are stored in YUV422 or YUV444. Scikit-video converts these to RGB by default.

# ❌ Problem: Colors look washed out or incorrect
# ✅ Solution: Specify the pixel format in inputdict
reader = skvideo.io.vreader("video.mp4", inputdict={"-pix_fmt": "yuv420p"})

Out of Memory (OOM) Errors

Even with vreader, if you store all frames in a list, you will run out of memory.

# ❌ Problem: frames.append(frame) in a loop
# ✅ Solution: Process and save to disk, or clear the list periodically.

scikit-video brings the power of FFmpeg into the NumPy world. By abstracting the complexities of video containers and providing scientific analysis tools like motion estimation and quality metrics, it is an essential tool for any researcher working with temporal image data.

平台分布

Codex

37.44%
按下载量换算42

Claude

30.8%
按下载量换算34

Cursor

18.19%
按下载量换算20

Gemini CLI

9.37%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/tondevrel/scientific-agent-skills --skill scikit-video 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills