Skip to content

Automated video clipping pipeline - #30

Merged
dazzatronus merged 12 commits into
shotstack:masterfrom
musab123-afk:add-video-clipping-pipeline
Nov 20, 2026
Merged

dazzatronus merged 12 commits into
shotstack:masterfrom
musab123-afk:add-video-clipping-pipeline

Conversation

@musab123-afk

Copy link
Copy Markdown
Collaborator

Companion code for Build a video clipping pipeline with the Shotstack API. It turns a long recording into five short vertical clips with captions:

  1. The Ingest API imports the recording and makes an SRT transcript.
  2. An AI model picks the moments by quoting their first and last words. It works with any provider that has an OpenAI-compatible chat API (OpenAI, Anthropic, Google Gemini and others), set with AI_BASE_URL, AI_API_KEY and AI_MODEL, through plain requests. Rate limits and server errors from the AI provider are tried again; a request to the model can't start a render. The script finds the quotes in the transcript and checks each moment (15 to 60 seconds, inside the recording, no overlap).
  3. Each clip is one render. Its captions are the transcript lines inside the moment, written as a small SRT file and uploaded with the Ingest API, so nothing is transcribed a second time.
  4. manifest.json records every step, so a second run continues where the first stopped and never pays for a render twice.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
reelestate Ignored Ignored Preview Nov 17, 2026 4:10am UTC

@dazzatronus dazzatronus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dazzatronus
dazzatronus merged commit 28de522 into shotstack:master Nov 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants