Automatically extract poker exploit opportunities from YouTube instructional videos using AI vision analysis.
- 🎥 Downloads YouTube poker videos automatically
- 📝 Extracts transcripts/captions with timestamps
- 🖼️ Extracts video frames at configurable intervals
- 🤖 AI-powered analysis (OpenAI GPT-4o or Google Gemini)
- 📊 Structured output with timestamps, situations, and strategies
- 🔄 Batch processing support for multiple videos
- 🎯 Customizable screenshot intervals
- Python 3.9 or higher
- ffmpeg (for video processing)
- Clone the repository
git clone https://github.com/protny/poker_exploit_researcher.git
cd poker_exploit_researcher- Install Python dependencies
pip install -r requirements.txt- Install ffmpeg (if not already installed)
Ubuntu/Debian:
sudo apt update
sudo apt install ffmpegmacOS:
brew install ffmpegWindows: Download from https://ffmpeg.org/download.html
- Configure API keys
Copy the example environment file:
cp .env.example .envEdit .env and add your API key:
For OpenAI (GPT-4o):
OPENAI_API_KEY=sk-your-api-key-here
AI_PROVIDER=openai
OPENAI_MODEL=gpt-4oFor Google Gemini:
GEMINI_API_KEY=your-gemini-api-key-here
AI_PROVIDER=gemini
GEMINI_MODEL=gemini-2.0-flash-expGet API Keys:
- OpenAI: https://platform.openai.com/api-keys
- Google Gemini: https://ai.google.dev/
python main.py --url "https://www.youtube.com/watch?v=KHAAW2iFiHY"- Add video URLs to
input_videos.txt(one per line) - Run:
python main.py --list input_videos.txt# Extract frames every 10 seconds instead of default 5
python main.py --url "https://www.youtube.com/watch?v=..." --interval 10python main.py --url "..." --no-cleanupEach video generates a .txt file named {video_id}.txt in data/outputs/:
================================================================================
POKER EXPLOIT ANALYSIS REPORT
================================================================================
Video ID: KHAAW2iFiHY
Analysis Date: 2025-01-13 15:30:00
Total Exploits Found: 5
EXPLOIT #1
================================================================================
TIMESTAMP: 02:15 (135.00s)
SITUATION:
UTG opens 3bb, Hero is on BTN with AQs, facing a 3-bet from SB
PLAYER TYPE:
Tight passive player who rarely 3-bets without premium hands
WHY IT'S EXPLOITABLE:
Tight players show extreme strength with 3-bets from SB, usually AA-QQ, AK
COUNTER-STRATEGY:
Fold AQ unless you have strong reads. Against this player type, 4-betting
as a bluff is -EV
CONFIDENCE: HIGH
Adjust in .env:
SCREENSHOT_INTERVAL=5 # seconds between framesOr use command line:
python main.py --url "..." --interval 10Recommended intervals:
- 5 seconds: Detailed analysis, higher AI costs
- 10 seconds: Balanced approach
- 15-30 seconds: Quick overview, lower costs
Edit config/config.yaml:
cleanup:
remove_videos: true # delete downloaded videos
remove_frames: true # delete extracted frames
keep_transcripts: true # keep transcriptspoker_exploit_researcher/
├── main.py # Main entry point
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── input_videos.txt # List of videos to process
├── config/
│ └── config.yaml # Configuration settings
├── src/ # Source code modules
│ ├── downloader.py # YouTube video download
│ ├── frame_extractor.py # Frame extraction
│ ├── analyzer.py # AI analysis
│ ├── output_writer.py # Output formatting
│ ├── exploit_deduplicator.py # Deduplication logic
│ ├── exploit_dedup_simple.py # Time-based deduplication
│ └── semantic_dedup.py # AI semantic deduplication
├── docs/ # Documentation
│ ├── setup/ # Getting started guides
│ ├── guides/ # Usage & optimization guides
│ ├── troubleshooting/ # Problem-solving guides
│ └── planning/ # Planning & historical docs
└── data/
├── videos/ # Downloaded videos (temp)
├── frames/ # Extracted frames (temp)
├── transcripts/ # Video transcripts
└── outputs/ # Final exploit reports
- ~$0.20-$0.40 per 10-minute video (5-second intervals)
- ~$20-$40 for 100 videos
- ~$0.10-$0.20 per 10-minute video (5-second intervals)
- ~$10-$20 for 100 videos
Tip: Start with longer intervals (15-30s) to reduce costs during testing.
Some videos don't have captions. The analyzer will still work using only visual data, but quality may be reduced.
Ensure ffmpeg is installed and in your PATH:
ffmpeg -versionIf you hit rate limits:
- Reduce screenshot interval (process fewer frames)
- Add delays between API calls in
src/analyzer.py - Use batch processing with delays between videos
For long videos:
- Increase screenshot interval
- Reduce frame quality in
config/config.yaml - Enable cleanup to remove processed frames
Comprehensive documentation is available in the docs/ directory:
- Quick Start Guide - Get up and running in 5 minutes
- Windows Setup - Windows-specific installation instructions
- Optimization Guide - Cost optimization and quality tuning
- Semantic Deduplication - AI-powered exploit grouping
- Cookies & Age-Restricted Videos - Complete guide for authentication and cookie issues
- Work Summary - Complete project status and development roadmap
- Quick Summary - Quick reference for scripts and commands
- Project History - Original requirements and architecture decisions
Test downloader:
python src/downloader.pyTest frame extractor:
python src/frame_extractor.pyTest output writer:
python src/output_writer.pyContributions welcome! Please open an issue or PR.
MIT License - see LICENSE file for details
This tool uses AI to analyze poker content and should be used for educational purposes. Always verify AI-generated insights with human poker expertise. The quality of analysis depends on video quality, transcript availability, and AI model capabilities.
Inspired by similar poker video analysis projects and built with:
- yt-dlp - Video downloading
- OpenCV - Frame extraction
- OpenAI GPT-4o / Google Gemini - AI analysis
Built by @protny | Report Issues