Skip to main content

C4 Model - Level 2: Container Level

Container Diagram

Container Descriptions

CLI Tool

  • Technology: Python, Typer, Rich
  • Responsibility: User interface for submitting URLs and monitoring progress
  • Deployment: Local executable

Video Downloader (yt-dlp)

  • Technology: yt-dlp Python library
  • Responsibility: Download videos from platforms, extract metadata
  • Deployment: Local process

Audio Extractor (FFmpeg)

  • Technology: FFmpeg subprocess
  • Responsibility: Extract audio stream, convert to MP3
  • Deployment: Local subprocess

Transcription Engine (Whisper)

  • Technology: OpenAI Whisper API client
  • Responsibility: Convert audio to timestamped text
  • Deployment: External API call

Frame Extractor (FFmpeg)

  • Technology: FFmpeg subprocess
  • Responsibility: Sample video frames at configurable rate
  • Deployment: Local subprocess

Deduplication Engine (pHash)

  • Technology: Python, imagehash, Pillow
  • Responsibility: Remove perceptually similar frames
  • Deployment: Local process

Vision Analyzer (Claude Vision)

  • Technology: Anthropic Claude API client
  • Responsibility: Analyze image content, extract text/diagrams
  • Deployment: External API call

Content Aligner

  • Technology: Python, binary search
  • Responsibility: Match transcript segments with frame timestamps
  • Deployment: Local process

Semantic Chunker

  • Technology: Python, sentence-transformers
  • Responsibility: Split content into coherent topic chunks
  • Deployment: Local process

Artifact Generators

  • Technology: Python, Jinja2 templates, LLM APIs
  • Responsibility: Generate SDD, TDD, ADR, C4, Glossary documents
  • Deployment: Local process with API calls

Search Expander (Serper)

  • Technology: Serper API client
  • Responsibility: Web search for context enrichment
  • Deployment: External API call

Video Metadata Database (SQLite)

  • Technology: SQLite / PostgreSQL
  • Responsibility: Store metadata, transcripts, analyses, relationships
  • Deployment: Local file or external server

File Storage (Local FS)

  • Technology: Local filesystem
  • Responsibility: Store video, audio, frames, artifacts
  • Deployment: Local directory

Container Interactions

FromToProtocolPurpose
CLIDownloaderFunction callSubmit download request
DownloaderYouTubeHTTPSDownload video
AudioExFileStoreFile I/OWrite MP3
TranscriberWhisperHTTPS/JSONAPI request
FrameExFileStoreFile I/OWrite PNGs
VisionClaudeHTTPS/JSONVision API
GeneratorsFileStoreFile I/OWrite artifacts
All DB clientsVideoDBSQLCRUD operations

Technology Stack per Container

ContainerLanguageKey Libraries
CLIPythontyper, rich, asyncio
DownloaderPythonyt-dlp, pydantic
AudioExPythonffmpeg-python
TranscriberPythonopenai
FrameExPythonopencv-python
DedupPythonimagehash, Pillow
VisionPythonanthropic
AlignerPythonnumpy, bisect
ChunkerPythonsentence-transformers
GeneratorsPythonjinja2, anthropic
SearchExpPythonaiohttp
VideoDBSQLaiosqlite