Skip to content

Add sports-highlight-videos example - #20

Merged
dazzatronus merged 3 commits into
shotstack:masterfrom
soniasriv:add-sports-highlight-videos
Sep 28, 2026
Merged

dazzatronus merged 3 commits into
shotstack:masterfrom
soniasriv:add-sports-highlight-videos

Conversation

@soniasriv

@soniasriv soniasriv commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Companion code for the sports vertical: one vertical highlight video per match from a full recording and a list of goals.

Rebuilt 24 Sep after review. The first version was mostly 16:9 with heavy overlays. This version is vertical, with no text overlays or transitions.

What it does: edit.mjs trims a 10 s clip at each goal with trim and joins them with start: "auto" in one render, in a 1080x1920 frame: the full landscape footage sits in the middle over a blurred, darker copy of the same clip, so nothing is cropped or blown up (the source is 1024x576), with the match sound lowered under music. Each at starts about 3 s before the build-up, so a clip shows the attack, the goal and the celebration.

Related guide: https://shotstack.io/learn/automated-sports-highlight-video-api/

Shotstack does not find the moments. The recipe starts from timestamps that come from the user's own tagging or a detection model, and the README says so.

Changed from the first version: vertical instead of sd 16:9; the scoreboard, lower thirds and title cards are removed (they also clashed with the broadcast scoreboard already in the footage); match.json keeps only the fields the code reads.

Verified: prettier clean; every generated Edit JSON passes shotstack validate; a fresh clone with no key, a wrong key and a bad SHOTSTACK_ENV each print one line and exit 1; a rejected key stops the batch after one line; README claims checked against the code; rendered end to end on stage with the ids below.

Stage render (28 Sep): ottoville-v-ottawa-hills fee7abff-6ea7-4140-b21b-429d9dd2eb99, 30 s. Watch: https://cdn.shotstack.io/au/stage/m0018rioc2/fee7abff-6ea7-4140-b21b-429d9dd2eb99.mp4

The three vertical PRs (#17, #18, #20) edit the example list in the root README; keep every bullet when resolving.

@vercel

vercel Bot commented Sep 18, 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 Sep 28, 2026 5:18am UTC

@soniasriv
soniasriv force-pushed the add-sports-highlight-videos branch from 0f94bbd to 508f50a Compare September 24, 2026 07:25
@dazzatronus
dazzatronus merged commit 32b103f into shotstack:master Sep 28, 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