How mathieubartozzi/video_auto_rating works
Main Components
• Video Source: Although not directly shown in the file tree, the project expects videos to be located in a directory (e.g., data/videos) and outputs compressed videos into data/videos_compressed.
• Compression Module: Uses FFmpeg to reduce video file sizes while preserving quality.
• Metadata Extraction: A component that parses the video filename to extract the student’s first name, last name, and group.
• Transcription Module: Utilizes the Whisper model to convert the audio track from the video into text.
• Non-verbal Analysis Module: Uses MediaPipe to analyze gestures and body language.
• Audio Feature Extraction: Leverages libraries such as librosa (and possibly OpenCV for handling video data) to calculate speech rate and tonal variations.
• Evaluation Module: Uses the OpenAI API to assess the transcription based on predefined criteria.
• Results Aggregation & Export: Collects processed data and exports it as a CSV file (resultats_evaluation.csv).
Relationships and Data Flow
• Next, branch off to the “Metadata Extraction” process, where the system extracts student information from filename patterns.
• All output from the transcription and feature analysis modules are then sent to the “Evaluation Module” where the transcription is scored using OpenAI.
• Finally, the outputs from these modules are merged/analyzed in the “Results Aggregation” component, which culminates in exporting a CSV file with all scores and details.
Architectural Patterns and Design Principles
• Pipeline Architecture Pattern: The project follows a linear, step-by-step data processing pipeline.
• Modular Design: Even though implemented within one script, the distinct steps (compression, transcription, analysis, evaluation, export) should be conceptually represented as separate modules.
• Data Flow Emphasis: The design should emphasize sequential processing as well as branching for parallel analyses (e.g., non-verbal and audio analysis).
Technologies, Frameworks, and External Services
• FFmpeg for video compression.
• Whisper for transcription.
• MediaPipe for gesture and non-verbal analysis.
• Librosa for audio processing.
• OpenAI API for evaluation.
• Python libraries like Pandas, Numpy, and OpenCV for data manipulation and processing.
• dotenv for environment configuration (.env file containing API keys).