cd ../projects
AI · Media Pipeline·2026·private repository

ClipN

AI that turns long videos into ready-to-post short clips

private repository
clipn · landing

An AI pipeline that ingests long-form video (upload or a YouTube/Twitch URL), finds the best moments, reframes them vertical with face-tracking, burns in animated captions, and exports platform-ready Shorts, Reels, and TikToks.

$ cat problem.md

Creators spend hours manually scrubbing long videos to cut shorts: finding moments, reframing to 9:16, and captioning by hand.

$ whoami --role

Design & build (solo)

  • Python
  • faster-whisper
  • Claude
  • MediaPipe
  • FFmpeg
  • SSE

$ cat approach.md

  1. 01Word-level transcription with faster-whisper, cached and reused across regenerations
  2. 02Highlight detection via LLM scoring (Claude) fused with audio features, tuned per content vertical
  3. 03Smart 9:16 reframing: center-crop, MediaPipe face-tracking, split-screen, or letterbox
  4. 04Single-pass FFmpeg: clip + reframe + caption in one encode (~60% faster than chained encodes)
  5. 05Parallel clip processing and SSE streaming so clips appear in the UI as each finishes
  6. 06Live job pipeline with per-stage observability (probe, transcribe, detect highlights, encode)

$ ls highlights/

Single-pass FFmpeg: ~60% faster than chained encodes
7 caption styles incl. word-by-word karaoke
Prompt-guided clipping ("find the funny moments")
AI-generated retention hooks at clip start
Multi-tenant studio with per-client workspaces
Brand kit + public developer API (OpenAPI)

$ cat api.md

REST · OpenAPI 3.1 · FastAPI·/api/v1·auth: Bearer session token · scoped API keys · SSE via ?token=

ClipN's API turns long-form video into ready-to-post shorts and runs a multi-tenant clip studio on top: upload or ingest a URL, stream clips over SSE as they render, spin up stylistic variants, manage per-client brand kits, and ship a magic-link client review portal. 80+ endpoints across 15 capability areas; a few highlights below.

// Rendering is offloaded to a HyperFrames sidecar (documented on the full-spec page). Full, $ref-resolved reference at the link below.

Videos & clips

POST

/api/v1/videos

Upload a video (multipart); optional client scoping.

POST

/api/v1/ingest/url

Submit a YouTube/Twitch URL for download + processing.

POST

/api/v1/videos/{id}/generate

Trigger AI clip generation (count, duration, vertical, hooks).

GET

/api/v1/videos/{id}/clips/stream

SSE: clips pushed to the UI as each finishes rendering.

POST

/api/v1/clips/{id}/variants

N stylistic variants (caption × reframe × hook), no re-transcribe.

GET

/api/v1/clips/{id}/download

Download in 9:16 / 16:9 / 1:1 / 4:5 (FFmpeg, cached).

Studio: clients, portal & brand

POST

/api/v1/clients/{id}/invite

Email a magic-link token (shown once) to a client.

POST

/api/v1/portal/clips/{id}/review

Client approves / rejects / requests revision (append-only log).

PUT

/api/v1/brand

Per-client brand kit: colors, watermark, intro/outro, avatar.

POST

/api/v1/brand/apply-to-existing

Queue a scoped rebrand of every ready clip; never cross-applies.

Pipeline, social & platform

GET

/api/v1/operations/stream

SSE: background job status (queued/running/failed/retrying).

POST

/api/v1/clips/{id}/publish

Publish a clip to a connected social platform.

POST

/api/v1/ingestion/sources

Auto-poll a YouTube channel and clip new uploads.

POST

/api/v1/api-keys

Mint a rate-limited API key (per-hour quota).

POST

/api/v1/auth/signin

Beta-code sign-in → session token.

Examples

sign in → ingest → stream clips
# 1 · sign in (beta) → session token
curl -X POST $API/api/v1/auth/signin -H 'Content-Type: application/json' \
  -d '{"email":"you@studio.com","beta_code":"..."}'

# 2 · ingest a YouTube URL
curl -X POST $API/api/v1/ingest/url -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' -d '{"url":"https://youtu.be/..."}'

# 3 · stream clips as they render (SSE; EventSource can't set headers)
curl -N "$API/api/v1/videos/$VIDEO/clips/stream?token=$TOKEN"
response
// POST /api/v1/auth/signin → 200
{
  "token": "sess_…",
  "user_id": "…",
  "email": "you@studio.com",
  "expires_at": "2026-07-01T00:00:00Z"
}

$ ls screenshots/

clipn · workspace
clipn · processing pipeline
clipn · brand kit
clipn · clients