An intelligent system that analyzes movies through both visual and audio content, generating detailed expert reviews and ratings using GPT-4o-mini for visual analysis and Claude 3.5 Sonnet for screenplay (transcribed via whisper API) evaluation.
- Frame Analysis: Extracts keyframes and creates visual summaries
- Audio Processing: Transcribes movie dialogue using OpenAI's Whisper API
- Expert Panel: Generates diverse AI expert reviews with unique perspectives
- Comprehensive Analysis:
- Visual aesthetics (GPT-4o-mini)
- Screenplay quality (Claude 3.5 Sonnet)
- Narrative structure
- Technical proficiency
- Cultural impact
- And more!
- IMDB-Style Reviews: Includes punchy, memorable comments from each expert
- Beautiful Output: Colorful, emoji-rich formatting for engaging results
- Python 3.8+ (recommended: Python 3.9-3.11 for best compatibility)
- FFmpeg installed on your system
- OpenAI API key (for GPT-4o-mini and Whisper)
- Anthropic API key (for Claude 3.5 Sonnet)
- Clone the repository:
git clone https://github.com/yourusername/aimdb.git
cd aimdb- Create and activate a virtual environment (recommended):
# For Python 3.9-3.11 (recommended)
python -m venv venv
source venv/bin/activate # On Unix/macOS
venv\Scripts\activate # On Windows- Install dependencies:
# For Python 3.9-3.11
pip install -r requirements.txt
# For Python 3.13+ (experimental)
pip install --break-system-packages -r requirements.txt- Download NLTK data (will be done automatically on first run, but you can do it manually):
python -m nltk.downloader punkt averaged_perceptron_tagger maxent_ne_chunker words- Set up your API keys:
# On Unix/macOS
export OPENAI_API_KEY='your-openai-api-key'
export ANTHROPIC_API_KEY='your-claude-api-key'
# On Windows
set OPENAI_API_KEY=your-openai-api-key
set ANTHROPIC_API_KEY=your-claude-api-keyIf you encounter installation issues:
- Try using Python 3.9, 3.10, or 3.11 for best compatibility
- Install system dependencies:
# On Ubuntu/Debian
sudo apt-get install python3-dev ffmpeg
# On macOS
brew install ffmpeg
# On Windows
choco install ffmpeg- If you're using Python 3.13+, you might need to install from source:
pip install --no-binary :all: -r requirements.txt- Python 3.8+
- FFmpeg installed on your system
- OpenAI API key (for GPT-4o-mini and Whisper)
- Anthropic API key (for Claude 3.5 Sonnet)
- Sufficient disk space for frame extraction
Basic usage:
python main.py movie.mp4Advanced options:
# Specify number of experts
python main.py movie.mp4 --experts 15
# Skip audio analysis (faster, visual-only review)
python main.py movie.mp4 --no-audio
# Full example with all options
python main.py path/to/movie.mp4 --experts 12 --no-audio| Argument | Description |
|---|---|
movie_path |
Path to the movie file (required) |
-e, --experts |
Number of AI experts to employ (default: 10) |
--no-audio |
Skip audio analysis for faster, visual-only review |
- Video: .mp4, .mkv, .avi, .mov
- Audio: Automatically extracted from video
The system will:
- Extract keyframes from your movie (2 frames per second)
- Create 10x10 grid sheets of frames
- Extract and transcribe audio using Whisper (unless --no-audio is specified)
- Generate expert reviews using both GPT-4o-mini and Claude 3.5 Sonnet
- Display detailed analysis and IMDB-style comments
The system creates the following directory structure:
moviename/
โโโ frames/ # Individual keyframes
โโโ sheets/ # 10x10 grid visualizations
โโโ audio/ # Extracted audio and transcriptions
โโโ chunks/ # Audio chunks for processing
Each expert provides:
- Score out of 100 points
- Confidence interval
- IMDB-style comment
- Detailed review
- Category-by-category breakdown:
- Visual Aesthetics (15 points)
- Screenplay Quality (15 points)
- Narrative Structure (15 points)
- Technical Proficiency (10 points)
- Innovation (10 points)
- Cultural Impact (10 points)
- Audience Appeal (10 points)
The final score is calculated by averaging expert ratings, with:
- Confidence intervals
- Genre bonuses
- Tier classification from "Critically Flawed" to "Timeless Masterpiece"
You can modify:
frame_extractor.py: Adjust frame extraction rateexpert_generator.py: Customize expert profilesrating_system.py: Modify rating categories and weights
- Processing time depends on movie length and number of experts
- API costs will vary based on usage:
- GPT-4o-mini for visual analysis
- Claude 3.5 Sonnet for screenplay analysis
- Whisper for audio transcription
- Ensure sufficient disk space for frame extraction
- Consider API rate limits when processing multiple movies
Contributions are welcome! Please feel free to submit a Pull Request.