Token导航 LogoToken导航TokenDH.com
前端设计权限需确认github未标认证来源可访问许可证需确认审计异常

video-frames视频帧

Agent Skill

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

总安装

815

周安装

35

GitHub Stars

公开资料未说明

下载量

286
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/winsorllc/upgraded-carnival --skill video-frames

简介

用于辅助视频生成、动画合成或 Remotion 项目开发。

  • 可组织镜头、生成素材说明、维护合成代码或排查渲染问题。
  • 使用时需确认分辨率、时长、素材路径和导出格式。
  • 安装命令:npx skills add https://github.com/winsorllc/upgraded-carnival --skill video-frames。
  • 涉及外部素材或人物肖像时,应先核对版权授权要求。

SKILL.md

Video-Frames Skill

Production-grade video frame extraction with comprehensive quality control, progress tracking, and safety limits.

When to Use

USE this skill when:

  • Extracting specific frames from videos at timestamps
  • Creating thumbnail grids/contact sheets for video overview
  • Generating animated GIFs from video segments
  • Batch extracting frames at intervals (e.g., every N seconds)
  • Creating video previews or storyboards
  • Needing pixel-perfect frame access by index
  • Extracting frames at specific quality levels

DON'T use this skill when:

  • Simple format conversion → Use ffmpeg-tools
  • Video editing (effects) → Use video editor
  • Real-time frame capture → Use streaming tools
  • Video capture from camera → Use camsnap
  • Image generation → Use image-gen

Prerequisites

# Install FFmpeg
brew install ffmpeg        # macOS
sudo apt install ffmpeg    # Ubuntu/Debian

# Optional: Install ImageMagick for better grid generation
brew install imagemagick   # macOS
sudo apt install imagemagick   # Ubuntu

# Verify installation
ffmpeg -version
ffprobe -version

Commands

1. Extract Single Frame

Extract a single frame at a specific time or by frame index.

# Extract frame at timestamp
{baseDir}/video-frames.js frame video.mp4 --time 30 --out frame.jpg
{baseDir}/video-frames.js frame video.mp4 --time 00:02:30 --out frame.jpg
{baseDir}/video-frames.js frame video.mp4 --time 150.5 --out frame.jpg

# Extract by frame index
{baseDir}/video-frames.js frame video.mp4 --index 0 --out first-frame.jpg
{baseDir}/video-frames.js frame video.mp4 --index 1000 --out frame-1000.jpg

# With quality settings
{baseDir}/video-frames.js frame video.mp4 --time 30 --format png --out high-quality.png
{baseDir}/video-frames.js frame video.mp4 --time 30 --quality 1 --out best-quality.jpg
{baseDir}/video-frames.js frame video.mp4 --time 30 --format jpg --quality 2

Time Formats:

FormatExampleDescription
Seconds30Simple seconds
MM:SS2:30Minutes:Seconds
HH:MM:SS00:02:30Full timecode
Decimal90.5Millisecond precision

Quality Settings (JPEG):

ValueQualityFile SizeUse Case
1BestLargeArchival, quality preservation
2-3HighMediumDefault, good balance
5MediumSmallWeb, quick preview
10+LowVery smallDraft, thumbnail

Supported Formats:

  • jpg/jpeg - Web optimized, compression
  • png - Lossless, transparency, best quality
  • bmp - Uncompressed raw
  • tiff - Professional formats
  • webp - Next-gen web format

2. Extract Multiple Frames

Batch extract frames at regular intervals.

# Extract 1 frame per second
{baseDir}/video-frames.js frames video.mp4 --fps 1

# Extract specific segment
{baseDir}/video-frames.js frames video.mp4 --fps 1 --start 00:01:00 --duration 60
{baseDir}/video-frames.js frames video.mp4 --fps 5 --start 30 --duration 120

# Higher quality extraction
{baseDir}/video-frames.js frames video.mp4 --fps 1 --quality 1 --prefix keyframe

# Resize during extraction
{baseDir}/video-frames.js frames video.mp4 --fps 1 --width 1920 --quality 1

Frame Rate Options:

RateDescriptionUse Case
--fps 11 frame/secondTimeline extraction
--fps 55 frames/secondDetailed analysis
--fps 0.1Every 10 secondsOverview, storyboard
--fps 0.5Every 2 secondsModerate detail

Output:

/tmp/frames_1234567890/
  ├── frame_00001.jpg
  ├── frame_00002.jpg
  ├── frame_00003.jpg
  └── ...

3. Generate Thumbnail Grid (Contact Sheet)

Create a grid of thumbnails for video overview.

# Basic grid
{baseDir}/video-frames.js grid video.mp4 --output grid.jpg

# Custom size and layout
{baseDir}/video-frames.js grid video.mp4 --count 16 --columns 4 --width 480 --out grid.jpg

