How lee-dongwook/video-auto-analyzer works
This repository is an AI video analysis API with a separate title-generation capability. The main workflow accepts a video, exposes metadata and scene detection, analyzes scene visuals and audio, then combines those results into video intelligence. Title generation is an independent content workflow. The excerpts establish the API routing, service orchestration, and Ollama-backed model setup; some analyzer internals were not shown, so their connections are limited to relationships listed in the SOURCE INDEX.
Main entry points: service.py Video service · factory.py LLM factory · ollama.py Ollama chat provider · router.py API router
Components 21
API surface
- API router
backend/app/api/v1/router.py - Video endpoints
backend/app/domains/video/router.py - Content endpoint
backend/app/domains/content/router.py
Video analysis
- Video service
backend/app/domains/video/service.py - Video response schemas
backend/app/domains/video/schemas.py - Video files
backend/storage/videos - Scene detection
backend/app/domains/video/scene_detector.py - Visual analysis
backend/app/domains/video/visual_analyzer.py - Audio extraction
backend/app/domains/video/audio_extractor.py - Audio transcription
backend/app/domains/video/audio_transcriber.py - Context building
backend/app/domains/video/context_builder.py - Video intelligence
backend/app/domains/video/intelligence_analyzer.py
Content generation
- Title schemas
backend/app/domains/content/schemas.py - Title generation
backend/app/domains/content/service.py
Model infrastructure
- LLM factory
backend/app/infrastructure/llm/factory.py - LLM interface
backend/app/infrastructure/llm/base.py - Ollama chat provider
backend/app/infrastructure/llm/ollama.py - Ollama vision provider
backend/app/infrastructure/vision/ollama.py - Runtime settings
backend/app/core/config.py
Other components
- API caller
- Ollama service
Connections 26
- API caller → API router: sends requests
- API router → Video endpoints: routes video
backend/app/api/v1/router.py - API router → Content endpoint: routes content
backend/app/api/v1/router.py - Video endpoints → Video service: dispatches
backend/app/domains/video/router.py - Video endpoints → Video response schemas: validates responses
backend/app/domains/video/router.py - Content endpoint → Title generation: dispatches
backend/app/domains/content/router.py - Content endpoint → Title schemas: validates request
backend/app/domains/content/router.py - Video service → Video files: stores uploads
backend/app/domains/video/service.py - Video service → Scene detection: detects scenes
backend/app/domains/video/service.py - Video service → Visual analysis: analyzes frames
backend/app/domains/video/service.py - Video service → Audio extraction: extracts audio
backend/app/domains/video/service.py - Video service → Audio transcription: transcribes audio
backend/app/domains/video/service.py - Video service → Context building: builds context
backend/app/domains/video/service.py - Video service → Video intelligence: analyzes context
backend/app/domains/video/service.py - Title generation → LLM factory: gets chat model
backend/app/domains/content/service.py - Title generation → Title schemas: returns titles
backend/app/domains/content/service.py - Video intelligence → LLM factory: gets chat model
backend/app/domains/video/intelligence_analyzer.py - Visual analysis → Ollama vision provider: analyzes images
backend/app/domains/video/visual_analyzer.py - LLM factory → Runtime settings: reads provider config
backend/app/infrastructure/llm/factory.py - LLM factory → LLM interface: uses interface
backend/app/infrastructure/llm/factory.py - LLM factory → Ollama chat provider: selects provider
backend/app/infrastructure/llm/factory.py - Ollama chat provider → Runtime settings: reads model config
backend/app/infrastructure/llm/ollama.py - Ollama chat provider → LLM interface: implements interface
backend/app/infrastructure/llm/ollama.py - Ollama vision provider → Runtime settings: reads model config
backend/app/infrastructure/vision/ollama.py - Ollama vision provider → Ollama service: sends image prompts
backend/app/infrastructure/vision/ollama.py - Ollama chat provider → Ollama service: requests chat model
backend/app/infrastructure/llm/ollama.py