# Video Frame Extractor: Thumbnails, Scenes, Keyframes, Timecodes (`ai_admin/video-frame-extractor`) Actor

Extract still frames from video files (MP4, MOV, WebM, MKV, AVI): N evenly spaced, every N seconds, exact timestamps, scene changes or keyframes. JPG/PNG/WebP with timecodes, video metadata and a free contact sheet. Ready for AI vision.

- **URL**: https://apify.com/ai_admin/video-frame-extractor.md
- **Developed by:** [Andriy Kuzmenko](https://apify.com/ai_admin) (community)
- **Categories:** Videos, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 extracted 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: Thumbnails, Scenes, Keyframes, Timecodes

Turn videos into still images: thumbnails for a gallery, one frame per scene for AI vision or video search, or frames at
the exact moments you need — each with its timecode and a download link.

- **Five modes:** N evenly spaced frames, one frame every N seconds, exact timestamps (`90.5`, `01:30`, `1:02:03`),
  every **scene change** (adjustable sensitivity), or the video's **keyframes**.
- **JPG, PNG or WebP**, optional downscaling (`maxWidth`).
- **Contact sheet** with all frames and timecodes in one image — free.
- **Video metadata:** duration, resolution, frame rate, codec.
- Files up to 2 GB: MP4, MOV, WebM, MKV, AVI, M4V, MPEG, 3GP and anything else ffmpeg reads.

### Why this Actor

| | This Actor | Typical alternatives in the Apify Store (Oct 2026) |
|---|---|---|
| **Price** | **$1 per 1,000 frames**, no per-video fee | $2 per 1,000 frames, often plus $2–10 per 1,000 videos |
| **Modes** | Evenly spaced, every N seconds, exact timestamps, scene changes, keyframes | Two or three modes |
| **Extras** | Free contact sheet, timecodes, video metadata, JPG/PNG/WebP, downscaling | Contact sheet as a paid add-on or missing |

### Input

```json
{
  "sources": [{ "url": "https://example.com/lecture.mp4" }],
  "mode": "scenes",
  "sceneThreshold": 0.3,
  "maxFramesPerVideo": 100,
  "format": "jpg",
  "maxWidth": 1280,
  "contactSheet": true
}
```

| Field | Meaning |
|---|---|
| `sources` | Direct links to video files. Pages like YouTube are not supported. Files in your own Apify key-value store work too: set the store's access to "Anyone with ID can read" and use `https://api.apify.com/v2/key-value-stores/<store ID>/records/<key>` (the Actor runs with limited permissions and does not use your token). |
| `mode` | `count`, `interval`, `timestamps`, `scenes` or `keyframes` |
| `frameCount` | Frames for `count` |
| `intervalSeconds` | Seconds between frames for `interval` (0.5 = two per second) |
| `timestamps` | Times for `timestamps` |
| `sceneThreshold` | 0.1 = sensitive … 0.5 = hard cuts only |
| `maxFramesPerVideo` | Upper limit for every mode |
| `format`, `maxWidth` | Image format and optional downscaling |
| `contactSheet` | One overview image per video (free) |

### Output

One item per video:

```json
{
  "url": "https://example.com/lecture.mp4",
  "fileName": "lecture.mp4",
  "mode": "scenes",
  "duration": 1843.2,
  "width": 1920,
  "height": 1080,
  "fps": 25.0,
  "codec": "h264",
  "frameCount": 42,
  "frames": [
    { "index": 1, "time": 12.48, "timecode": "00:00:12.480", "key": "0001-lecture-00001.jpg",
      "url": "https://api.apify.com/v2/key-value-stores/.../records/0001-lecture-00001.jpg", "bytes": 98211 }
  ],
  "contactSheetUrl": "https://api.apify.com/v2/key-value-stores/.../records/0001-lecture-contact-sheet.jpg"
}
```

A video that cannot be downloaded or decoded gets an `error` field instead and is **not charged**.

### Pricing

| Event | Price | What counts |
|---|---|---|
| `frame` | **$1 per 1,000** | one extracted frame |
| `scene-minute` | **$1 per 1,000** | only in `scenes` mode: one started minute of video analysed for scene changes |

Plus Apify's standard start fee of $0.05 per 1,000 runs. The contact sheet is free. The run stops before it would exceed
your maximum charge per run.

### Related Actors

- [Image to Text OCR](https://apify.com/ai_admin/image-to-text-ocr) — read the text on the extracted frames
- [Audio & Video Transcriber](https://apify.com/ai_admin/audio-transcriber) — speech to text, SRT and VTT subtitles
- [PDF to Image & Image Converter](https://apify.com/ai_admin/pdf-image-converter) — PDF ↔ PNG/JPG/WebP, HEIC → JPG

Open source: [github.com/AndriyVK/-apify-document-tools](https://github.com/AndriyVK/-apify-document-tools)

### Use with AI agents and code

- **MCP (Claude, Cursor, VS Code, any MCP client):** add `https://mcp.apify.com?tools=ai_admin/video-frame-extractor` as an MCP server —
  the agent gets one tool with this Actor's input schema and pays per use through your Apify account.
- **One HTTP call that returns the results:**

```bash
curl -X POST "https://api.apify.com/v2/acts/ai_admin~video-frame-extractor/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sources": [{"url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/video-en.mp4"}], "mode": "count", "frameCount": 6, "format": "jpg"}'
```

### Limits

- Direct file links only (no YouTube, TikTok or other page links). Maximum 2 GB per file.
- Scene detection compares brightness and colour between frames: slow fades may produce no frame; lower the sensitivity.

# Actor input Schema

## `sources` (type: `array`):

Direct links to video files (MP4, MOV, WebM, MKV, AVI, M4V, MPEG, 3GP…), up to 2 GB each. Pages like YouTube are not supported — use a direct file link. Files in your own Apify key-value store work too: set the store's access to "Anyone with ID can read" and use https://api.apify.com/v2/key-value-stores/<store ID>/records/<key>.

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

count = N evenly spaced frames; interval = one frame every N seconds; timestamps = exact times; scenes = a frame at every scene change; keyframes = the video's keyframes (I-frames).

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

For mode count.

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

For mode interval: 1 = one frame per second, 0.5 = two per second.

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

For mode timestamps: seconds (90.5) or hh:mm:ss / mm:ss (01:30). Times past the end are skipped.

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

0.1 = many frames (small changes count), 0.3 = default, 0.5 = only hard cuts.

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

Upper limit for any mode.

## `format` (type: `string`):

JPG = small files, PNG = lossless, WebP = smallest.

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

Downscale wider frames, keeping the aspect ratio. 0 = original size.

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

Also return one image with all frames and timecodes (free).

## Actor input object example

```json
{
  "sources": [
    {
      "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/video-en.mp4"
    }
  ],
  "mode": "count",
  "frameCount": 6,
  "intervalSeconds": 10,
  "timestamps": [],
  "sceneThreshold": 0.3,
  "maxFramesPerVideo": 100,
  "format": "jpg",
  "maxWidth": 0,
  "contactSheet": true
}
```

# Actor output Schema

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

Dataset items: url, duration, frames (time, timecode, url), contactSheetUrl or error.

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

All frames and contact sheets in the run's key-value store.

# 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 = {
    "sources": [
        {
            "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/video-en.mp4"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ai_admin/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 = { "sources": [{ "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/video-en.mp4" }] }

# Run the Actor and wait for it to finish
run = client.actor("ai_admin/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 '{
  "sources": [
    {
      "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/video-en.mp4"
    }
  ]
}' |
apify call ai_admin/video-frame-extractor --silent --output-dataset

```

## MCP server setup

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