Automatically capture video presentations and convert them to PowerPoint slides using AI-powered slide detection.
When watching an online course, webinar, or live presentation where slides aren't provided, DeckSnag automatically detects slide changes and saves them to a PowerPoint file. No more manual screenshots!
- AI-Powered Detection - CLIP neural network understands slide content semantically
- Multiple Comparison Methods - Choose between AI (CLIP), SSIM, or MSE based on your needs
- Multiple Output Formats - Export to PowerPoint (.pptx), PDF, or image folder
- Modern GUI & CLI - Use the intuitive graphical interface or automate with command-line
- Cross-Platform - Works on Windows, macOS, and Linux
- Installation
- Quick Start
- AI-Powered Slide Detection
- CLI Reference
- Configuration
- GUI Features
- API Usage
- Contributing
- Troubleshooting
pip install decksnaggit clone https://github.com/foxintheloop/DeckSnag.git
cd DeckSnag
pip install -e .pip install -e ".[dev]"Launch the graphical interface:
decksnag --guiOr use the dedicated GUI command:
decksnag-guiOr use Python module syntax:
python -m decksnag --guiBasic usage with interactive region selection:
decksnag -o my_presentation.pptxWith AI-powered detection (recommended for complex presentations):
decksnag -M clip -o my_presentation.pptxThe program will:
- Ask you to click and drag to select the capture region
- Start capturing slides (press END key to stop)
- Save the presentation to the specified file
DeckSnag uses CLIP (Contrastive Language-Image Pre-training) from OpenAI for intelligent slide detection. Unlike traditional pixel-based methods, CLIP understands the semantic content of images.
| Scenario | Traditional (MSE/SSIM) | AI (CLIP) |
|---|---|---|
| Mouse cursor moving | May trigger false positives | Ignores minor visual noise |
| Video player UI overlays | Detects as changes | Focuses on slide content |
| Animations/transitions | Multiple false captures | Waits for content change |
| Presenter video overlay | Constant false triggers | Understands slide vs presenter |
| Lighting changes | Sensitive to brightness | Semantic understanding |
| Method | Speed | Accuracy | Best For |
|---|---|---|---|
clip |
Slower | Excellent | Complex videos, animations, presenter overlays |
ssim |
Fast | Good | Clean recordings with minimal noise |
mse |
Fast | Basic | Simple, static presentations |
Enable AI detection:
# CLI
decksnag -M clip -o presentation
# Or in GUI: Select "CLIP AI" from the comparison method dropdown- Captures a screenshot of the selected region
- Encodes the image into a semantic embedding vector using CLIP's vision transformer
- Compares the embedding with the previous slide using cosine similarity
- Detects a new slide when similarity drops below threshold (default: 0.85)
This approach means CLIP understands that two slides with different text are different content, even if they look visually similar (same template, colors, layout).
decksnag [OPTIONS]
Options:
-o, --output PATH Output file path (default: ./presentation)
-f, --format FORMAT Output format: pptx, pdf, images, all (default: pptx)
-i, --interval SECONDS Capture interval in seconds (default: 5)
-t, --threshold FLOAT Change sensitivity 0-1 (default: 0.005)
-s, --sensitivity PRESET Sensitivity preset: low, medium, high
-M, --method METHOD Comparison method: mse, ssim, clip (default: mse)
-m, --monitor NUMBER Monitor to capture (default: 0 for primary)
-r, --region X1,Y1,X2,Y2 Preset capture region (skip selection)
-k, --hotkey KEY Stop hotkey (default: end)
-v, --verbose Enable verbose logging
--list-monitors List available monitors and exit
--gui Launch graphical interface
-V, --version Show version and exit
-h, --help Show help message
Use AI-powered comparison (recommended):
decksnag -M clip -o presentationExport as PDF:
decksnag -o lecture -f pdfHigh sensitivity for subtle slide changes:
decksnag -s high -i 3Capture specific region (skip interactive selection):
decksnag -r 100,100,1920,1080 -o presentationExport to all formats:
decksnag -f all -o my_slidesCapture from second monitor:
decksnag -m 2 -o presentationList available monitors:
decksnag --list-monitorsEach comparison method has optimized thresholds for sensitivity presets:
MSE (Mean Squared Error):
| Preset | Threshold | Description |
|---|---|---|
low |
0.01 | Only detects major slide changes |
medium |
0.005 | Balanced detection (default) |
high |
0.001 | Catches subtle changes |
SSIM (Structural Similarity):
| Preset | Threshold | Description |
|---|---|---|
low |
0.90 | Only detects major slide changes |
medium |
0.95 | Balanced detection (default) |
high |
0.98 | Catches subtle changes |
CLIP (AI-Powered):
| Preset | Threshold | Description |
|---|---|---|
low |
0.80 | Only detects major content changes |
medium |
0.85 | Balanced detection (default) |
high |
0.92 | Catches subtle content changes |
The interval (in seconds) between screenshots. Default is 5 seconds.
- Faster interval (1-3s): Better for fast-paced presentations
- Slower interval (5-10s): Better for slower presentations, less CPU usage
The graphical interface provides:
- Region Selection - Click a button to select capture area visually
- Monitor Selection - Dropdown to choose which monitor to capture
- Settings Panel:
- Interval slider (1-30 seconds)
- Sensitivity dropdown (Low/Medium/High)
- Comparison method selection (MSE/SSIM/CLIP AI)
- Output format selection
- Live Preview - Thumbnails of captured slides
- Progress Tracking - Slide count and elapsed time
- Start/Stop Controls - Easy capture management
- Mini Mode - Compact floating widget during capture
- Region Selection: You select an area of your screen to monitor
- Initial Capture: Takes a screenshot of the selected region
- Continuous Monitoring: Every N seconds, takes a new screenshot
- Change Detection: Compares new screenshot to previous using selected method (MSE, SSIM, or CLIP)
- Slide Addition: If change exceeds threshold, adds new slide to presentation
- Export: Saves to your chosen format when you stop capture
You can also use DeckSnag as a Python library:
from decksnag import ScreenCapture, ImageComparator, PresentationManager
# Initialize components
capture = ScreenCapture()
comparator = ImageComparator(method="clip") # Use AI-powered detection
presentation = PresentationManager()
# Select region interactively
region = capture.select_region_interactive()
# Create presentation
presentation.create("my_slides.pptx")
# Capture and add slides
previous = capture.capture_region(region)
presentation.add_slide(previous)
# ... capture loop ...
current = capture.capture_region(region)
if comparator.is_different(previous, current):
presentation.add_slide(current)
previous = current
# Save
presentation.save()| Class | Description |
|---|---|
ScreenCapture |
Multi-monitor screen capture with region selection |
ImageComparator |
Image comparison with MSE, SSIM, or CLIP methods |
PresentationManager |
PowerPoint creation and slide management |
Exporter |
Export to multiple formats (PDF, images) |
Config |
Configuration management |
- Python 3.9 or higher
- Dependencies (installed automatically):
mss- Fast multi-monitor screenshotspynput- Keyboard/mouse input handlingPillow- Image processingpython-pptx- PowerPoint file creationscikit-image- Image comparison (MSE, SSIM)customtkinter- Modern GUI frameworkimg2pdf- PDF exportsentence-transformers- CLIP model for AI-powered comparisontorch- PyTorch for neural network inference
Create a standalone executable that doesn't require Python:
pip install pyinstaller
pyinstaller decksnag.specThe executable will be in the dist/ folder.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Run tests (
pytest) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check decksnag/
# Format code
black decksnag/ tests/- Make sure the capture region covers the entire slide area
- Try increasing sensitivity (use
-s highor lower threshold) - Check that the presentation is actually changing slides
- Try using CLIP method (
-M clip) for better detection
- Decrease sensitivity (use
-s lowor higher threshold) - Increase the capture interval (
-i 10) - Use CLIP method (
-M clip) to ignore visual noise
- Make sure you click and drag (not just click twice)
- Try running with administrator privileges
- On Linux, ensure you have the required X11 libraries
- Ensure CustomTkinter is installed:
pip install customtkinter - On Linux, install Tk:
sudo apt-get install python3-tk
- The first time you use CLIP, it downloads the model (~350MB)
- Subsequent runs use the cached model and start faster
- Consider using SSIM for quick captures where AI isn't needed
- Issues: GitHub Issues
- Repository: github.com/foxintheloop/DeckSnag
This project is licensed under the MIT License - see the LICENSE.txt file for details.
- Built with CLIP for AI-powered image understanding
- Uses sentence-transformers for efficient CLIP inference
- Built with CustomTkinter for the modern GUI
- Uses python-pptx for PowerPoint generation