lumiaclip
README.md
# LumiaClip š¬
**Turn long videos into short vertical clips ā free, open source, yours.**
LumiaClip is a free, open-source alternative to OpusClip. Give it a long
video (a file, or a link to YouTube / Twitch / Kick / other streaming sites)
and it transcribes it locally with Whisper, finds the best moments, cuts
vertical 9:16 clips with burned-in captions, and writes a title, description,
SEO tags, and a thumbnail for each clip. No paid APIs, no accounts, nothing
uploaded anywhere ā everything runs on your own machine.
An AI agent can drive the whole job through the built-in MCP server, or you
can use the interactive `lumia` CLI yourself ā including **Lumia Agent**, an
in-CLI chat that fixes clips on plain-language instructions.
> **Original code, original name.** LumiaClip reimplements the *idea* of
> clipping (transcribe ā find moments ā cut ā caption). It does not use
> OpusClip code, branding, or assets.
## Features (v0.1.0)
- **Input:** local video file by path (drag & drop into the terminal) or
social media links (YouTube, Twitch, Kick, other streaming sites) via
yt-dlp. Every failure has a fallback and a clear error message.
- **Platform filter first:** TikTok / YouTube Shorts / Instagram Reels /
Custom presets; clip lengths follow the platform cap; mixed 30s + 60s output.
- **Clip length:** 30s, 60s, or **AUTO** (the AI decides how many clips one
video yields). Remainder auto-split: a 1:40 video at 30s gives 4Ć30s + 1Ć20s.
- **AI analysis:** local Whisper transcription (faster-whisper, `tiny` model),
transcript segment scoring (hook, complete thought, pace, energy), best
moments ranked.
- **Output per clip:** vertical 9:16 video (720Ć1280), word-timed burned-in
captions inside one universal safe zone (middle band: 8% left / 82% right /
14% top / 70% bottom ā clear of the right-side buttons and bottom bar on
every platform), generated title, description, SEO tags, and two thumbnails
(`clip-NN-thumb.jpg` middle frame, `clip-NN-thumb-alt.jpg` early frame).
A separate `.srt` subtitle file is written per clip. Clips ranked by score.
- **Resume + project folders:** an interrupted job resumes from the failed
clip instead of starting over (job state is saved to `job-state.json` in
the run folder after every stage and clip). Finished jobs become named
project folders (from the clip titles) you can reopen with **View last
results** to change settings and re-export without re-processing.
- **Preview before export:** review each staged clip as a LARGE terminal
frame preview, as many times as you want, or open it in your system video
player with one key ā then confirm or reject it before anything is exported.
(Honest note: a terminal cannot play smooth video like a GUI. The CLI
preview is large still frames plus open-in-player; the v0.2.0 web UI plays
the video directly.)
- **Queue / batch:** clip several videos in one run. The queue is always
visible, with pending / running / done status per video.
- **Parallel jobs:** set how many clips are built at once to speed up the
queue (Settings menu). Warning: more parallel jobs needs a stronger machine
(CPU/RAM) and fast internet for link downloads; on a weak machine it is
slower, not faster.
- **Progress with percentage:** every job shows a progress bar with a
percentage, so you always know how far it is.
- **Lumia Agent chat in the CLI:** ask in plain language ā "make the captions
bigger", "use the second-best moment for clip 2", "make clip 2 60 seconds",
"change the title of clip 1 to ..." ā and Lumia Agent applies it.
- **Saved settings:** interface (CLI now, web UI in v0.2.0), default platform,
clip mode, language, output folder, max clips (AUTO mode, default 5), and
parallel jobs persist between runs (Settings menu).
- **MCP server (stdio):** the core. Tools for download, transcribe, analyse,
cut, clip assets, list results, and the full `clip_video` pipeline, so any
MCP-capable AI agent can run the whole job.
- **Languages:** program default English; content in English + Indonesian.
## Install
Requirements: Node.js 20+, Python 3.10+, ffmpeg.
```bash
git clone https://github.com/21xthSerenade/lumiaclip.git
cd lumiaclip
npm install
npm run build
# Python helpers (transcription + link downloads) in a venv:
python3 -m venv .venv
.venv/bin/pip install yt-dlp faster-whisper
# Make the commands available everywhere:
npm link
```
> **Whisper compatibility note:** faster-whisper 1.2.x calls
> `av.open(..., metadata_errors="ignore")`, but newer PyAV removed that
> keyword. `python/transcribe.py` ships a small compatibility shim that strips
> the unsupported keyword, so transcription works on any PyAV version.
## Quickstart
```bash
lumia # interactive menu
lumia clip video.mp4 --platform tiktok --mode auto
lumia clip video.mp4 video2.mp4 --platform shorts --mode 30 --lang id
lumia clip https://www.youtube.com/watch?v=... --platform reels --mode mixed
```
Interactive menu:
```
1. Clip a video
2. View last results
3. Chat with Lumia Agent (fix clips)
4. Change Language
5. Settings
6. Help
7. Connect AI Agent (MCP)
8. Exit
```
The clip flow asks for the source (file path or link ā several separated by
commas for a queue), the target platform, the clip mode, and the content
language, shows a summary, runs with a progress bar, then lets you preview
and confirm each clip before export. Results land in `./lumiaclip-output/`
(or your configured output folder) with a `result.json` manifest.
### What lands in a project folder
```
<output>/<project-slug-from-clip-titles>/
āāā clip-01.mp4 # staged clip (also in export/ once confirmed)
āāā clip-01.ass # burned-in caption source
āāā clip-01.srt # separate subtitle file, same timings
āāā clip-01-thumb.jpg # thumbnail option 1 (middle frame)
āāā clip-01-thumb-alt.jpg # thumbnail option 2 (early frame)
āāā transcript.json # Whisper word-timed transcript
āāā moments.json # picked moments + scores
āāā job-state.json # resume state (stage + per-clip status)
āāā project.json # project metadata for reopening
āāā result.json # manifest: titles, tags, scores, hook scores
āāā export/ # only the clips you confirmed
āāā clip-01.mp4
āāā clip-01-thumb.jpg
āāā clip-01.srt
```
### Lumia Agent chat
After a run, pick **Chat with Lumia Agent** and talk in plain language:
| Say | What happens |
| --- | --- |
| `make the captions bigger` / `smaller` | Caption font +8/ā8 px (28ā64), clips re-rendered |
| `use highlight captions` / `use classic captions` | Caption style switched, all clips re-rendered |
| `use thumbnail 2` / `use the other thumbnail` | Switches to the other thumbnail (no re-render) |
| `use the second-best moment for clip 2` | Clip rebuilt from the next-best moment |
| `make clip 2 60 seconds` | Clip rebuilt at the new length (10ā300s) |
| `change the title of clip 1 to My Title` | Title + thumbnail regenerated |
| `regenerate the thumbnail of clip 2` | Thumbnail rebuilt |
| `preview clip 1` | Large frame preview of that clip |
| `show clips` | List clips with score + hook score |
| `export` | Confirm (export) all remaining clips |
| `help` | List everything the chat understands |
| `quit` | Leave the chat |
The chat is a local offline intent parser (no LLM, no API keys). For full
free-form conversation, connect a real AI agent through the MCP server ā
that agent is also called Lumia Agent when it runs this stack.
## MCP server (for AI agents)
Start it:
```bash
lumiaclip-mcp
```
Add this to your MCP client config (Claude, Cursor, VS Code, ...):
```json
{
"mcpServers": {
"lumiaclip": {
"command": "node",
"args": ["/path/to/lumiaclip/dist/mcp.js"]
}
}
}
```
Or pick **Connect AI Agent** in the `lumia` menu ā it prints the exact config
for your machine.
**Tools:** `download_video`, `transcribe_video`, `analyse_moments`,
`cut_clips`, `clip_assets`, `list_results`, `clip_video`.
**Agent with its own VM (e.g. Hoshilily):** send the agent the repo URL. The
agent clones it, runs `npm install && npm run build`, starts the MCP server
with the config above, and it auto-connects. The agent ā Lumia Agent ā can
then: analyse which parts of a video are good to clip, cut the clips, write
captions, titles, descriptions, SEO tags, and thumbnails.
## Platform presets
| Platform | Max clip | Lengths | Default (AUTO) |
| -------- | -------- | ------- | -------------- |
| TikTok | 600s | 30, 60 | 30s |
| YouTube Shorts | 180s | 30, 60 | 60s |
| Instagram Reels | 540s | 30, 60, 90 | 60s |
| Custom | 600s | 30, 60, 90 | 30s |
## Troubleshooting / fallbacks
| Problem | What LumiaClip does |
| ------- | ------------------- |
| Link cannot be downloaded (site blocks yt-dlp) | Clear error + asks for the video file instead |
| yt-dlp fails with `SSL: CERTIFICATE_VERIFY_FAILED` | Your network intercepts TLS (corporate / VPN / egress proxy). On a normal network the same link works. Workaround: download the file yourself and give LumiaClip the path |
| Whisper not installed / transcription fails | Falls back to equal time split, says so in the output |
| No strong moments in the transcript | Falls back to equal time split |
| File not found / not a video | Clear error + how to fix it (drag & drop the file) |
| Clip over the platform cap | Lengths are clamped to the platform preset |
| A video fails in a direct-mode queue (`lumia clip a.mp4 b.mp4`) | The queue stops at the first failed input and exits 1. In the interactive menu the queue continues with the next video instead |
## Roadmap
- **v0.2.0 ā localhost web UI.** Design direction in [`docs/DESIGN.md`](docs/DESIGN.md):
dark minimal console (reference: "Collaborating Inside the Console" by
Jeremy Blaze), AI chat panel left, clip list middle, clip preview/editor
right, terminal/log strip bottom; very dark blue-black background
(`#06070B`-ish), white/grey text, teal accent `#64BACE`. Chat integrated in
the console, not a popup.
- Later: virality scoring, face-tracking reframe, auto-posting.
## License
MIT ā see [LICENSE](LICENSE). Made by 21xthSerenade.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues