# Video Frame Extractor: Frames, Thumbnails & Scene Changes (`subtleasianmerch/video-frame-extractor`) Actor

Extract frames from video links: every N seconds, evenly spaced, at given times or at scene changes. JPEG, PNG or WebP with exact timestamps, from MP4, WebM, MOV, MKV or HLS. $1.50 per 1,000 frames; unreadable videos are free.

- **URL**: https://apify.com/subtleasianmerch/video-frame-extractor.md
- **Developed by:** [Public Data Tools](https://apify.com/subtleasianmerch) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 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.
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 Frame Extractor: Frames, Thumbnails & Scene Changes

**Extract frames from video** files by link: a frame every N seconds, evenly spaced thumbnails, frames at given times, or one per scene. You get JPEG, PNG or WebP images with exact timestamps, from MP4, MOV, WebM, MKV or HLS links.

- 🎞️ **Four ways to pick frames:** every N seconds, N evenly spaced, at given times, or at scene changes.
- 🔗 **Direct file links:** your own server, S3, Google Cloud Storage, Dropbox, Apify storage, or HLS playlists.
- ⚡ **Reads only what it needs:** large files are read in parts, so a 3 GB 4K file isn't downloaded whole.
- 🖼️ **JPEG, PNG or WebP,** at the video's size or scaled to your width. Phone videos come out upright.
- 📋 **A table of frames:** exact time, image link, width, height, file size and scene score.
- 💸 **$1.50 per 1,000 frames** ($0.0015 each). Videos that can't be read, refused links and frames beyond your limits are free.

**Try it:** the input comes pre-filled with an 82-second excerpt of the open movie *Sintel* (CC BY 3.0, Blender Foundation). Click **Start** to get a frame every 10 seconds, then add your own video links.

### What you get

One row per frame, and one image per frame in the run's storage.

| Data | Fields |
|---|---|
| Time | the frame's own time in seconds (`timestampSecs`) and as `hh:mm:ss.mmm`, and the time you asked for |
| Image | `imageUrl` (opens without logging in to Apify), `imageKey`, format, width, height and file size |
| Scene | in scene mode, the scene score: how different the frame is from the one before, 0 to 1 |
| Video | length, width, height, codec and frames per second |
| Status | `ok`, or `failed`, `blocked` or `refused` with the reason in `error` (free) |

**For every video,** the run's `RUN_SUMMARY` record gives its length, size, codec, frame rate, file size, container and bit rate. It says how the file was read (range requests, one download or HLS). It also counts frames delivered, failed or left out by your limits, or gives the reason the video couldn't be read.

**Only the part you want:** set start and end times, a limit per video and a limit per run.

**Formats:** MP4, MOV, M4V, WebM, MKV, AVI, MPEG-TS and HLS playlists, with the usual codecs (H.264, H.265/HEVC, VP8, VP9, AV1 and more): anything ffmpeg 8.1 reads.

### Who it's for

- **AI and computer-vision teams:** turn videos into image datasets, one frame every second or at each new shot.
- **Video platforms and editors:** make thumbnails, preview strips and contact sheets for your own library.
- **Marketers and agencies:** take stills from your ads and product videos for posts, reports and storyboards.
- **Content moderation and QA:** sample frames from uploaded videos for review, without watching them through.
- **Developers:** call it from your app through the Apify API instead of running ffmpeg yourself.

### How much does it cost?

Pay per event: **$0.0015 per frame delivered** ($1.50 per 1,000 frames), plus Apify's standard start fee per run. Apify's platform usage is included in the price.

**Examples:**

- **The prefilled example,** a frame every 10 seconds of an 82-second clip: 9 frames, $0.0135.
- **10 evenly spaced thumbnails from each of 100 videos:** 1,000 frames, $1.50.
- **Scene changes in a 10-minute film,** stopped at the default limit of 100 frames per video: at most $0.15.

**Free:**

- videos that can't be read: missing files (404), refused access (403, an expired link) and bot checks;
- links that aren't videos: web pages, files with sound but no video, and still images;
- video-platform links, which are refused;
- times after the end of a video, listed as not found;
- frames beyond your limits, and frames stopped by your maximum cost.

**Spending limit:** set a maximum cost per run in the run options, and the run stops cleanly at that amount. **Most frames per run** caps it by count.

### How to use it

1. **Paste your video file links** under **Video file links**, one per line. The link must open the file itself, for example `https://example.com/video.mp4`.
2. **Choose which frames:** every N seconds, N evenly spaced frames, at given times, or at scene changes. Set the interval, number, times or sensitivity.
3. **Set limits and format (optional):** a **start** and **end** time, and the **most frames per video** (100 by default). Pick the **image format**, and a **width** to scale frames down to.
4. **Click Start.** Open the **Frames** view to see the images in the table, or download the results as JSON, CSV or Excel.
5. **Download the images** from each row's `imageUrl`, or from the run's key-value store. They're named like `video-001-frame-00002-00.00.10.000.jpg`.

#### Files on S3, Google Cloud Storage, Dropbox or Apify

- **S3 or Google Cloud Storage:** a public object link, or a signed (pre-signed) link that is valid long enough for the run.
- **Dropbox:** a shared link ending in `?dl=1` (it then opens the file, not the preview page).
- **Apify key-value store:** the record's link (with its `signature` if the store isn't public). Apify storage sends whole files only, so these are downloaded once (see the size limit under "Good to know").

### Example input

A frame every 2 seconds from 1:00 to 4:00 of a 571 MB 1080p film, as 640-pixel WebP. On Apify this gave 91 frames in 56 seconds, read in one pass over range requests:

```json
{
  "videoUrls": ["https://upload.wikimedia.org/wikipedia/commons/c/cb/Tears_of_Steel_1080p.webm"],
  "mode": "interval",
  "intervalSecs": 2,
  "startTime": "1:00",
  "endTime": "4:00",
  "imageFormat": "webp",
  "imageWidth": 640
}
```

One frame per scene from the prefilled clip (15 frames on Apify):

```json
{
  "videoUrls": ["https://upload.wikimedia.org/wikipedia/commons/2/25/Sintel_webm_extract.webm"],
  "mode": "scenes",
  "sceneThreshold": 0.3
}
```

Other modes: `"mode": "count", "frameCount": 10`; `"mode": "timestamps", "timestamps": ["15", "1:30", "00:02:45.500"]`.

### Example output

One row per frame. A real row from a test run on Apify (2 November 2026, the pre-filled example), with the link shortened:

```json
{
  "videoUrl": "https://upload.wikimedia.org/wikipedia/commons/2/25/Sintel_webm_extract.webm",
  "videoIndex": 1,
  "status": "ok",
  "frameIndex": 2,
  "timestampSecs": 10,
  "timestamp": "00:00:10.000",
  "requestedTimestampSecs": 10,
  "sceneScore": null,
  "imageUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/video-001-frame-00002-00.00.10.000.jpg?signature=<signature>",
  "imageKey": "video-001-frame-00002-00.00.10.000.jpg",
  "imageFormat": "jpeg",
  "width": 640,
  "height": 360,
  "sizeBytes": 9723,
  "videoDurationSecs": 81.584,
  "videoWidth": 640,
  "videoHeight": 360,
  "videoCodec": "vp8",
  "videoFps": 24,
  "mode": "interval",
  "error": null
}
```

In scene mode, `sceneScore` holds the score (for example `0.316`) and `requestedTimestampSecs` is empty. The first frame of the video (or of your start time) starts the first scene and has no score.

Rows for videos that couldn't be read have `status` `failed`, `blocked` or `refused`, no image, and the reason in `error`. They are free.

### Integrations

- **API:** call it from your app instead of running ffmpeg yourself (example below).
- **Webhooks:** have Apify call your URL when a run finishes, then read its dataset and images.
- **Make, Zapier and n8n:** send new frames on to storage, a CMS or an AI step with Apify's apps for these tools.
- **Schedules:** run it on a fixed list of links, such as a daily recording, with the same input.
- **Monitoring:** Apify's monitoring can alert you when a scheduled run fails.

