How sidedwards/ai-video-summarizer works
Main Components
• Backend:
• Core logic is implemented in Python within the “backend” directory.
• Key modules include:
▪ ai_jobs.py – Likely responsible for handling AI-related processing tasks.
▪ cli.py – Handles command line interactions.
▪ server.py – Launches the backend server for GUI requests.
▪ log.py, s3.py, transcription_goal.py, utils.py – Provide supporting functionality (logging, AWS S3 integration, transcription goals, and miscellaneous utilities).
• Configuration management from “config/config-example.yaml” (which should be renamed and edited as “config/config.yaml”).
• Frontend:
• Found in the “frontend” directory, primarily built with Svelte.
• Key aspects:
▪ src/routes and src/lib – Define the interface, routing and reusable components.
▪ Vite and TypeScript configuration indicating modern frontend tooling.
• External Services and Dependencies:
• AWS S3 for storage and file handling.
• WhisperX (accessed via Replicate API) for video/audio transcription.
• Additional APIs (such as Anthropic’s API) for processing summaries.
• FFmpeg (an external dependency for video processing).
• Execution Modes:
• CLI: Enables video file selection and summary type through terminal.
• GUI: Combines backend server and the Svelte-powered frontend to allow browser-based uploading and processing.
Relationships and Interactions
• The CLI and GUI modes share the same backend processing logic.
• The backend server module (server.py) interacts with the frontend via HTTP (or WebSocket) requests.
• Both processing methods interact with AWS S3 for file storage and retrieval.
• External API integrations (Replicate API for WhisperX and others) are called from within the backend modules.
• The configuration file (config.yaml) centralizes external API keys and model parameters that affect processing throughout the system.
Architectural Patterns and Technologies
• Separation of concerns: Clear delineation between frontend (user interface) and backend (processing logic).
• Modular design in the backend: Modules handling single responsibilities (CLI, server, S3 interaction, logging).
• API-driven design: Backend serves as the API for the web frontend.
• Use of industry-standard libraries and frameworks: Python’s ecosystem, Node.js, Svelte, Vite.
• Cloud integration pattern: Interaction with AWS S3 for scalable storage.
• The project supports two different modes (CLI and web) using overlapping core functionalities.