ai-video-understanding
Skill4 starsChanged 5 months agoMITView on GitHub
Multimodal AI patterns for extracting structured information from video using Gemini, GPT-4o, and Claude vision. Frame sampling strategies, structured output with Pydantic, temporal reasoning, and cost optimization. Use for video analysis, report generation from video, and visual inspection.
In this repository101 other files it gives its agents.
- apple-foundation-modelsSkill
- arch-dddSkill
- arch-decision-recordsSkill
- arch-diagramsSkill
- arch-eventsSkill
- arch-mvp-roadmapSkill
- arch-python-modernSkill
- aws-app-runnerSkill
- aws-cicd-patternsSkill
- aws-security-hardeningSkill
- azure-functions-python-v2Skill
- azure-identity-m2m-authSkill
- azure-service-bus-messagingSkill
- azure-workflow-execution-modelsSkill
- caddy-tls-proxySkill
- compliance-frameworksSkill
- design-system-workflowSkill
- dev-debugging-strategiesSkill
- dev-standardsSkill
- docker-python-poetrySkill
- docker-pythonSkill
- fastapi-patternsSkill
- ffmpeg-laravel-videoSkill
- formik-yup-react-nativeSkill
- frontend-accessibilitySkill
- frontend-angular-aiSkill
- frontend-angularSkill
- frontend-angular-toolingSkill
- frontend-design-systemsSkill
- frontend-material-chatSkill
- frontend-material-design-3Skill
- frontend-svelteSkill
- gcp-cicd-patternsSkill
- gcp-cloud-runSkill
- gcp-cloudsql-infrastructureSkill
- gcp-finopsSkill
- gcp-observabilitySkill
- gcp-security-hardeningSkill
- github-actions-cicdSkill
- healthkit-biofeedbackSkill
- infra-terraformSkill
- ios-app-qualitySkill
- ios-audio-hapticsSkill
- jest-nestjs-testingSkill
- langchain-azure-openai-patternsSkill
- laravel-auth-hardeningSkill
- laravel-ci-mysqlSkill
- laravel-mix-webpackSkill
- laravel-modern-patternsSkill
- laravel-pint-patternsSkill
- laravel-s3-storageSkill
- laravel-sail-dockerSkill
- mobile-app-deploymentSkill
- mobile-e2e-testingSkill
- mobile-offline-syncSkill
- mobile-push-notificationsSkill
- mobile-video-uploadSkill
- mongodb-asyncmongoclient-patternsSkill
- mongodb-atlas-patternsSkill
- nestjs-patternsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when building pipelines that extract structured information from video using multimodal LLMs, or when choosing between …
- Distinctive: line 35
Use video-to-grid (48 frames in one image) for single-call analysis at ~$0.01/video
- Distinctive: line 38
Use multi-pass: sparse low-res scan first, then dense high-res on flagged segments only
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Video Understanding
Use this skill when building pipelines that extract structured information from video using multimodal LLMs, or when choosing between native video input (Gemini) and frame-based approaches (GPT-4o, Claude).
Model Comparison
| Model | Video Input | Max Duration/Images | Input $/1M tokens | Best For |
| Gemini 2.5 Pro | Native | 1 hour, 10 videos | $4.00 | Long-form, temporal reasoning, cached Q&A |
| Gemini 2.5 Flash | Native | Similar to Pro | ~$0.50 | High-volume, cost-sensitive |
| GPT-4o | Frame-based | Hundreds of frames | $2.50 | Structured extraction, schema adherence |
| Claude Sonnet 4.6 | Frame-based | 600 images/request | $3.00 | High frame-count, multi-turn analysis |
Frame Sampling Quick Reference
| Task Type | Recommended FPS | Accuracy |
| General overview | 0.5-1 FPS | ~85% |
| Action detection | 2-4 FPS | ~95% |
| Fine-grained motion | 8-16 FPS | ~98%+ |
| Long-form (budget) | Grid: 48 frames/image | ~70-80% |
Cost Optimization
- Enable Gemini context caching for multi-query workflows (90% discount on cached tokens)
- Use video-to-grid (48 frames in one image) for single-call analysis at ~$0.01/video
- Resize frames to 1024x1024 for optimal quality/cost balance
- Apply transcript-first pattern: cheap audio analysis, then selective visual only where needed
- Use multi-pass: sparse low-res scan first, then dense high-res on flagged segments only
See reference.md for detailed patterns and architecture decisions. See examples.md for production code examples.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

