A Node.js web app that clips specific segments from YouTube videos and exports them as new video files without downloading the entire video.

Stars

70

7-day growth

No data

Forks

10

Open issues

0

License

No data

Last updated

2026-07-14

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It offers real-time progress via SSE, caching of metadata and source videos, queue concurrency control, and comprehensive error handling, all wrapped in a clean REST API with a simple frontend.

Who it is for

  • Developers seeking a self-hosted YouTube clipping API
  • Content creators who need to extract short clips for social media
  • Video editors wanting to automate clip extraction from YouTube
  • Users who prefer not to install desktop software for simple clipping

Use cases

  • Extracting highlight moments from long YouTube videos
  • Creating short clips for repurposing on other platforms
  • Converting video segments to MP3 or extracting audio
  • Batch clipping multiple segments from the same video using caching

Strengths

  • Real-time progress streaming via Server-Sent Events for each job
  • Intelligent caching avoids re-downloading the same video source
  • Queue with configurable concurrency prevents resource overload
  • Security measures: rate limiting, input validation, path traversal protection

Considerations

  • Requires manual installation of yt-dlp (no automatic fallback provided)
  • External dependencies on FFmpeg (though static fallback exists) and Python for yt-dlp
  • Disclaimer prohibits commercial resale of the software itself (MIT license may override but README states otherwise)

README quick start

YouTube Video Clipper v1

Tools untuk mengambil bagian tertentu (clip) dari video YouTube dan mengekspornya menjadi file video baru — tanpa perlu mengunduh seluruh video secara manual.

Dibangun dengan Node.js + Express, yt-dlp untuk pengambilan video, dan FFmpeg untuk pemotongan/encoding. Progress real-time menggunakan Server-Sent Events.


Fitur

  • Ambil metadata video (judul, thumbnail, durasi, channel, resolusi, subtitle) tanpa download
  • Potong video berdasarkan rentang waktu (startend) dengan pilihan resolusi output
  • Progress real-time (downloading → clipping → encoding → finished) via SSE
  • Cache metadata & source video (tidak download ulang video yang sama)
  • Auto-cleanup file setelah 30 menit
  • Rate limiting, validasi input, sanitasi filename, proteksi path traversal
  • Fitur bonus: convert ke MP3, extract audio, watermark, ubah FPS, compress, crop, burn subtitle, merge clip (lihat services/ffmpeg.service.js)

Struktur Project

youtube-clipper/
├── app.js                  # Entry point
├── config/                 # Konfigurasi & konstanta
├── routes/                 # Definisi endpoint
├── controllers/             # Request/response handler
├── services/                 # Business logic (yt-dlp, ffmpeg, job, queue, cache, cleanup)
├── middleware/               # Validator, rate limiter, security, error handler
├── utils/                    # Helper murni (validator, logger, sanitizer, dll)
├── views/ + public/          # Frontend (EJS + vanilla JS + CSS)
├── scripts/                   # Script maintenance (checkDependencies, clean)
├── temp/ downloads/ output/ logs/   # Folder runtime (auto-dibersihkan)

1. Instalasi

Prasyarat

  • Node.js ≥ 18 LTS
  • Python 3 (untuk instalasi yt-dlp via pip) — opsional jika pakai binary langsung
  • FFmpeg (opsional install manual — project sudah menyediakan fallback via ffmpeg-static)

Install dependency Node.js

git clone https://github.com/ray4rt/yt-clip
cd yt-clip
npm install

Install FFmpeg (opsional, untuk performa & codec terbaik)

Ubuntu/Debian

sudo apt update && sudo apt install -y ffmpeg

macOS

brew install ffmpeg

Windows

  1. Download dari https://www.gyan.dev/ffmpeg/builds/
  2. Extract, tambahkan folder bin ke PATH
  3. Verifikasi: ffmpeg -version

Jika FFmpeg sistem tidak ditemukan, aplikasi otomatis f

Related repositories

Similar projects matched by category, topics, and programming language.

react
Featured
react GitHub avatar

react

React is a JavaScript library for building user interfaces with declarative, component-based, and cross-platform design.

Web DevelopmentFrontend Frameworks
246,741
tandpfun
Featured
tandpfun GitHub avatar

wardrobe

A GPT‑image powered app that extracts individual garment cutouts from photos, organizes them into a digital wardrobe, and generates modeled outfit previews.

JavaScript
1,570
mshumer
Featured
mshumer GitHub avatar

Claude-of-Duty

A browser-based first-person shooter built entirely with procedural generation and orchestrated AI agents, featuring 55k lines of Three.js/WebGL2 code and no art assets.

AI & Machine LearningAI Agents
1,234