# Video Frame Extractor - Thumbnails, Scenes & Contact Sheet (`actor-forge/video-frame-extractor`) Actor

Extract still frames from direct video file URLs (MP4, MOV, WebM, MKV): N evenly spaced, every N seconds, at scene changes or exact timestamps, as JPG/PNG/WebP, plus a contact sheet, GIF preview and media metadata. ffmpeg, no API key. $0.60 per 1,000 frames + $0.001 per video.

- **URL**: https://apify.com/actor-forge/video-frame-extractor.md
- **Developed by:** [ActorForge](https://apify.com/actor-forge) (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 $0.60 / 1,000 frame extracteds

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 & Contact Sheet

Extract still frames from direct video file URLs (MP4, MOV, WebM, MKV): N evenly spaced, every N seconds, at scene changes or exact timestamps, as JPG/PNG/WebP, plus a contact sheet, GIF preview and media metadata. ffmpeg, no API key. $0.60 per 1,000 frames + $0.001 per video.

**Turn video files into still images, automatically and in bulk.** Give it direct links to your video files (MP4, MOV, WebM, MKV, AVI, M4V from your CDN, S3, Google Cloud Storage, a CMS or any public URL) and get **frames as JPG, PNG or WebP**: **N evenly spaced thumbnails**, **one frame every N seconds**, **a frame at every scene change** (shot detection), or **frames at exact timestamps**. Each video also gets a **contact sheet** (all frames tiled in one image), an optional **animated GIF preview**, and its **media metadata**: duration, resolution, frame rate, video and audio codecs, bitrate, container and rotation. Frames are saved to the run's storage with public links, timestamps and timecodes, ready for **video thumbnails and poster images, content moderation and AI vision pipelines (feed frames to GPT-4o, Gemini or Claude), visual search indexing, ad and creative QA, e-learning chapter images, dataset building and archiving**. Powered by **ffmpeg** with fast input seeking, so long files are not decoded from the start. No API key, no browser. **$0.60 per 1,000 frames plus $0.001 per video** (contact sheet and GIF included); videos that cannot be processed are free.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| type | videoUrl | timecode | durationSeconds | width | height | videoCodec | framesExtracted |
| --- | --- | --- | --- | --- | --- | --- | --- |
| video | https://samplelib.com/mp4/sample-5s.mp4 |  | 5.759 | 1920 | 1080 | h264 | 3 |
| frame | https://samplelib.com/mp4/sample-5s.mp4 | 00:00:00.960 |  |  |  |  |  |
| frame | https://samplelib.com/mp4/sample-5s.mp4 | 00:00:02.880 |  |  |  |  |  |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `frame-extracted` | $0.0006 | per frame image delivered | 100 videos × 10 thumbnails = 1,000 frames = $0.60 |
| `video-processed` | $0.001 | per video processed (metadata, contact sheet and GIF preview included) | 100 videos = $0.10 |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at 1 GB = $0.00005 |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `videoUrls` | array | yes | — | Direct links to video files (MP4, MOV, WebM, MKV, AVI, M4V…), e.g. from your CDN, S3, Google Cloud Storage or a public sample. Pages on YouTube, TikTok, Instagram and other platforms are not supported (their terms forbid downloading), nor are HLS/DASH stream playlists. |
| `mode` | string | no | `"evenly"` | Evenly: N frames spread across the whole video (thumbnails, previews). Interval: one frame every N seconds. Scenes: a frame at every scene change (shot boundaries; videos up to 60 min). Timestamps: frames at the exact times you list. |
| `frameCount` | integer | no | `10` | For evenly mode: how many frames to take, each from the middle of an equal slice of the video. |
| `intervalSeconds` | number | no | `5` | For interval mode: one frame every this many seconds, starting at 0. |
| `timestamps` | array | no | — | For timestamps mode: times as seconds (12.5) or h:mm:ss / mm:ss (1:02:03.5, 02:30). Times past the end of the video are skipped. |
| `sceneThreshold` | number | no | `0.3` | For scenes mode: ffmpeg scene-change score from 0.05 (very sensitive) to 0.9 (only hard cuts). 0.3 suits most edited footage. The first frame is always included. |
| `maxFramesPerVideo` | integer | no | `50` | Hard cap on frames per video in every mode. |
| `format` | string | no | `"jpg"` | JPG (small, universal), PNG (lossless) or WebP (smallest). |
| `width` | integer | no | `0` | Resize frames to at most this width, keeping the aspect ratio. 0 = original resolution. |
| `quality` | integer | no | `85` | 1–100; higher is sharper and larger. |
| `contactSheet` | boolean | no | `true` | Also make one image with all frames of a video tiled in a grid (included in the per-video price). |
| `gifPreview` | boolean | no | `false` | Also make an animated GIF of the frames, 2 per second at 320 px (included in the per-video price). |
| `maxFileSizeMb` | integer | no | `500` | Videos larger than this are not downloaded (free status row). Large files need more memory: the file is stored on the run's disk. |
| `maxDurationMinutes` | number | no | `180` | Longer videos are skipped (free status row). |
| `respectRobotsTxt` | boolean | no | `true` | Skip files the host's robots.txt disallows (free status row). |

### Limits & honest notes

- Direct video file URLs only. Pages on YouTube, TikTok, Instagram, Facebook, Vimeo, X and similar platforms are refused (free status row): their terms forbid downloading. HLS (.m3u8) and DASH (.mpd) streaming playlists are not supported.
- Each video is downloaded once to the run's disk (up to maxFileSizeMb, default 500 MB) and ffmpeg only reads that local copy. Private and internal network addresses are refused at every redirect hop, robots.txt is respected by default, and requests identify themselves honestly as ActorForge-VideoFrames.
- Scene detection decodes the whole video, so it is limited to videos up to 60 minutes and takes roughly real-time/10 on the default memory. Evenly, interval and timestamp modes seek directly and are fast even for long files.
- Frames, contact sheets and GIFs are stored in the run's key-value store and kept according to your Apify storage retention; download them or copy the links you need.
- Only process videos you have the right to use. Frame images keep the copyright of the original video.

### Related ActorForge actors

- [Image Converter & Compressor](https://apify.com/actor-forge/image-converter) — resize or convert the frames
- [OCR to Text](https://apify.com/actor-forge/ocr-to-text) — read text in frames
- [Bulk Image Downloader](https://apify.com/actor-forge/bulk-image-downloader) — download images in bulk

### Changelog

- **2026-10-23** — Initial release: evenly / interval / scene-change / timestamp frame extraction from direct video URLs with ffmpeg; JPG/PNG/WebP; contact sheet; GIF preview; media metadata.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

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

Direct links to video files (MP4, MOV, WebM, MKV, AVI, M4V…), e.g. from your CDN, S3, Google Cloud Storage or a public sample. Pages on YouTube, TikTok, Instagram and other platforms are not supported (their terms forbid downloading), nor are HLS/DASH stream playlists.

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

Evenly: N frames spread across the whole video (thumbnails, previews). Interval: one frame every N seconds. Scenes: a frame at every scene change (shot boundaries; videos up to 60 min). Timestamps: frames at the exact times you list.

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

For evenly mode: how many frames to take, each from the middle of an equal slice of the video.

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

For interval mode: one frame every this many seconds, starting at 0.

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

For timestamps mode: times as seconds (12.5) or h:mm:ss / mm:ss (1:02:03.5, 02:30). Times past the end of the video are skipped.

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

For scenes mode: ffmpeg scene-change score from 0.05 (very sensitive) to 0.9 (only hard cuts). 0.3 suits most edited footage. The first frame is always included.

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

Hard cap on frames per video in every mode.

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

JPG (small, universal), PNG (lossless) or WebP (smallest).

## `width` (type: `integer`):

Resize frames to at most this width, keeping the aspect ratio. 0 = original resolution.

## `quality` (type: `integer`):

1–100; higher is sharper and larger.

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

Also make one image with all frames of a video tiled in a grid (included in the per-video price).

## `gifPreview` (type: `boolean`):

Also make an animated GIF of the frames, 2 per second at 320 px (included in the per-video price).

## `maxFileSizeMb` (type: `integer`):

Videos larger than this are not downloaded (free status row). Large files need more memory: the file is stored on the run's disk.

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

Longer videos are skipped (free status row).

## `respectRobotsTxt` (type: `boolean`):

Skip files the host's robots.txt disallows (free status row).

## Actor input object example

```json
{
  "videoUrls": [
    {
      "url": "https://samplelib.com/mp4/sample-5s.mp4"
    }
  ],
  "mode": "evenly",
  "frameCount": 3,
  "intervalSeconds": 5,
  "sceneThreshold": 0.3,
  "maxFramesPerVideo": 50,
  "format": "jpg",
  "width": 0,
  "quality": 85,
  "contactSheet": true,
  "gifPreview": false,
  "maxFileSizeMb": 500,
  "maxDurationMinutes": 180,
  "respectRobotsTxt": true
}
```

# Actor output Schema

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

Video rows with metadata, contact sheet and GIF links, and one row per extracted frame with its timestamp and image link.

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

Frames, contact sheets and GIF previews in the key-value store.

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

Videos processed and failed, frames delivered, billing.

# 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": [
        {
            "url": "https://samplelib.com/mp4/sample-5s.mp4"
        }
    ],
    "mode": "evenly",
    "frameCount": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor-forge/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": [{ "url": "https://samplelib.com/mp4/sample-5s.mp4" }],
    "mode": "evenly",
    "frameCount": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("actor-forge/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": [
    {
      "url": "https://samplelib.com/mp4/sample-5s.mp4"
    }
  ],
  "mode": "evenly",
  "frameCount": 3
}' |
apify call actor-forge/video-frame-extractor --silent --output-dataset

```

## MCP server setup

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