#### Run it from the API

```bash
curl -X POST "https://api.apify.com/v2/acts/subtleasianmerch~video-frame-extractor/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://example.com/video.mp4"], "mode": "count", "frameCount": 12, "imageWidth": 640}'
```

Replace `YOUR_TOKEN` with your Apify API token, from Apify Console under Settings → API & Integrations, and the link with your own video file.

### Good to know

- **Direct file links only.** Links to YouTube, TikTok, Instagram, Facebook, X, Vimeo, Dailymotion, Twitch and other video platforms are refused, including their video servers: their terms cover the videos they host. Use files you have the right to use.
- **Exact times.** Each frame is the first one at or after the time asked for, so `timestampSecs` can be up to one frame later (0.04 s at 25 fps). Videos whose clock doesn't start at zero (MPEG-TS, HLS) are measured from their first frame.
- **How files are read.** Files up to 100 MB, and files where the frames would read most of the file anyway, are downloaded once and read from disk. Larger files are read in parts with HTTP range requests, so a 3 GB 4K file can give a few frames without being downloaded. Servers without range requests are downloaded whole.
- **Size limit for downloads:** about 1.8 GB at the default memory (the run's disk is twice its memory; 2 GB at 2 GB memory). A larger file from a server without range requests can't be read.
- **Servers that limit requests.** Frames are read one at a time. When a server answers "too many requests" (HTTP 429), the Actor switches to one download if the file fits, or waits and tries again. Errors that pass (HTTP 500, dropped connections) are tried again, up to three times.
- **Scene detection decodes every frame** in the part you choose, so it takes longer than the other modes. In tests at the default memory it scanned about 30 minutes of 640×360 video, or 3 minutes of 1080p video, per minute of run time. Frames every 2 seconds or closer are taken the same way, in one pass. The scan stops at your per-video limit.
- **Soft scene changes:** fades and dissolves are often not seen as changes. Lower the sensitivity (0.1–0.2) to catch them.
- **Big videos take longer.** A frame from a 4K file or an HLS stream can take 10–15 seconds, because ffmpeg decodes from the keyframe before it. HLS playlists with several sizes are read at the largest size, or the smallest that is at least your image width.
- **Live streams aren't supported:** videos need a known length (finished files and VOD playlists).
- **Images are kept as long as the run's storage** (your plan's data retention). Download them, or copy them to your own storage, to keep them.

### FAQ

#### Is it legal to use?

The Actor reads only the direct video file links you give it. It refuses links to video platforms and their media servers, because their terms cover the videos they host. Use video files you have the right to use, and check that your use of the frames complies with the law where you are.

#### Can I use a YouTube or TikTok link?

No. The Actor refuses video-platform links, because their terms cover the videos they host. Give a direct link to a video file you have the right to use.

#### How do I get frames from a file on my computer?

Upload it somewhere that gives a direct link (S3, Google Cloud Storage, Dropbox with `?dl=1`, or an Apify key-value store), then use that link.

#### How many frames can I get?

Up to 10,000 per video (100 by default, set by "Most frames per video") and up to 1,000 videos per run.

#### Which video formats work?

MP4, MOV, M4V, WebM, MKV, AVI, MPEG-TS and HLS playlists, with the usual codecs (H.264, H.265/HEVC, VP8, VP9, AV1 and more): anything ffmpeg 8.1 reads.

#### Why is a frame's time a little after the one I asked for?

Videos are a series of frames at fixed times; the Actor gives the first frame at or after your time. `requestedTimestampSecs` shows what you asked for.

#### What does a failed video cost?

Nothing. It is listed with the reason.

### Related Actors

More Actors from the same developer that work well with this one:

