# Video Scene Detection & Shot List: Cut Timecodes to CSV (`data-done-right/video-scene-detection`) Actor

Video scene detection and shot list: find every cut in video URLs, get scene start and end timecodes, frames and durations as CSV, JSON or EDL, with thumbnails and optional clips per scene. No API key.

- **URL**: https://apify.com/data-done-right/video-scene-detection.md
- **Developed by:** [Data Done Right](https://apify.com/data-done-right) (community)
- **Categories:** Videos, AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.80 / 1,000 video minute scanneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Video Scene Detection & Shot List: Cut Timecodes to CSV

This **video scene detection** Actor finds every cut in a video file and gives you a **shot list**: one row per scene with start and end timecodes, frame numbers, duration and a thumbnail, plus a CSV, JSON or EDL file. Paste direct video links, set a threshold, get the scene cuts. It runs ffmpeg, so there is no browser, model or API key to set up. It can also split each scene into its own clip file.

**What you get**

- A **shot list** per video: `sceneIndex`, `startTimecode`, `endTimecode`, `startTime`, `endTime`, `duration`, `startFrame`, `endFrame`, `cutScore`, `thumbnailUrl`.
- A **summary row** per video: duration, fps, resolution, codec, `sceneCount`, and a link to the shot list file (CSV by default, or JSON or EDL).
- Optional **clip files**, one per scene (stream copy or frame-accurate), and a thumbnail from the middle of every scene.

> **Limits, up front.** It detects **hard cuts** (a sudden change between two shots) well. Slow fades and dissolves are detected unreliably; see the FAQ. It reads **direct video files** (mp4, webm, mov, mkv...) from a URL or your own key-value store. It **does not download from YouTube, Vimeo, TikTok, Instagram or other streaming sites**, and rejects those links without charge. It does not read HLS/DASH playlists. Use it only on videos you own or have the right to process.

### How to detect scenes in a video

1. Paste one or more **direct video URLs** (or the keys of video files in a key-value store).
2. Set the **scene cut threshold** (0.3 is a good start) and the **minimum scene length** (1 second).
3. Run it. Read the shot list from the dataset (one `scene` row per shot) or download the CSV from the key-value store (`exportUrl` on the `video` row).

### Input example

```json
{
  "videoUrls": ["https://test-videos.co.uk/vids/sintel/mp4/h264/360/Sintel_360_10s_1MB.mp4"],
  "sceneThreshold": 0.3,
  "minSceneSeconds": 1,
  "exportFormat": "csv",
  "thumbnails": true
}
```

The sample is a 10 second excerpt of Sintel (Blender Foundation, CC BY 3.0).

### Output

One `video` row, then one `scene` row per shot (from a real run of the input above):

```json
{
  "rowType": "video", "status": "ok",
  "videoUrl": "https://test-videos.co.uk/vids/sintel/mp4/h264/360/Sintel_360_10s_1MB.mp4",
  "videoIndex": 1, "durationSec": 10.0, "durationTimecode": "00:00:10.000", "fps": 24.0,
  "width": 640, "height": 360, "codec": "h264", "sceneCount": 6, "scenesReturned": 6,
  "avgSceneSeconds": 1.667, "minutesCharged": 1, "exportFormat": "csv",
  "exportUrl": "https://api.apify.com/v2/key-value-stores/.../records/v01-shot-list.csv",
  "sceneThreshold": 0.3, "minSceneSeconds": 1.0,
  "notes": ["2 detection(s) closer than minSceneSeconds (1s) to the previous cut were merged"]
}
```

```json
{
  "rowType": "scene", "videoIndex": 2, "sceneIndex": 2,
  "startTime": 2.417, "endTime": 4.0, "duration": 1.583,
  "startTimecode": "00:00:02.417", "endTimecode": "00:00:04.000",
  "startFrame": 58, "endFrame": 95, "cutScore": 0.3704,
  "thumbnailUrl": "https://api.apify.com/v2/key-value-stores/.../records/v01-scene-0002.jpg"
}
```

`endFrame` is the last frame of the scene; the next scene starts at `endFrame + 1`. `cutScore` is ffmpeg's scene score (0 to 1) of the cut that starts the scene (empty for the first scene). With `exportClips` the scene rows also carry `clipUrl`. The `SUMMARY` record in the key-value store lists every video with its status, notes and any error.

The CSV for that run:

```csv
sceneIndex,startTimecode,endTimecode,startTime,endTime,duration,startFrame,endFrame,cutScore
1,00:00:00.000,00:00:02.417,0.0,2.417,2.417,0,57,
2,00:00:02.417,00:00:04.000,2.417,4.0,1.583,58,95,0.3704
3,00:00:04.000,00:00:05.833,4.0,5.833,1.833,96,139,0.4119
```

### How to make a shot list for a video

Use the CSV (default) or JSON export, or the dataset itself. Each row is a scene with its start and end as `HH:MM:SS.mmm`, in seconds, and as frame numbers, so you can open it in a spreadsheet, a script or an editing checklist. A video with no detected cut is returned as one scene, with a note.

### How to export scene cuts as an EDL

Set `exportFormat` to `edl`. You get a CMX3600-style cut list with one event per scene, source and record times identical, **non-drop-frame** timecode computed from the frame number at the video's nominal frame rate (30 for 29.97 material). Check it in your editing tool before relying on it for conform work: this Actor does not read the source's embedded timecode track, so times start at 00:00:00:00.

### How to split a video into scenes

Turn on `exportClips`. Every scene (up to `maxClipsPerVideo`, 25 by default) is saved as its own file.

- **Stream copy** (default): no re-encoding, fast and lossless, but each clip starts at the keyframe at or before the scene start, so it can begin a little early. The scene rows give the exact times.
- **Accurate**: re-encodes to H.264/AAC MP4 for frame-accurate starts; slower.

### Tuning the detection

- **Threshold** `sceneThreshold` (0.01 to 0.99, default 0.3): lower finds more and softer changes (and more false cuts from camera motion or flashes); higher finds only very hard cuts.
- **Minimum scene length** `minSceneSeconds` (default 1): a cut is ignored if the scene before it would be shorter than this. The first cut of a cluster is kept, so a fade or flash that triggers several detections in a row becomes one cut. Set 0 to keep everything.
- Each row has a `cutScore`, so you can raise the threshold afterwards by filtering rows instead of re-running.

### Inputs

| Field | Default | What it does |
|---|---|---|
| `videoUrls` | sample clip | Direct video file links. |
| `videoKeys`, `videoStore` | empty | Video files already in a key-value store (this run's, or a named one). |
| `sceneThreshold` | 0.3 | Cut sensitivity, 0.01 to 0.99. |
| `minSceneSeconds` | 1 | Shortest allowed scene. |
| `maxScenesPerVideo` | 500 | Cap on scene rows and thumbnails per video (max 2000). The summary still shows the total. |
| `includeSummaryRow` | true | Add the per-video `video` row. |
| `thumbnails` | true | Save a middle-frame JPG per scene. Free. |
| `thumbnailWidth` | 480 | Thumbnail width in pixels. |
| `exportFormat` | csv | `csv`, `json`, `edl` or `none`. Free. |
| `exportClips` | false | Cut each scene into a clip file. Billed per clip. |
| `clipMode` | streamCopy | `streamCopy` or `accurate`. |
| `maxClipsPerVideo` | 25 | Cap on clips per video (max 500). |
| `maxVideoSizeMb` | 500 | Reject larger files (max 2048). |
| `maxDurationMinutes` | 120 | Reject longer videos, without charge. |
| `videoTimeoutSecs` | 600 | Timeout for each step of one video. |
| `outputStoreName` | empty | Save files in a named store that does not expire. |

### Use with the Apify API, MCP, n8n and Make

Call it from the API, Python, JavaScript, Make, Zapier or n8n. Python:

```python
from apify_client import ApifyClient

run = ApifyClient("<APIFY_TOKEN>").actor("data-done-right/video-scene-detection").call(run_input={
    "videoUrls": ["https://example.com/clip.mp4"], "sceneThreshold": 0.3, "exportFormat": "csv"})
scenes = [r for r in ApifyClient("<APIFY_TOKEN>").dataset(run["defaultDatasetId"]).iterate_items() if r["rowType"] == "scene"]
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('data-done-right/video-scene-detection').call({
  videoUrls: ['https://example.com/clip.mp4'], sceneThreshold: 0.3 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const scenes = items.filter((r) => r.rowType === 'scene');
```

With Apify's MCP server (mcp.apify.com) an AI assistant can call it too: "find the scene cuts in this mp4". The only input you need is `videoUrls`.

### Use cases

- **Video editors:** get a cut list or EDL of a finished edit or a stock clip to check shot lengths.
- **Review and QA:** one thumbnail and timecode per shot instead of scrubbing a long recording.
- **AI and vision pipelines:** send one frame per shot to a vision model (use the thumbnails, or our Video Frame Extractor for full-size frames).
- **Archives and datasets:** index footage by shot with start and end times.
- **Splitting footage:** cut a recording into one file per scene for tagging or reuse.

### How much does it cost

Pay per event:

- **`video-minute-scanned`: $0.016 per minute of video analysed**, rounded up per video (a 61 second video is 2 minutes, a 20 second video is 1). Charged once per video, after the scan worked.
- **`scene-clip-created`: $0.004 per clip file delivered**, only when `exportClips` is on.

Thumbnails, the shot list file, the summary row, rejected links and failed videos are free. Examples:

- 1,000 video minutes (for example 200 videos of 5 minutes): **$16**.
- 10,000 video minutes: **$160**. 100,000 video minutes: **$1,600**.
- 100 videos of 3 minutes (300 minutes) with every scene cut into clips, 6 scenes each (600 clips): 300 x $0.016 + 600 x $0.004 = **$7.20**.

Apify Silver plans get 10% off, Gold and higher 20%. If you set a maximum spend per run the Actor stops cleanly when it is reached and keeps what was already delivered. `maxDurationMinutes`, `maxScenesPerVideo` and `maxClipsPerVideo` cap what one video can cost.

### FAQ

#### How does the scene detection work?

It decodes the video, shrinks each frame to 320 pixels wide, and uses ffmpeg's scene score: how different a frame looks from the one before, from 0 to 1. Frames above your threshold are cuts. It does not use a machine learning model, so results are predictable and repeatable.

#### Does it find fades and dissolves?

Not reliably. A fade or dissolve changes slowly, so no single frame looks very different from the previous one and the score stays low. Lowering the threshold (0.1 to 0.2) finds some of them but also adds false cuts from motion; `minSceneSeconds` then merges clusters of detections. For material full of long dissolves, check the result by eye.

#### Can it detect scenes in a YouTube video?

No. It does not download from YouTube, Vimeo, TikTok, Instagram or other streaming sites, and those links are rejected with a clear message and no charge. Use a direct link to a video file you have the rights to, or put the file in a key-value store and use `videoKeys`.

#### Which video formats work, and how big can they be?

MP4, MOV, WebM, MKV, AVI, FLV, MPEG, MPEG-TS and other common files that ffmpeg can decode. HLS and DASH playlists are not supported. By default a file can be 500 MB (up to 2 GB with `maxVideoSizeMb`) and 120 minutes (`maxDurationMinutes`). Links to private or internal network addresses are blocked.

#### Why does a clip start slightly before the scene?

In stream copy mode ffmpeg can only start at a keyframe, so the clip begins at the keyframe at or before the scene start. Use `clipMode: accurate` for frame-exact starts, at the cost of re-encoding. The `startTime` and `endTime` in the rows are always the exact scene times.

#### How accurate is it?

It was tested on synthetic videos with known cuts and on a real 10 second excerpt, where it returned 6 scenes at the default settings (we did not check each cut against the footage by eye). We have not measured it against hand-labelled footage, and results depend on the material: fast camera motion, flashes and screen recordings with small changes can produce false or missed cuts. Tune the threshold on a sample first.

#### Why not PySceneDetect?

PySceneDetect (BSD-3-Clause) needs OpenCV, which makes the image much larger. This Actor uses ffmpeg's built-in scene score, which gives the same kind of result for hard cuts, and keeps the image small.

#### Do I need an API key or login?

No.

### Related tools

- **Video Frame Extractor: Keyframes, Scenes & Thumbnails for AI** extracts the actual frames (JPG, PNG, WebP, contact sheets, base64) at scene changes, keyframes or fixed intervals. Use it when you need full-size images rather than a shot list.
- **All-in-One File Converter: PDF, Office, Images, Audio & Video** converts or compresses a video before you detect its scenes.
- **Transcribe Audio to Text: Files, Podcasts & Video URLs** turns the audio of the same video into a transcript you can line up with the shot list.

# Actor input Schema

## `videoUrls` (type: `array`):

Direct links to video files (mp4, webm, mov, mkv, avi...). Example: https://example.com/clip.mp4. Page URLs of YouTube, Vimeo, TikTok, Instagram and other streaming sites are rejected: use files you have the rights to.

## `videoKeys` (type: `array`):

Keys of video files already stored in a key-value store (this run's default store, or the one named below). Example: my-clip.mp4.

## `videoStore` (type: `string`):

Name or ID of the key-value store that holds the keys above. Leave empty for this run's default store.

## `sceneThreshold` (type: `number`):

How different two frames must look to count as a cut, from 0.01 to 0.99. 0.3 is a good default for hard cuts; 0.1 to 0.2 also catches softer changes (and false cuts); 0.5 or more finds only very hard cuts. Example: 0.3.

## `minSceneSeconds` (type: `number`):

A cut is ignored if the scene before it would be shorter than this. The first cut of a cluster is kept, which also merges the many small detections a fade or dissolve produces. 0 keeps every detection. Example: 1.5.

## `maxScenesPerVideo` (type: `integer`):

Hard cap on scene rows (and thumbnails) returned per video. The summary row still reports the total found. Example: 200.

## `includeSummaryRow` (type: `boolean`):

Adds one row per video (rowType 'video') with duration, fps, resolution, sceneCount and the export link, before its scene rows. Turn off for scene rows only.

## `thumbnails` (type: `boolean`):

Saves the middle frame of every scene as a JPG in the key-value store and puts its link in thumbnailUrl. Free; adds a little run time.

## `thumbnailWidth` (type: `integer`):

Thumbnails are shrunk to this width, keeping the aspect ratio (never upscaled). Example: 480.

## `exportFormat` (type: `string`):

One shot list file per video is saved in the key-value store and linked as exportUrl. Free. EDL timecodes are non-drop-frame.

## `exportClips` (type: `boolean`):

Saves every scene as its own video file (clipUrl). Billed per clip (event scene-clip-created). Off by default.

## `clipMode` (type: `string`):

Stream copy does not re-encode, so clips are fast and lossless but can start a little before the scene (at the nearest earlier keyframe). Accurate re-encodes to H.264/AAC MP4 for frame-exact starts.

## `maxClipsPerVideo` (type: `integer`):

Caps the clips (and clip cost) per video; the first scenes are cut first. Example: 25.

## `maxVideoSizeMb` (type: `integer`):

Downloads above this size are rejected before they finish. Example: 500.

## `maxDurationMinutes` (type: `number`):

Longer videos are rejected without charge. Example: 60.

## `videoTimeoutSecs` (type: `integer`):

Applies separately to the download, the scene scan, the thumbnails and each clip of one video.

## `outputStoreName` (type: `string`):

Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period. Example: my-shot-lists.

## Actor input object example

```json
{
  "videoUrls": [
    "https://test-videos.co.uk/vids/sintel/mp4/h264/360/Sintel_360_10s_1MB.mp4"
  ],
  "sceneThreshold": 0.3,
  "minSceneSeconds": 1,
  "maxScenesPerVideo": 500,
  "includeSummaryRow": true,
  "thumbnails": true,
  "thumbnailWidth": 480,
  "exportFormat": "csv",
  "exportClips": false,
  "clipMode": "streamCopy",
  "maxClipsPerVideo": 25,
  "maxVideoSizeMb": 500,
  "maxDurationMinutes": 120,
  "videoTimeoutSecs": 600
}
```

# Actor output Schema

## `results` (type: `string`):

All result items of this run (the default dataset), as JSON, CSV, Excel and more.

## `records` (type: `string`):

Key-value store records: the run summary, notes on any problems, and any files.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoUrls": [
        "https://test-videos.co.uk/vids/sintel/mp4/h264/360/Sintel_360_10s_1MB.mp4"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-done-right/video-scene-detection").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "videoUrls": ["https://test-videos.co.uk/vids/sintel/mp4/h264/360/Sintel_360_10s_1MB.mp4"] }

# Run the Actor and wait for it to finish
run = client.actor("data-done-right/video-scene-detection").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrls": [
    "https://test-videos.co.uk/vids/sintel/mp4/h264/360/Sintel_360_10s_1MB.mp4"
  ]
}' |
apify call data-done-right/video-scene-detection --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-done-right/video-scene-detection"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fmSOJHq4gbDRpbOvW/builds/eHqLggtAVA5sOGqlE/openapi.json
