360 Secure SkillHub
360 安全技能中心

Video Analyzer

该 Skill 提供脚本,用 ffmpeg 按视频时长自适应抽取关键帧并批量提取元数据,再由视觉分析工具理解 3–5 帧关键帧内容,输出含内容摘要与关键观察的结构化视频分析报告;支持单文件与目录批量处理,需本机已安装 ffmpeg。

safety1956
safety1956
热度 53.03
最近更新 2026-07-22 05:17:08
分类:数据依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:摘要总结 / 报告撰写 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add safety1956/video-analyzer
Metadata
name
video-analyzer
description
Analyze video files by extracting keyframes with ffmpeg and using vision to understand content. Supports single and batch processing.

Video Analyzer

Analyze video content using ffmpeg frame extraction + vision AI. Supports single files, batch processing, and structured reports.

Prerequisites

  • ffmpeg installed (pkg install ffmpeg in Termux, or apt install ffmpeg)

Scripts

extract_frames.sh

Single video frame extraction.

bash scripts/extract_frames.sh <video_path> <output_dir>

Outputs frame file paths (one per line). Density adapts to duration:

  • < 30 s → 1 frame/s, max 30
  • 30 s – 5 min → 1 frame / 5 s, max 60
  • 5 min → 1 frame / 15 s, max 40

analyze_batch.sh

Batch video processing with metadata extraction.

bash scripts/analyze_batch.sh <video_file_or_directory> [output_dir]

For each video, outputs:

  • metadata.txt — duration, resolution, codec, size
  • frame_XXX.jpg — extracted keyframes

Workflow

  1. Extract — Run the appropriate script
  2. Analyze — Pick 3–5 evenly spaced frames, pass to image tool with prompt: "Describe this video's content based on these keyframes"
  3. Report — Summarize findings in structured format

Report Template

## Video Analysis Report

**File:** <filename>
**Duration:** <duration> | **Resolution:** <WxH> | **Size:** <size>

### Content Summary
<concise description of what happens in the video>

### Key Observations
- <observation 1>
- <observation 2>
- <observation 3>

Tips

  • Clean up frames after analysis: rm -rf <output_dir>
  • Common Android video locations: /sdcard/Movies/, /sdcard/DCIM/Camera/, /sdcard/Pictures/WeiXin/, /sdcard/Pictures/QQ/
  • For audio transcription: ffmpeg -i <video> -vn -acodec pcm_s16le -ar 16000 output.wav