Overview

Requires Python 3.11+, ffmpeg/ffprobe. compile_report.py also needs tesseract. No local vision model or Ollama required — frame image analysis is performed by the agent using the skill. Run scripts via `uv run`.

Recipes

Copy-paste command sequences agents can run via uv run.

interval frames for text / forced narrative
# 1. Extract 1 frame per second
uv run scripts/extract_interval_frames.py --input program.mp4

# 2. For each batch: get paths, analyze images yourself, write batch JSON
uv run scripts/get_frame_batch.py --manifest-path .mediaskills/generated/program_interval_frames.json --batch-index 0

# 3. After analyzing images in batch 0, merge your JSON
uv run scripts/merge_analysis.py \
  --manifest-path .mediaskills/generated/program_interval_frames.json \
  --frames-json batch0_analysis.json

# 4. Repeat step 2–3 for batch-index 1, 2, ... until all frames analyzed

# 5. Required validation (do not skip before reports)
uv run scripts/validate_analysis.py --analysis-path .mediaskills/generated/program_frame_analysis_....json

# 6. Reports
uv run scripts/text_on_screen_report.py --analysis-path .mediaskills/generated/program_frame_analysis_....json
uv run scripts/forced_narrative_report.py --analysis-path .mediaskills/generated/program_frame_analysis_....json
shot-based analysis (graphics, title cards)
# 1–2. From shots skill: detect cuts, extract midpoint frames
# uv run ../shots/scripts/detect.py --input program.mp4
# uv run ../shots/scripts/extract-frames.py --shots-path .mediaskills/generated/program_shots_....json

# 3. Batch + agent-analyze + merge (same loop as above)
uv run scripts/get_frame_batch.py --manifest-path .mediaskills/generated/program_shots_....json --batch-index 0
uv run scripts/merge_analysis.py --manifest-path ... --frames-json batch0_analysis.json

# 4. Graphics reports
uv run scripts/graphics_on_screen_report.py --analysis-path .mediaskills/generated/program_frame_analysis_....json
uv run scripts/extract_title_text.py --analysis-path .mediaskills/generated/program_frame_analysis_....json

Operations

Each script returns structured JSON — see the script contract.

Op IDScriptCommon flags
vision.analysis_schemaanalysis_schema.py
vision.compile_all_reportscompile_all_reports.py
vision.compile_forced_narrative_reportcompile_forced_narrative_report.py--input
vision.compile_reportcompile_report.py--input
vision.extract_interval_framesextract_interval_frames.py--input
vision.extract_title_textextract_title_text.py
vision.forced_narrative_reportforced_narrative_report.py
vision.get_frame_batchget_frame_batch.py
vision.graphics_on_screen_reportgraphics_on_screen_report.py
vision.list_extractionslist_extractions.py
vision.merge_analysismerge_analysis.py
vision.prepare_manifestprepare_manifest.py--input
vision.text_on_screen_reporttext_on_screen_report.py
vision.validate_analysisvalidate_analysis.py

Do not use for

  • Built-in vision/LLM calls (agent analyzes frames; scripts merge JSON only)
  • Replacing `speech-captions` for dialogue transcription
  • Real-time stream analysis

Related cookbooks