# Video Frame Extractor — Scene Detection, Keyframes & Thumbnails (`steadyscrape/video-frame-extractor`) Actor

Extract frames, keyframes and thumbnails from any MP4, MOV or other video file link: one per scene with timecodes, a fixed number evenly spread, one every N seconds, or exact times. Black frames and repeats skipped for free, contact sheet included, image links ready for AI vision models.

- **URL**: https://apify.com/steadyscrape/video-frame-extractor.md
- **Developed by:** [Steady Scrape](https://apify.com/steadyscrape) (community)
- **Categories:** Videos, AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 frames

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Frame Extractor — scene detection, keyframes, thumbnails and contact sheets

Give it **links to video files** and get still frames you can use: **one frame per scene** with the full scene list and
its timecodes, a **fixed number of frames** spread evenly, **one frame every N seconds**, or the **exact times** you list.
Every frame is saved as JPEG, WebP or PNG with a **public link** and its timestamp, and every video gets a **contact sheet**
(a storyboard grid) plus its metadata: duration, resolution, fps, codecs, bitrate, rotation.

**Built for AI pipelines.** Vision models (GPT, Claude, Gemini) read images, not video: send them the scenes of a video in
one call, without installing FFmpeg or running a server. The frame links open without an Apify login, so you can pass them
straight to a model, a spreadsheet or Make / Zapier / n8n.

**US$0.001 per frame (US$1 per 1,000), and US$0.002 per minute scanned for scenes.** No start fee. A black frame that was
stepped past, a repeated picture, a link that does not answer, a web page instead of a file: none of them costs anything.

### What makes it different

- **A real scene list, not just pictures.** In mode `scenes` every cut is found by comparing each frame with the one
  before it, and you get every scene with its start, end, duration, timecodes and how strong the cut was — ready to split
  the video in an editor, to chapter a recording, or to send a model "what happens in each shot".
- **One frame from the middle of each scene**, never on the cut itself, where dissolves and motion blur live. Ask for 2–5
  per scene to see how a shot develops.
- **You never pay for a black frame or the same picture twice.** A fade-to-black frame is replaced by the first frame with
  content in the next 2 seconds of its scene; a slide held on screen for a minute is delivered once. Both are counted in
  the row (`blankFramesSkipped`, `duplicateFramesSkipped`) and not charged. Title cards (text on black) are kept.
- **Phone videos come out the right way up.** A video recorded sideways carries a rotation flag; frames are turned the way
  players show them, and the row reports the size it is watched at.
- **A cap on what each video can cost.** `maxFramesPerVideo` (50 by default) keeps a two-hour film from becoming 900
  frames: when a video has more scenes than the cap, the longest scenes are kept. `maxMinutesPerVideo` reads only the
  start of each video. Your run's spending limit is respected to the frame and to the minute.
- **Every failure is a row with a reason**, never a crashed run: `unreachable` (with the HTTP status), `not_media` ("the
  link answers a web page, not a video file"), `too_large`, `failed`.

### Use cases

- **Video understanding with LLMs** — send 8–30 scene frames to a vision model to summarize, tag, moderate or search a video.
- **Scene detection and shot lists** — timecodes of every cut for editors, archives, ad research or dataset building.
- **Slides from a lecture or webinar** — mode `interval` every 5–10 s with repeats skipped gives one image per slide.
- **Thumbnails** — pick the best still for a video page, a course lesson or a product clip.
- **Storyboards** — the contact sheet shows a whole video in one image.
- **Training data** — sample frames from footage you own for computer-vision models.

### Input

| Field | What it does | Default |
|---|---|---|
| `videoUrls` | Direct links to video files: mp4, mov, webm, mkv, avi, m4v, ts, anything FFmpeg decodes, up to 2 GB | the Sintel trailer |
| `mode` | `scenes`, `count`, `interval` or `timestamps` | `scenes` |
| `frameCount` | Frames per video in mode `count` | 12 |
| `intervalSeconds` | Seconds between frames in mode `interval` (decimals work) | 10 |
| `timestamps` | Times in mode `timestamps`: `95.5`, `1:35.5` or `00:01:35.500` | – |
| `sceneThreshold` | How much the picture must change to count as a cut, 0.02–0.6 | 0.1 |
| `minSceneSeconds` | Cuts closer than this count as one (flashes, whip pans) | 0.5 |
| `framesPerScene` | Frames inside each scene, 1–5 | 1 |
| `maxFramesPerVideo` | Most frames per video, whatever the mode | 50 |
| `skipBlankFrames` | Step past black / single-colour frames, free | true |
| `skipDuplicateFrames` | Drop a frame that repeats the picture before it, free | true |
| `imageFormat` | `jpg`, `webp` or `png` | `jpg` |
| `imageQuality` | 1–100, for jpg and webp | 85 |
| `maxWidth` | Shrink wider frames to this width; 0 keeps the original | 1280 |
| `contactSheet` | Also save a grid of all frames with their times, free | true |
| `maxMinutesPerVideo` | Read only the first minutes of each video; 0 = whole | 0 |

```json
{
    "videoUrls": ["https://your-bucket.s3.amazonaws.com/uploads/episode-12.mp4"],
    "mode": "scenes",
    "maxFramesPerVideo": 30,
    "imageFormat": "webp",
    "maxWidth": 1024
}
```

Only **direct file links** work. A YouTube, TikTok or Instagram page is a web page, not a file, and comes back as a free
`not_media` row. Google Drive and Dropbox share links open a page too: use their direct-download link (Dropbox: `?dl=1`).

### Output

One dataset row **per video**. Real output of the prefill, the Sintel trailer (CC BY 3.0, Blender Foundation), with the
`scenes` and `frames` arrays trimmed to two items:

```json
{
    "status": "ok",
    "reason": null,
    "videoUrl": "https://media.w3.org/2010/05/sintel/trailer.mp4",
    "fileName": "trailer.mp4",
    "contentType": "video/mp4",
    "fileSizeBytes": 4372373,
    "durationSeconds": 52.208,
    "width": 854,
    "height": 480,
    "fps": 24,
    "videoCodec": "h264",
    "audioCodec": "aac",
    "bitrateKbps": 670,
    "container": "mov,mp4,m4a,3gp,3g2,mj2",
    "rotation": 0,
    "mode": "scenes",
    "processedSeconds": 52.208,
    "truncated": false,
    "sceneCount": 15,
    "scenes": [
        { "index": 0, "startSeconds": 0, "endSeconds": 5.083, "durationSeconds": 5.083, "startTimecode": "00:00:00.000", "endTimecode": "00:00:05.083", "cutScore": null },
        { "index": 1, "startSeconds": 5.083, "endSeconds": 13.917, "durationSeconds": 8.834, "startTimecode": "00:00:05.083", "endTimecode": "00:00:13.917", "cutScore": 0.108 }
    ],
    "frameCount": 14,
    "frames": [
        { "index": 0, "timestampSeconds": 2.542, "timecode": "00:00:02.542", "sceneIndex": 0, "width": 854, "height": 480, "bytes": 11175, "key": "4e1dee73-trailer-000-000002542ms.jpg", "url": "https://api.apify.com/v2/key-value-stores/…/records/4e1dee73-trailer-000-000002542ms.jpg?signature=…" },
        { "index": 1, "timestampSeconds": 9.5, "timecode": "00:00:09.500", "sceneIndex": 1, "width": 854, "height": 480, "bytes": 3589, "key": "4e1dee73-trailer-001-000009500ms.jpg", "url": "https://api.apify.com/v2/key-value-stores/…/records/4e1dee73-trailer-001-000009500ms.jpg?signature=…" }
    ],
    "imageFormat": "jpg",
    "blankFramesSkipped": 1,
    "duplicateFramesSkipped": 0,
    "contactSheetUrl": "https://api.apify.com/v2/key-value-stores/…/records/4e1dee73-trailer-contact-sheet.jpg?signature=…",
    "billedFrames": 14,
    "billedScanMinutes": 1,
    "processingSeconds": 3.55,
    "processedAt": "2026-10-13T15:04:50.213Z"
}
```

The images live in the run's key-value store (Storage tab, or `GET /v2/key-value-stores/{id}/keys` through the API), named
so they sort the way the video plays. The `url` of each frame opens without a token. Like every unnamed Apify storage,
they are kept for your plan's data retention period: copy what you want to keep.

| Field | Meaning |
|---|---|
| `status` | `ok`, or why nothing was delivered: `unreachable`, `not_media`, `too_large`, `failed` |
| `reason` | What happened, in words, when something was skipped, cut short or failed |
| `durationSeconds`, `width`, `height`, `fps`, `videoCodec`, `audioCodec`, `bitrateKbps`, `container`, `rotation` | The video as the decoder measured it; width and height are the size it is watched at |
| `processedSeconds`, `truncated` | How much of the video was read, and whether a limit cut it short |
| `scenes` | Mode `scenes` only: start, end, duration, timecodes and cut strength (0–1) of every scene |
| `frames` | Time, timecode, scene, size, bytes, record name and link of every frame |
| `blankFramesSkipped`, `duplicateFramesSkipped` | Frames dropped and not charged |
| `contactSheetUrl` | The storyboard grid of the video's frames |
| `billedFrames`, `billedScanMinutes` | What this row was charged |

### Cost

Pay per event, nothing else:

| Event | Price | When |
|---|---|---|
| `frame` | US$0.001 | Each frame delivered |
| `scene-scan-minute` | US$0.002 | Each started minute of video scanned for cuts, mode `scenes` only |

Worked examples, measured on Apify:

- **The prefill** (52-second trailer, 15 scenes, 14 frames): US$0.016.
- **A 10-minute 1080p film by scenes**, capped at 200 frames (Big Buck Bunny: 137 scenes, 135 frames): US$0.157.
- **A 77-minute film by scenes**, capped at 200 frames (Charlie Chaplin festival: 929 scenes, the 198 longest kept): US$0.354.
- **A 2-hour lecture, one frame a minute**: 120 frames, US$0.12 — less if slides repeat, since repeats are free.

The contact sheet, the metadata, the scene list in mode `scenes`, skipped frames and failed links are free.

### Speed

Scanning for scenes decodes every frame. Measured on Apify with one CPU core (4 GB of memory): 640×480 H.264 at 13× real
time, 1080p H.264 at over 10×, 1080p 60 fps VP9 at 2×. Modes `count`, `interval` and `timestamps` decode only the frames
they need and take seconds. The default memory is 2 GB (half a core); give a run 4 or 8 GB to go 2× or 4× faster at the
same price.

### Limits

- Direct file links only, up to 2 GB per file. A host that refuses cloud servers answers 403, and the row says so.
- Links to private, local or reserved addresses (localhost, 10.x, 192.168.x, the cloud metadata address
  169.254.169.254…), typed or reached by a redirect, are free `unreachable` rows: nothing is requested from them.
- No audio and no transcription: images and metadata only.
- Mode `scenes` finds cuts, not gradual dissolves: a slow cross-fade can come out as one scene.
- At most 1,000 frames per video and 1,000 videos per run.

### Is it legal?

It reads only the files you link to and stores the frames in your own Apify account. Use it on videos you own, licensed
footage, or public-domain and Creative Commons material, and respect the rights of whoever made them.

# Actor input Schema

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

Direct links to video files: mp4, mov, webm, mkv, avi, m4v, ts and anything else FFmpeg decodes, up to 2 GB each. A link that opens a web page (YouTube, TikTok, a Google Drive share page) is not a file and comes back as a free row that says so.

## `mode` (type: `string`):

scenes: finds every cut and saves a frame from the middle of each scene, with the scene list and its timecodes. count: a fixed number of frames spread evenly. interval: one frame every N seconds. timestamps: the exact times you list.

## `frameCount` (type: `integer`):

How many frames to spread evenly over each video.

## `intervalSeconds` (type: `number`):

One frame every this many seconds, starting at 0. Decimals work: 0.5 is two frames a second.

## `timestamps` (type: `array`):

Seconds (95.5) or timecodes (1:35.5, 00:01:35.500). Each gives the first frame shown at or after it.

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

How much the picture must change from one frame to the next to count as a cut, from 0.02 (every camera move is a cut) to 0.6 (only hard cuts between very different shots). 0.1 finds the cuts of an edited video without splitting fast action.

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

Cuts closer than this count as one, the strongest: a flash or a whip pan trips several frames in a row.

## `framesPerScene` (type: `integer`):

1 saves the middle of each scene. 2 to 5 spread that many frames inside it, never on the cut itself.

## `maxFramesPerVideo` (type: `integer`):

A cap on what each video can cost. When a video has more scenes than this, the longest scenes are kept; in mode interval, the first frames.

## `skipBlankFrames` (type: `boolean`):

A frame of one flat colour (black, white, a fade) is replaced by the first frame with content in the next 2 seconds of its scene; if there is none it is dropped and not charged. Titles on black are kept.

## `skipDuplicateFrames` (type: `boolean`):

A frame that shows the same picture as the frame kept before it is dropped and not charged: a slide held for a minute, a paused screen. The same frame of the video is never delivered twice either way.

## `imageFormat` (type: `string`):

jpg is the smallest for photos and what every AI model reads; webp is smaller still; png is lossless.

## `imageQuality` (type: `integer`):

From 1 to 100.

## `maxWidth` (type: `integer`):

Wider frames are shrunk to this width, keeping their shape; 0 keeps the video's own size. 1280 is a YouTube thumbnail and plenty for an AI vision model.

## `contactSheet` (type: `boolean`):

Also save one image with every frame of the video in a grid, each labelled with its time. Free.

## `maxMinutesPerVideo` (type: `integer`):

Reads only the first minutes of each video; 0 reads the whole video. A video cut short says so in its row.

## Actor input object example

```json
{
  "videoUrls": [
    "https://media.w3.org/2010/05/sintel/trailer.mp4"
  ],
  "mode": "scenes",
  "frameCount": 12,
  "intervalSeconds": 10,
  "sceneThreshold": 0.1,
  "minSceneSeconds": 0.5,
  "framesPerScene": 1,
  "maxFramesPerVideo": 50,
  "skipBlankFrames": true,
  "skipDuplicateFrames": true,
  "imageFormat": "jpg",
  "imageQuality": 85,
  "maxWidth": 1280,
  "contactSheet": true,
  "maxMinutesPerVideo": 0
}
```

# Actor output Schema

## `videos` (type: `string`):

No description

## `frames` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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://media.w3.org/2010/05/sintel/trailer.mp4"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadyscrape/video-frame-extractor").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://media.w3.org/2010/05/sintel/trailer.mp4"] }

# Run the Actor and wait for it to finish
run = client.actor("steadyscrape/video-frame-extractor").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://media.w3.org/2010/05/sintel/trailer.mp4"
  ]
}' |
apify call steadyscrape/video-frame-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadyscrape/video-frame-extractor"
        }
    }
}
```

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/688Pm79Nz8oaVnqrf/builds/3NN0tEh3fK7TUz4hW/openapi.json
