Open-source alternative to OpusClip - Transform long-form videos into engaging YouTube Shorts automatically using AI-powered transcription, clip detection, and viral title generation. Built on the powerful clipsai library.
| Feature | ClippedAI | OpusClip |
|---|---|---|
| Cost | 100% Free | $39/month |
| Privacy | Local processing | Cloud-based |
| Customization | Fully customisable | Limited options |
| API Keys | Free (HuggingFace + Groq) | Paid subscriptions |
| Offline Use | Works offline (with no auto titles) | Requires internet |
| Source Code | Open source | Proprietary |
| Model Control | Choose your own models | Fixed models |
| Transcription Caching | Save time & money | No caching |
Perfect for: Content creators, developers, and anyone who wants professional video editing capabilities without the monthly subscription costs!
bash
git clone https://github.com/Shaarav4795/ClippedAI.git
cd ClippedAI
```bash # On macOS/Linux python3 -m venv env source env/bin/activate
# On Windows python -m venv env env\Scripts\activate ```
bash
pip install -r requirements.txt
```bash # macOS (using Homebrew) brew install ffmpeg
# Ubuntu/Debian sudo apt update && sudo apt install ffmpeg
# Windows (using Chocolatey) choco install ffmpeg
# Or download from https://ffmpeg.org/download.html ```
```bash # Copy the example environment file cp .env.example .env
# Edit the .env file with your API keys: nano .env ```
Go to HuggingFace and create a free account
Request access to Pyannote models
Click "Access repository" and accept the terms
Create your API token
Copy the token immediately (you won't see it again)
Add the token to your environment file
.env file and replace your_huggingface_token_here with your actual tokenHUGGINGFACE_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxNote: The first time you run the script, it will download the Pyannote models (~2GB). This may take several minutes depending on your internet connection.
.env file where GROQ_API_KEY=your_groq_api_key_hereCost: Both API keys are completely free to use!
The script uses Whisper models via clipsai. Choose based on your hardware:
| Model | Size | Speed | Accuracy | RAM Usage | Best For |
|---|---|---|---|---|---|
tiny |
39MB | Very Fast | Low | 1GB | Quick testing, basic accuracy |
base |
74MB | Fast | Medium | 1GB | Good balance, most users |
small |
244MB | Moderate | High | 2GB | Better accuracy, recommended |
medium |
769MB | Slow | Very High | 4GB | High accuracy, good hardware |
large-v1 |
1550MB | Very Slow | Excellent | 8GB | Best accuracy, powerful hardware |
large-v2 |
1550MB | Very Slow | Excellent | 8GB | Latest model, best results |
For CPU-only systems:
tiny or basesmall or mediumlarge-v1 or large-v2For GPU systems:
large-v2 (best results)medium or large-v1The transcription model can be configured via the TRANSCRIPTION_MODEL environment variable in your .env file:
TRANSCRIPTION_MODEL=large-v1 # Options: tiny, base, small, medium, large-v1, large-v2
ClippedAI/
├── main.py # Main application script
├── requirements.txt # Python dependencies
├── README.md # This file
├── input/ # Place your videos here
│ ├── video1.mp4
│ ├── video2.mp4
│ └── *_transcription.pkl # Cached transcriptions (auto-generated)
├── output/ # Generated YouTube Shorts
│ ├── clip1.mp4
│ ├── clip2.mp4
│ └── ...
└── env/ # Virtual environment (created during setup)
All key settings can now be configured through the .env file or within main.py for subtitle styling.
input/ folderbash
cp /path/to/your/video.mp4 input/
bash
python main.py
Let AI process and create your YouTube Shorts
Find your results in the output/ folder
The script uses Montserrat Extra Bold for subtitles (from Google Fonts). To change fonts:
fonts/ directorymain.py line 158:python
SUBTITLE_FONT = "Your-Font-Name"
create_animated_subtitles function to reference the new fontAll key settings can now be configured through the .env file:
| Variable | Default | Description |
|---|---|---|
HUGGINGFACE_TOKEN |
your_huggingface_token_here | HuggingFace API token for speaker diarization |
GROQ_API_KEY |
your_groq_api_key_here | Groq API key for viral title generation |
MIN_CLIP_DURATION |
45 | Minimum duration in seconds for YouTube Shorts |
MAX_CLIP_DURATION |
120 | Maximum duration in seconds for YouTube Shorts |
TRANSCRIPTION_MODEL |
medium | Whisper model to use (tiny, base, small, medium, large-v1, large-v2) |
ASPECT_RATIO_WIDTH |
9 | Width for aspect ratio (used with height for video resizing) |
ASPECT_RATIO_HEIGHT |
16 | Height for aspect ratio (used with width for video resizing) |
The AI uses multiple factors to select the best clips:
"No module named 'clipsai'"
pip install clipsai
"FFmpeg not found"
"CUDA out of memory"
"Font not found"
"API key errors"
"HuggingFace access denied"
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license - see the LICENSE file for details.
Star this repository if you find it helpful!
$ claude mcp add ClippedAI \
-- python -m otcore.mcp_server <graph>