A Python tool for automatically extracting highlight clips from Twitch VODs of Deadlock gameplay.
Deadlock Highlight Clipper is a utility that:
- Connects to the Twitch API to retrieve VODs from a specified channel
- Fetches match data from the Deadlock API for a specific player
- Detects significant events in the matches
- Extracts video clips of these events from the Twitch VODs
- Saves the clips with descriptive filenames for easy organization
This tool is perfect for content creators, streamers, or players who want to automatically extract their best moments from Deadlock gameplay without manually reviewing hours of footage.
- Twitch Integration: Automatically retrieves VODs from a specified Twitch channel
- Deadlock API Integration: Fetches detailed match data and player statistics
- Event Detection: Identifies significant gameplay events
- Clip Extraction: Precisely extracts video clips of detected events
- Organized Output: Saves clips with descriptive filenames including event type, timestamp, and player information
- Twitch API credentials (Client ID and Access Token)
- twitch-dl command-line tool
-
Clone the repository:
git clone https://github.com/yourusername/deadlock-highlight-clipper.git cd deadlock-highlight-clipper -
Install dependencies:
pip install -e . -
Set up environment variables:
export TWITCH_CLIENT_ID=your_client_id export TWITCH_ACCESS_TOKEN=your_access_token
Run the tool with the following command:
python -m deadlock_highlight_clipper -c CHANNEL_ID -s STEAM_ID3
Where:
CHANNEL_IDis the Twitch channel ID to extract VODs fromSTEAM_ID3is the Steam ID3 of the player whose highlights you want to extract
Example:
python -m deadlock_highlight_clipper -c 12345678 -s 76561198123456789
Clips are saved in the following directory structure:
events/
├── {steam_id}/
│ ├── {video_id}/
│ │ ├── {match_id}/
│ │ │ ├── {start_time}-{end_time}-{event_name}-{event_details}.mp4
The event detection system is designed to be extensible. To add new event types:
- Create a new class that inherits from the
Eventbase class - Implement the required methods:
detect()andfilename_postfix() - Add your new event class to the
EventDetector.detect_events()method
- Deadlock API for providing match data
- Twitch API for VOD access
- twitch-dl for VOD downloading capabilities