# Compact preview
{baseDir}/video-frames.js grid video.mp4 --count 20 --columns 5 --width 320 --out overview.jpg

# High resolution grid
{baseDir}/video-frames.js grid video.mp4 --count 9 --columns 3 --width 640 --format png --out detailed.png

Grid Layout Examples:

CountColumnsRowsBest For
422Quick preview
933Standard overview
1243Detailed timeline
1644Comprehensive storyboard
2054Long videos

Output Format:

+---+---+---+---+
| 1 | 2 | 3 | 4 |    <- 5 seconds into video
+---+---+---+---+
| 5 | 6 | 7 | 8 |    <- 25 seconds into video
+---+---+---+---+
| 9 |10 |11 |12 |    <- 45 seconds into video
+---+---+---+---+

4. Create Animated GIF

Extract video segment as animated GIF.

# Basic GIF (5 seconds from start)
{baseDir}/video-frames.js gif video.mp4 --output clip.gif

# Specific time and duration
{baseDir}/video-frames.js gif video.mp4 --start 00:01:30 --duration 5 --out highlight.gif
{baseDir}/video-frames.js gif video.mp4 --start 30 --duration 10 --out segment.gif

# Quality presets
{baseDir}/video-frames.js gif video.mp4 --start 60 --duration 3 --preset fast --out quick.gif
{baseDir}/video-frames.js gif video.mp4 --start 60 --duration 3 --preset quality --out smooth.gif
{baseDir}/video-frames.js gif video.mp4 --start 60 --duration 3 --preset cinematic --out cinema.gif

# Custom parameters
{baseDir}/video-frames.js gif video.mp4 --start 30 --duration 5 --fps 30 --width 720 --out preview.gif

GIF Presets:

PresetFPSWidthColorsSizeBest For
fast15480px128SmallQuick generation
balanced20640px256MediumDefault
quality24720px512LargeSmooth motion
cinematic301080px1024Very largeMaximum quality

Max Duration: 300 frames (~10 seconds at 30fps)

5. Get Video Information

Display detailed video metadata.

{baseDir}/video-frames.js info video.mp4

Output:

{
  "stats": { "size": 1234567890, "mtime": "..." },
  "duration": 3665,
  "width": 1920,
  "height": 1080,
  "fps": 29.97,
  "totalFrames": 109785,
  "info": { ... }  // Full ffprobe output
}

Progress Tracking

Operations display real-time progress:

⏳ Extracting frames: 15/30 (50.0%) | Elapsed: 12.3s
⏳ Generating thumbnails: 8/12 (66.7%) | Elapsed: 5.2s

Safety Features

Limits

LimitValueDescription
Max Video Size50 GBInput file size limit
Max Duration4 hoursVideo length limit
Max Frames1,000Batch frame extraction
Max Grid Size60 thumbnailsContact sheet limit
Max GIF Frames300Animated GIF limit
Timeout30 minutesDefault operation timeout

Video Validation

Before processing, the skill validates:

  • File exists and is readable
  • File size within limits
  • Valid video format
  • Duration within limits
  • Contains video stream
  • Not corrupted

Error Handling

Error Codes

CodeNameDescription
0SUCCESSOperation completed
1INVALID_INPUTMissing/invalid parameters
2FILE_NOT_FOUNDVideo not found
3INVALID_FORMATUnsupported format
4INVALID_TIME_RANGEInvalid timestamp
5FFMPEG_ERRORFFmpeg execution failed
6OUT_OF_MEMORYMemory limit exceeded
7TIMEOUTOperation timed out
8INTERRUPTEDUser interrupted
9PERMISSION_DENIEDCannot read/write
10VALIDATION_FAILEDVideo validation failed
99UNKNOWNUnexpected error

Common Scenarios

Frame Index Out of Range:

{baseDir}/video-frames.js frame video.mp4 --index 999999
# ❌ ERROR: Frame index 999999 out of range (0-109784)

Timestamp Beyond Video:

{baseDir}/video-frames.js frame video.mp4 --time 10000
# ❌ ERROR: Timestamp 02:46:40 out of range (0-01:01:05)

Too Many Frames:

{baseDir}/video-frames.js frames video.mp4 --fps 100
# ❌ ERROR: Too many frames requested: 366500 (max: 1000)

Large GIF Request:

{baseDir}/video-frames.js gif video.mp4 --duration 60 --fps 60
# ❌ ERROR: GIF too long: 3600 frames (max: 300)

Technical Details

Frame Extraction Methods

  1. Segment Seek (-ss before -i)

- Fast frame access - Use for --time option - Slight accuracy trade-off at start

  1. Frame Selection (-vf select)

- Precise frame index extraction - Slower but frame-accurate - Use for --index option

  1. Extract at Interval (fps filter)

- Efficient batch extraction - Frame-rate conversion - Use for batch operations

Quality Settings

JPEG Quality (CRF - Constant Rate Factor):

