Skip to content

All work

case study · 2026 · 2 min read

ClipStack

Automated short-form video pipeline. Long videos dropped in Google Drive are clipped into highlights and published as YouTube Shorts, orchestrated with n8n.

Role
Architecture, gateway, workflows and operations
Stack
n8nFastAPIDockerYouTube Data APIGoogle Drive APIKagglenginx
Links
Live Private repo, walkthrough on request
ClipStack preview

6

Workflows

3

Posts per day

5

Model fallbacks

Problem

Turning a long recording into a handful of vertical Shorts is tedious: watch, pick moments, cut, caption, upload, repeat. I wanted to drop a file into a folder and have good clips appear on a channel on a schedule, without babysitting it and without paying for a GPU that sits idle most of the day.

Role

I designed the pipeline, wrote the AI gateway and the n8n workflow generator, built the download sidecar, and operate it on my VPS. The clipping engine itself is the open-source AutoClip project, pinned to a release and left unmodified.

Stack

  • n8n for orchestration: six workflows generated from a Python script so they stay in version control.
  • FastAPI gateway that presents one OpenAI-compatible endpoint and routes to NVIDIA, Gemini, DeepSeek and a Kaggle-hosted Ollama in a configurable order.
  • Google Drive and YouTube Data APIs called as plain HTTP requests from n8n.
  • Docker Compose overlays on AutoClip's own compose file, with every container bound to localhost behind the host's nginx.

Decisions and trade-offs

A gateway instead of a model. Free and cheap model tiers rate-limit and go down. Every route in the gateway has a different company in second place, so one outage never blocks the pipeline, and the order follows a live speed test.

GPU on demand, not on standby. When every cloud model fails, the gateway pushes a private Kaggle notebook running Ollama, waits for it to register, uses it, and the notebook stops itself after 15 idle minutes. Free GPU hours are a weekly budget, so the pipeline spends them only as a last resort.

Drive as the state machine. Files move between Inbox, Processed, All clips, Post, Posted and Needs review folders, and n8n stores AutoClip IDs and statuses as Drive file properties. Anyone can see and change the pipeline's state with a file manager.

Never retry an upload automatically. A YouTube timeout can happen after the video was accepted. A failed post goes to Needs review for a human, because a duplicate Short is worse than a late one.

Result

Drop a video in a folder and, within about 20 minutes, scored clips are in Drive and the best ones are queued. Three Shorts go out a day at fixed IST times, well inside the 10,000-unit YouTube quota. The same stack also watches a list of channels and emails me about new uploads, and a hosted form downloads any video URL straight into the inbox.

What I'd do differently

Clip scoring is still AutoClip's opinion. I would add a small review step with thumbs up or down and use it to tune the score threshold per channel. I would also move the gateway's speed test from a cron job to a rolling measurement of real requests.