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_....jsonshot-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_....jsonOperations
Each script returns structured JSON — see the script contract.
| Op ID | Script | Common flags |
|---|---|---|
vision.analysis_schema | analysis_schema.py | — |
vision.compile_all_reports | compile_all_reports.py | — |
vision.compile_forced_narrative_report | compile_forced_narrative_report.py | --input |
vision.compile_report | compile_report.py | --input |
vision.extract_interval_frames | extract_interval_frames.py | --input |
vision.extract_title_text | extract_title_text.py | — |
vision.forced_narrative_report | forced_narrative_report.py | — |
vision.get_frame_batch | get_frame_batch.py | — |
vision.graphics_on_screen_report | graphics_on_screen_report.py | — |
vision.list_extractions | list_extractions.py | — |
vision.merge_analysis | merge_analysis.py | — |
vision.prepare_manifest | prepare_manifest.py | --input |
vision.text_on_screen_report | text_on_screen_report.py | — |
vision.validate_analysis | validate_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