An intelligent Python application that automatically processes long-form VODs (2-16 hours), transcribes them using Whisper, detects "clippable" moments based on keywords, and generates short-form video clips optimized for platforms like YouTube Shorts, TikTok, and Instagram Reels.
- Automatic Transcription: OpenAI Whisper or Faster-Whisper for accurate timestamped transcription
- Smart Detection: Customizable keyword/phrase matching for highlight moments
- Intelligent Buffering: Configurable buffers (10-15s) before and after detected segments
- Clip Generation: High-quality video clips with FFmpeg
- Vertical Format: Auto-converts to vertical (9:16) format for Shorts platforms
- Batch Processing: Process multiple videos automatically
- Energy Spike Detection: RMS energy analysis to identify loud/exciting moments
- Voice Activity Detection (VAD): Silero VAD for speech validation - ensures clips contain speech
- Sentiment Analysis: Text-based sentiment scoring for detected segments
- Speech-Aware Buffering: No cutting mid-sentence - intelligently finds sentence boundaries
- Zone-Based Overlay Composition: VTuber face cam overlay in configurable positions
- Auto-Subtitles: Burn subtitles into clips using FFmpeg
- Keyword Highlighting: Emphasizes detected trigger words in subtitles
- Python 3.10+ (Python 3.14 tested)
- FFmpeg 7.1+ (must be in PATH)
- Minimum 8GB RAM (16GB+ recommended for long VODs)
- GPU with CUDA support (optional, for faster transcription)
Run install.bat - this will install Python and FFmpeg, set up the virtual environment, and install dependencies automatically.
- Double-click
install.bat - If prompted, close and reopen your terminal, then run
install.batagain - Wait for "INSTALLATION COMPLETE!"
- Double-click
run.batto start clipping
- Put your video files in the
input\folder - Edit keywords in
config\config.yamlif needed - Double-click
run.bat - Find your clips in
output\clips\
- "Python not found" - Close terminal, reopen, run
install.batagain - "FFmpeg not found" - Close terminal, reopen, run
install.batagain
# Install Python 3.10+ from python.org
# Install FFmpeg from ffmpeg.org and add to PATH
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python vod_clipper.py --batchEdit config/config.yaml to customize:
whisper:
model: "base" # tiny, base, small, medium, large, large-v3
device: "cpu" # cpu or cudadetection:
keywords:
- "no way"
- "let's go"
- "what just happened"
- "oh my god"
- "unbelievable"multimodal:
enabled: true
energy_weight: 0.3
vad_weight: 0.3
sentiment_weight: 0.2
keyword_weight: 0.2audio_analysis:
min_speech_duration: 0.3 # secondsbuffering:
pre_buffer: 12.0
post_buffer: 12.0
speech_aware: true # Don't cut mid-sentencezones:
enabled: true
face_cam:
position: "right_bottom"
extract_resolution: "512x512"subtitles:
enabled: true
highlight_keywords: true
font: "Arial"
font_size: 48# Process a single video
python vod_clipper.py --video "path/to/video.mp4"
# Process all videos in input directory
python vod_clipper.py --batch
# Interactive mode
python vod_clipper.py--video PATH Process specific video file
--batch Process all videos in input directory
--config PATH Custom config file
--input-dir Custom input directory
--help Show help
- Place VOD files in
input/directory - Edit keywords in
config/config.yaml - Run
python vod_clipper.py --batch - Generated clips appear in
output/clips/ - Check logs in
output/logs/
aimi-vod/
├── vod_clipper.py # Main application entry point
├── install.bat # First-time setup script
├── run.bat # Run the application
├── requirements.txt # Python dependencies
├── config/
│ └── config.yaml # Configuration file
├── modules/
│ ├── __init__.py
│ ├── input_handler.py # Video validation & metadata
│ ├── audio_extractor.py # Audio extraction
│ ├── transcriber.py # Whisper transcription
│ ├── detector.py # Multimodal segment detection
│ ├── clip_generator.py # Clip generation with subtitles
│ ├── audio_analyzer.py # Energy, VAD, sentiment analysis
│ ├── zone_composer.py # Zone-based overlay composition
│ └── subtitle_generator.py # SRT generation with highlighting
├── input/ # Place VOD files here
├── output/
│ ├── clips/ # Generated video clips
│ └── logs/ # Processing logs
├── temp/ # Temporary files
└── README.md
- Input Handling: Validates video file, extracts metadata
- Audio Extraction: High-quality mono audio for Whisper
- Audio Analysis: Energy spikes, VAD, sentiment scoring
- Transcription: Whisper creates timestamped transcript
- Detection: Multimodal scoring (energy + VAD + sentiment + keywords)
- Buffering: Speech-aware buffers around detected segments
- Zone Extraction: (Optional) VTuber face cam from configured zones
- Subtitle Generation: SRT with keyword highlighting
- Clip Generation: FFmpeg extracts clips, burns subtitles, applies overlays
Input: gaming_stream.mp4 (4 hour VOD)
Output (output/clips/):
gaming_stream_clip_1_00h05m23s_00h05m47s.mp4(24s clip)gaming_stream_clip_2_00h08m55s_00h09m18s.mp4(23s clip)
Logs (output/logs/):
vod_clipper_20250625_143022.logsummary_gaming_stream.json
Install FFmpeg and ensure it's in PATH:
ffmpeg -version- Check keywords in config
- Verify transcription quality
- Review logs in
output/logs/
- Use smaller Whisper model (tiny/base)
- Set
device: "cuda"if using GPU
- GPU Acceleration: Set
device: "cuda"in config for NVIDIA GPU - Faster-Whisper: Use
faster-whispermodel for better performance - Model Size: Smaller models (tiny/base) process faster
- Clean Temp: Enable
cleanup_temp: trueto save disk space
MIT License