| Actor | Use it to |
|---|---|
| [Website Screenshot API](https://apify.com/subtleasianmerch/website-screenshot-api) | capture still images of web pages, the way this Actor captures video frames |

Questions, bugs or ideas? Open an issue on this Actor's **Issues** tab.

# Actor input Schema

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

Direct links to video files, one per line: MP4, WebM, MOV, MKV, M4V, AVI, MPEG-TS, or an HLS playlist (.m3u8). The link must open the file itself, e.g. https://example.com/video.mp4 (a signed S3 or Google Cloud Storage link, a Dropbox link ending in ?dl=1, or a file in an Apify key-value store). Links to YouTube, TikTok, Instagram, Facebook, X, Vimeo and other video platforms are refused: their terms cover the videos they host.

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

Every N seconds; a number of evenly spaced frames (the middle of each equal part, good for thumbnails and previews); at the times you list; or at scene changes (the first frame of the video and of each new shot, found with ffmpeg's scene detection).

## `intervalSecs` (type: `number`):

For "Every N seconds": a frame at 0 s, N s, 2N s… (or from your start time). 0.5 gives two frames a second; 60 one a minute.

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

For "N evenly spaced frames": the video (or the part between your start and end times) is split into this many equal parts, and the middle frame of each is taken.

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

For "At given times": one time per line, in seconds (90 or 90.5) or as hh:mm:ss (1:30, 00:01:30.500). Each video gives the first frame at or after each time. Times after the end of a video are listed as not found, free.

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

For "At scene changes": how different a frame must be from the one before to count as a new scene, from 0.01 to 1 (ffmpeg's scene score). 0.3 finds hard cuts; 0.1–0.2 also finds softer changes; 0.5 or more only very sharp ones. Fades and dissolves are often not found.

## `minSceneGapSecs` (type: `number`):

For "At scene changes": a new scene is taken only this long after the last one, so flashes and fast cuts don't give bursts of frames. 0 takes every change.

## `startTime` (type: `string`):

Optional. Take frames only from this time on, in seconds or hh:mm:ss, e.g. 1:30. Used by every mode except "At given times".

## `endTime` (type: `string`):

Optional. Take frames only up to this time, e.g. 10:00. Leave empty for the end of the video.

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

No video gives more frames than this; the rest aren't taken and cost nothing. In "At scene changes" the scan stops here.

## `maxFramesPerRun` (type: `integer`):

Optional. The run stops after this many frames in all. The run also stops cleanly at your maximum cost per run.

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

JPEG is small and works everywhere; PNG is lossless (larger files); WebP is smaller than JPEG at the same quality.

## `imageWidth` (type: `integer`):

Optional. Scale frames down to this width in pixels, keeping their shape, e.g. 640 for previews. Frames are never scaled up. Empty keeps the video's own size.

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

For JPEG and WebP, from 1 to 100. Higher is sharper and larger; 85 suits most uses. PNG is always lossless.

## Actor input object example

```json
{
  "videoUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/2/25/Sintel_webm_extract.webm"
  ],
  "mode": "interval",
  "intervalSecs": 10,
  "frameCount": 10,
  "sceneThreshold": 0.3,
  "minSceneGapSecs": 0.5,
  "maxFramesPerVideo": 100,
  "imageFormat": "jpeg",
  "imageQuality": 85
}
```

# Actor output Schema

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

The dataset rows this run produced.

## `runSummary` (type: `string`):

Counts, costs and anything skipped, saved as RUN_SUMMARY.

## `files` (type: `string`):

Files saved in the run's key-value store; each dataset row links to its own.

# 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://upload.wikimedia.org/wikipedia/commons/2/25/Sintel_webm_extract.webm"
    ],
    "mode": "interval"
};

// Run the Actor and wait for it to finish
const run = await client.actor("subtleasianmerch/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://upload.wikimedia.org/wikipedia/commons/2/25/Sintel_webm_extract.webm"],
    "mode": "interval",
}

# Run the Actor and wait for it to finish
run = client.actor("subtleasianmerch/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://upload.wikimedia.org/wikipedia/commons/2/25/Sintel_webm_extract.webm"
  ],
  "mode": "interval"
}' |
apify call subtleasianmerch/video-frame-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,subtleasianmerch/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/LdxCNucBhNtBnnJHF/builds/SC3AkK5QTpbEPbBhv/openapi.json
