How to find every cut in a video, with timestamps

One call to /v1/frames returns technical.scene_cuts as a list of seconds, alongside a pacing summary with the segment count, the median and shortest segment, and cuts per minute. You do not have to infer cuts from looking at frames — the numbers come from a decode of every frame, and the sheets are there to check them against.

Last updated

The call

Copy this as it stands. “Where are all the cuts in this video, and how fast is it cut?” is the question it answers.

Ask an agenttext
Watch this and list every cut with its timestamp:
https://www.tiktok.com/@user/video/7300000000000000000
TypeScript SDKts
import { Playhead } from "@playhead/sdk";

const playhead = new Playhead();
const video = await playhead.watch({ url });

if (video.technical?.skipped) {
  // An empty list here would mean nobody looked, not that there are no cuts.
  throw new Error("the detectors did not run on this window");
}

for (const t of video.technical?.scene_cuts ?? []) {
  console.log(`cut at ${t.toFixed(2)}s`);
}
console.log(video.technical?.pacing);
cURLbash
curl -X POST https://api.tryplayhead.com/v1/frames \
  -H "Authorization: Bearer $PLAYHEAD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.tiktok.com/@user/video/730…"}' \
  | jq '.technical'

What comes back

Abbreviated, but real in shape — these are the field names the API actually sends.

Responsejson
{
  "scene_cuts": [1.24, 2.88, 4.02, 5.6, 7.14],
  "pacing": {
    "cuts": 5,
    "segments": 6,
    "median_segment_seconds": 1.4,
    "shortest_segment_seconds": 1.14,
    "cuts_per_minute": 24.6
  },
  "skipped": false
}

Watch out for

Everything the API can refuse, and what to send instead, is on the errors page.