High-performance automated highlight capture for live broadcasts.
Stream Clipper is a production-ready utility designed to capture and process highlights from live broadcasts. By leveraging yt-dlp for stream resolution and FFmpeg for segmented recording, it provides a seamless way to generate high-quality .mp4 clips from active live streams.
- Broad Platform Support: Native handling for YouTube, Twitch, Kick, and Odysee.
- Dynamic Quality Profiles: Support for multiple resolutions (360p, 720p, 1080p) to balance file size and visual fidelity.
- Reliable Job Management: Powered by
better-sqlite3with Write-Ahead Logging (WAL) for persistent, concurrent task tracking. - Instant Distribution: Integrated one-click uploads to hosting providers like Catbox and qu.ax.
- Automated Hardening: Includes security scripts for UFW and Fail2ban to protect production instances.
├── clipper.js # Core Express router & job logic
├── public/
│ ├── clipper.html # Responsive frontend UI
│ └── clipper.css # Custom styling & dark mode
├── deploy.sh # One-touch Ubuntu deployment script
├── harden.sh # Security and firewall configuration
└── ecosystem.config.js # PM2 process management
The project includes a deploy.sh script that automates the installation of Node.js 20, FFmpeg, Nginx, and SSL certificates via Certbot.
# Deploy to an Ubuntu/Debian server
git clone https://github.com/Riotcoke123/clipper.git
cd clipper
bash deploy.shManage the application lifecycle using the included PM2 configuration:
npm run prod: Start the clipping engine in the background.npm run logs: View real-time capture and system logs.bash harden.sh: Apply firewall rules and rate-limiting.
Modify behavior via environment variables or a .env file:
| Variable | Description |
|---|---|
MAX_CLIP_SECONDS |
Maximum length of a single clip (Default: 300s) |
CLIP_OUTPUT_DIR |
Path where processed MP4s are stored |
DB_PATH |
Path to the SQLite database file |
© 2024 Riotcoke123 • Licensed under ISC