-q:v 1  -> 100% quality (best, largest)
-q:v 2  -> ~95% quality (default)
-q:v 5  -> ~85% quality (web)
-q:v 10 -> ~70% quality (low)
-q:v 31 -> ~10% quality (minimum)

PNG Output:

  • Always lossless
  • Larger file sizes
  • Best for archival
  • Transparent backgrounds supported

Scaling (Lanczos):

-vf scale=320:-2:flags=lanczos
  • Lanczos resampling for best quality
  • -2 ensures even dimensions (encoding requirement)
  • Maintains aspect ratio

GIF Optimization

Palette Generation:

  1. Parse video segment
  2. Generate optimal 256-color palette
  3. Apply palette to all frames
  4. Dithering for smooth gradients

File Size Optimization:

  • Fixed frame rate
  • Limited color palette
  • Resizing before encoding
  • Optimized encoding settings

Examples

Video Storyboard Creation

#!/bin/bash
VIDEO="movie.mp4"
OUTDIR="storyboard"

mkdir -p $OUTDIR

# Create overview grid
echo "Creating overview grid..."
{baseDir}/video-frames.js grid "$VIDEO" --count 20 --columns 5 --width 480 --out "$OUTDIR/overview.jpg"

# Extract key frames every minute
echo "Extracting key frames..."
{baseDir}/video-frames.js frames "$VIDEO" --fps 0.0167 --prefix key --out "$OUTDIR/"

# Create chapter thumbnails
echo "Creating chapter thumbnails..."
for time in 0:00 10:00 20:00 30:00; do
  {baseDir}/video-frames.js frame "$VIDEO" --time $time --quality 1 --out "$OUTDIR/chapter_${time//:/}.png"
done

echo "Storyboard complete in $OUTDIR/"

Video Preview Gallery

#!/bin/bash
for video in *.mp4; do
  echo "Processing: $video"

  # Create 3x3 grid
  {baseDir}/video-frames.js grid "$video" --count 9 --columns 3 --width 640 --out "${video%.*}-grid.jpg"

  # Create 5-second preview GIF
  {baseDir}/video-frames.js gif "$video" --start 30 --duration 5 --preset balanced --out "${video%.*}-preview.gif"

done

Extract Frames Every N Seconds

# Extract frame at beginning of every minute
for i in {0..60}; do
  {baseDir}/video-frames.js frame video.mp4 --time $((i*60)) --out "frames/minute_${i}.jpg"
done

# Shell script for batch extraction
extract_frames() {
  local video="$1"
  local interval="${2:-10}"  # default 10 seconds
  local duration
  duration=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$video")

  for ((t=0; t<duration; t+=interval)); do
    {baseDir}/video-frames.js frame "$video" --time $t --out "frames/frame_${t}.jpg"
  done
}

High-Quality Thumbnail Generation

# Best quality single frame
{baseDir}/video-frames.js frame video.mp4 \
  --time 10 \
  --format png \
  --width 1920 \
  --out thumbnail.png

# Best quality grid
{baseDir}/video-frames.js grid video.mp4 \
  --count 9 \
  --columns 3 \
  --width 640 \
  --format png \
  --out grid.png

Performance Tips

1. Use JPEG for Speed

JPEG encoding is faster than PNG:

{baseDir}/video-frames.js frame video.mp4 --format jpg  # Faster
{baseDir}/video-frames.js frame video.mp4 --format png  # Better quality, slower

2. Lower Quality for Drafts

# Quick preview
{baseDir}/video-frames.js grid video.mp4 --count 9 --width 320  # Small, fast

# Final quality
{baseDir}/video-frames.js grid video.mp4 --count 16 --width 640  # Higher detail

3. Parallel Processing

# Process multiple videos in parallel
{baseDir}/video-frames.js grid video1.mp4 --out g1.jpg &
{baseDir}/video-frames.js grid video2.mp4 --out g2.jpg &
{baseDir}/video-frames.js grid video3.mp4 --out g3.jpg &
wait

4. Resize During Extraction

Better than extracting full size then scaling:

# Good
{baseDir}/video-frames.js frame video.mp4 --width 320 --out thumb.jpg

# Less efficient
{baseDir}/video-frames.js frame video.mp4 --out full.jpg
# Then resize externally

Notes

  • Grid generation uses ImageMagick when available (better quality), FFmpeg tile filter otherwise
  • Frame index 0 is always the first frame of the video
  • Timestamps are rounded to nearest frame based on video FPS
  • GIFs are optimized with 256-color palette for balance of quality and size
  • PNG transparency is preserved (useful for overlays)
  • All operations clean up temporary files automatically
  • JSON output enables programmatic integration
  • Grid thumbnails include timestamps at video intervals

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.35%
按下载量换算107

Claude

32.53%
按下载量换算93

Cursor

17.47%
按下载量换算50

Gemini CLI

9.59%
按下载量换算27

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills