SuperAPI AI Directory

video-analyzer

Design & creation

View repository

Updated 10-16 09:55

About this skill

Workflow

Step 1: Clarify the anomaly description

Extract from the user message:

  1. Video file path(required)
  2. The anomaly phenomenon to look for(required) — if the user did not say, ask: "Please describe what anomaly should appear in the video? For example, value jumps, UI freeze, non-consecutive report numbers, etc."

Step 2: Extract frames

python "<SKILL_DIR>/scripts/extract.py" "<视频路径>" [--fps N] [--max-frames N]
  • <SKILL_DIR> is the absolute path of the directory where this SKILL.md is located
  • By default, extract at most 60 frames (usually enough); if the video is long or finer granularity is needed, use --max-frames to increase it
  • If the user cares about rapidly changing content (such as number jumps), you can use --fps to specify a higher frame rate (such as --fps 5)
  • The script outputs MANIFEST=<路径> one line, as well as the complete frame list

Step 3: Frame-by-frame visual analysis

Read each frame image (use the Read tool to read image files), and combined with the anomaly phenomenon described by the user, analyze the frame content:

Analysis strategy:

  • Observe frame by frame in chronological order, and record the key information of each frame (displayed values, states, UI elements)
  • Compare with the previous frame to find anomaly change points
  • For "value jump" type anomalies: record the value change sequence of each frame, and mark the jump positions
  • For "abnormal state" type: focus on whether the UI state switching conforms to logic
  • For "non-consecutive reports" type: focus on whether serial numbers, IDs, or record numbers have jumps

Efficiency tips:

  • First quickly browse the first frame, last frame, and a few middle frames to build an understanding of the frame content
  • Then perform dense analysis on suspicious areas
  • If there are many frames (>20), you can first read one frame every 3-5 frames for a rough scan, determine the approximate range, and then look closely

Step 4: Output the analysis results

Report to the user:

  1. Basic video information(duration, resolution)
  2. Frame-by-frame content summary— briefly describe the key data/state of each frame
  3. Anomalies found— accurate to the timestamp, describing "what happened from time X → time Y"
  4. Analysis conclusion— combined with the code or background provided by the user, infer possible causes

Step 5 (optional): Save the analysis report

If necessary, write the analysis conclusion to the output directory under analysis_report.md:

<视频所在目录>/video-analyzer/<视频名>/analysis_report.md

Parameter description

Parameter Description Default
--fps N Extraction frame rate; the larger N is, the denser the frames, suitable for rapidly changing content Automatic (≈ max-frames ÷ video duration)
--max-frames N Maximum number of frames to extract 60

Empirical reference:

  • 6-second video, default about 10fps → 60 frames, you can see changes every 0.1 seconds
  • 60-second video, default 1fps → 60 frames, one frame per second
  • Focus on subtle numerical changes: use --fps 5 or higher
  • Just quickly locate the approximate position: use --max-frames 20

config.json

Store only the ffmpeg path, automatically generated on first run:

{
  "ffmpeg_path": "C:/ffmpeg/bin/ffmpeg.exe"
}