-
-
Notifications
You must be signed in to change notification settings - Fork 36
Getting Started
Muhammad Naufal Rizqullah edited this page Jun 26, 2026
·
1 revision
This guide walks you through setting up OpenSource Clipping on your local machine.
| Requirement | Details |
|---|---|
| Python | 3.10 or higher |
| FFmpeg | Must be installed and available in PATH |
| GPU (CUDA) | Recommended for Whisper transcription (CPU fallback available) |
| Google Gemini API Key | Required β Get one here |
| Pexels API Key | Optional, for B-roll footage β Get one here |
| HuggingFace Token | Optional, for split-screen / camera-switch β Get one here |
Note: If you plan to use split-screen or camera-switch podcast modes, you must also accept the Pyannote model agreement on HuggingFace.
git clone https://github.com/NaufalRizqullah/opensource-clipping.git
cd opensource-clippingChoose one of the following methods:
# Using pip (standard)
pip install -r requirements.txt
# Using uv (faster alternative)
uv sync# Copy the template
cp .env.sample .envThen edit the .env file and add your API keys:
GOOGLE_API_KEY=your-gemini-api-key-here
PEXELS_API_KEY=your-pexels-api-key-here # Optional
HF_TOKEN=your-huggingface-token-here # Optional (for podcast modes)
NVIDIA_API_KEY=your-nvidia-api-key-here # Optional (for NVIDIA NIM provider)python main.py --url "https://youtube.com/watch?v=VIDEO_ID"That's it! The pipeline will:
- Download the video
- Transcribe it with Whisper
- Analyze it with Gemini AI
- Generate highlight clips with subtitles, thumbnails, and metadata
All generated files are saved in the outputs/ directory:
outputs/
βββ <video_hash>/
βββ highlight_rank_1_ready.mp4 # Final rendered clip (Rank 1)
βββ highlight_rank_2_ready.mp4 # Final rendered clip (Rank 2)
βββ thumbnail_rank_1.jpg # Auto-generated thumbnail
βββ thumbnail_rank_2.jpg
βββ render_manifest.json # Manifest with metadata for all clips
βββ metadata_preview.json # Gemini-generated metadata
βββ gemini_response.json # Raw AI response (for debugging)
βββ video_asli.mp4 # Downloaded source video
python main.py --url "VIDEO_URL" --clips 7 --ratio "9:16"python main.py --url "VIDEO_URL" --ratio "16:9" --clips 5python main.py --url "PODCAST_URL" --split-screen --dynamic-split --split-trigger facepython main.py --url "VIDEO_URL" --no-subs --no-bgm --no-broll| Platform | Flag | Example |
|---|---|---|
| YouTube |
--source youtube (default) |
--url "https://youtube.com/watch?v=..." |
| TikTok | --source tiktok |
--url "https://www.tiktok.com/@user/video/..." |
--source instagram |
--url "https://www.instagram.com/reel/..." |
|
| Google Drive | --source gdrive |
--url "https://drive.google.com/file/d/..." |
- π Read the full CLI Reference for all available options
- ποΈ Learn about Podcast Modes for multi-speaker content
- βοΈ No GPU? Check the Google Colab Guide