Skip to content

Riotcoke123/clipper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream Clipper

High-performance automated highlight capture for live broadcasts.

Overview

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.

Key Features

  • 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-sqlite3 with 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.

Project Structure

├── 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

Deployment

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.sh

Production Maintenance

Manage 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.

Configuration

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

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 56.1%
  • CSS 20.7%
  • Shell 13.1%
  • HTML 10.1%