# Video Frame Extractor - Thumbnails & Scene Frames to JPG (`fabrikit/video-frame-extractor`) Actor

Extract still frames and thumbnails from direct MP4, WebM, MOV or HLS (.m3u8) video links: evenly spaced, every N seconds, exact timestamps or scene changes. JPG/PNG images with links, timecodes, brightness and perceptual hash.

- **URL**: https://apify.com/fabrikit/video-frame-extractor.md
- **Developed by:** [Fabrikit](https://apify.com/fabrikit) (community)
- **Categories:** Developer tools, 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.30 / 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.
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 - Thumbnails & Scene Frames to JPG

**Video Frame Extractor** extracts still frames and thumbnails from video files you can link to directly: MP4, WebM, MOV, MKV and other formats ffmpeg reads, plus HLS (`.m3u8`) playlists. Each frame is saved as a JPG or PNG image in the run's key-value store and gets one dataset record with its exact timestamp, a download link, the image size, brightness and a perceptual hash.

Four ways to choose frames:

- **count**: a fixed number of frames spread evenly over the video (default: 8).
- **interval**: one frame every N seconds.
- **timestamps**: frames at the exact times you list (`95.5`, `00:01:35.500`, `1:35`).
- **scenes**: a frame each time the picture changes, with a scene score per frame.

The video processing runs on ffmpeg inside the Actor, the same media engine as our [Media Transcriber](https://apify.com/fabrikit/media-transcriber) Actor. No API key, no third-party service.

### What each record contains

- **Frame**: `timestampSeconds`, `timecode` (HH:MM:SS.mmm), `requestedSeconds` (the planned time), `frameIndex`, `sceneScore` in scenes mode.
- **Image**: `imageUrl`, `imageKey`, `imageFormat`, `imageWidth`, `imageHeight`, `imageBytes`, and optionally `imageBase64` as a data URL.
- **Quality signals**: `brightness` (0-255), `contrast`, `blank` (black, white or single-colour frame) and `perceptualHash` (64-bit difference hash) for grouping similar frames.
- **Video facts**: `durationSeconds`, `videoWidth`, `videoHeight` (as displayed, phone rotation applied), `fps`, `videoCodec`, `audioCodec`, `container`, `bitrateKbps`, `fileSizeBytes`, `videoTitle` from the file metadata.
- **Contact sheet**: `contactSheetUrl` points to one JPG grid with the thumbnails of the video (up to 64 frames, free).

### Use cases

- **Thumbnails and previews** for a video library, CMS or e-commerce catalogue, without opening each file.
- **Input for AI vision models**: turn a video into a handful of images an LLM can look at (set `includeImageBase64` for agents that cannot fetch links).
- **Scene lists and storyboards** of trailers, ads and edited clips, with the time of every cut.
- **Content moderation and QA**: sample frames from user uploads, flag black or frozen video with `blank` and repeated hashes.
- **Slide capture** from recorded talks: interval mode with `skipDuplicateFrames` keeps one image per slide.
- **Dataset building** for computer vision: evenly spaced frames from your own footage, in one format and size.

### How to use

1. Paste direct video links into **Video URLs**. The link has to return the video itself (it usually ends in `.mp4`, `.webm`, `.mov` or `.m3u8`), not a web page with a player.
2. Choose **Which frames** and its setting (number of frames, seconds between frames, timestamps or scene sensitivity).
3. Run. Open the **Frames** tab to see the images, or download the dataset as JSON, CSV or Excel.

#### Input example

```json
{
  "videoUrls": [
    { "url": "https://download.blender.org/durian/trailer/sintel_trailer-480p.mp4" },
    { "url": "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8" }
  ],
  "mode": "scenes",
  "sceneThreshold": 0.3,
  "maxScanMinutes": 2,
  "maxWidth": 640,
  "maxFramesPerVideo": 20,
  "skipBlankFrames": true,
  "contactSheet": true
}
```

Useful options: `startSeconds` / `endSeconds` limit every mode to a window of the video; `maxWidth` scales frames down (never up) and, for HLS, picks the smallest stream at least that wide; `exactTimestamps` decodes the exact frame at each planned time instead of the nearest keyframe inside its slot; `skipDuplicateFrames` with `duplicateDistance` drops look-alike frames; `imageFormat` is `jpg` or `png`.

#### Output example

A real record from the Sintel trailer (count mode, 8 frames). The first frame of its slot was black, so a frame 1.6 s later was taken instead:

```json
{
  "videoIndex": 1,
  "videoUrl": "https://download.blender.org/durian/trailer/sintel_trailer-480p.mp4",
  "videoTitle": "Sintel Trailer",
  "frameIndex": 1,
  "timestampSeconds": 4.875,
  "timecode": "00:00:04.875",
  "requestedSeconds": 3.263,
  "sceneScore": null,
  "imageUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/frame-001-7a0381-0001.jpg",
  "imageKey": "frame-001-7a0381-0001.jpg",
  "imageFormat": "jpg",
  "imageWidth": 854,
  "imageHeight": 480,
  "imageBytes": 10417,
  "brightness": 80.1,
  "contrast": 50.7,
  "blank": false,
  "perceptualHash": "ecfcb8e6fabe148d",
  "contactSheetUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/contact-sheet-001-7a0381.jpg",
  "durationSeconds": 52.208,
  "videoWidth": 854,
  "videoHeight": 480,
  "fps": 24,
  "videoCodec": "h264",
  "audioCodec": "aac",
  "container": "mov,mp4,m4a,3gp,3g2,mj2",
  "bitrateKbps": 670,
  "fileSizeBytes": 4372373,
  "sourceType": "file",
  "mode": "count",
  "status": "ok",
  "error": null,
  "extractedAt": "2026-10-24T05:39:56.854Z"
}
```

A link that cannot be used (404, a web page, an audio-only file, an encrypted or live stream) produces one record with `status: "failed"` and the reason in `error`, and is not charged. The `SUMMARY` record in the key-value store counts frames saved, blank and duplicate frames skipped and failed videos.

### How it reads your videos

Small files are downloaded once. Larger files and HLS playlists are read in place with HTTP range requests, so for a few frames from a long video only the parts around those frames are transferred. In count and interval modes the Actor uses the nearest keyframe inside each slot when one is there (fast) and decodes the exact frame otherwise; the real timestamp of every frame is always reported. Scenes mode decodes every frame of the scanned part.

### Pricing

Pay per event, no subscription:

| Event | When |
|---|---|
| `frame-extracted` | each frame saved |
| `scene-scan-minute` | each minute scanned, scenes mode only |

See the Pricing tab for current prices; paid Apify plans get lower rates.

Examples: 8 thumbnails from each of 100 videos = 800 frames. One frame every 10 seconds of a 1-hour video = 360 frames. Blank and duplicate frames that are skipped, contact sheets and failed videos are free.

Scene detection has to decode the whole scanned part, so it adds a scan charge counted at 720p / 30 fps: a 10-minute 720p30 video is 10 minutes, 1080p30 counts 2.25 per minute, 60 fps doubles, small video counts at least a quarter. A 52-second 480p trailer is 1 minute. Use `maxScanMinutes` and a lower `maxWidth` for HLS to keep it down. Set a maximum cost per run in Apify and the Actor stops cleanly before going over it.

### How it compares

This Actor reads HLS playlists and offers exact timestamps, intervals, scene changes and a contact sheet in one tool. Running ffmpeg yourself is free if you already have servers; this Actor saves the setup, scaling and storage.

Honest limits: it does not download videos from YouTube, TikTok, Instagram, Vimeo, Twitch or similar platforms, and refuses their page links. Encrypted (DRM or AES) and live HLS streams are refused; MPEG-DASH (`.mpd`) is not supported. Each link must be reachable without logging in. Scene detection finds cuts well; slow cross-fades may need a lower `sceneThreshold`.

### Integrations

- **API and clients**: start runs and read results with the Apify API, the JavaScript or Python client, or one synchronous `run-sync-get-dataset-items` call.
- **Make, Zapier, n8n**: send new video links from a form, a sheet or a storage bucket and get the frame links back.
- **AI agents (MCP)**: call the Actor as a tool through the Apify MCP server; with `includeImageBase64` the images come back inside the result.
- **Webhooks**: get notified when a run finishes and push the records to your own system.

### FAQ

**Is it legal?** The Actor only reads the video links you give it, like a video player would. Use videos you own or are allowed to process. It deliberately refuses video platform pages and protected streams.

**Do I need a proxy?** No. Videos are fetched directly; if a host refuses the download (401, 403, 429), it is retried through Apify datacenter proxy or your own proxy URLs, and rate-limited reads are retried after a pause. Residential proxy is never used.

**What are the limits?** Up to 1,000 frames per video and 100,000 per run. Scene scans are limited by `maxScanMinutes` (default 30). Very large files are fine because they are read in place.

**Where are the images stored?** In your run's key-value store, next to the `SUMMARY` record. The links are built with the Apify SDK public-URL helper, which signs them when your account restricts storage access. Images stay as long as your plan keeps run storages; the downloaded video itself is deleted as soon as its frames are saved.

### Changelog

- **0.1** (October 2026): first release. Count, interval, timestamps and scene modes; direct files and HLS; keyframe or exact seeking; blank and duplicate skipping; JPG/PNG; contact sheets; base64 option; per-frame pricing.

### En español

**Video Frame Extractor** saca fotogramas y miniaturas de enlaces directos a videos (MP4, WebM, MOV, MKV) y de listas HLS (.m3u8): un número fijo de fotogramas repartidos en el video, uno cada N segundos, tiempos exactos o cambios de escena. Cada fotograma queda como imagen JPG o PNG con su enlace, su marca de tiempo, brillo y hash perceptual, más una hoja de contactos por video. No descarga videos de YouTube, TikTok ni otras plataformas. Consulta la pestaña Pricing para ver los precios actuales; los planes de pago de Apify tienen tarifas más bajas. Los videos que fallan no se cobran. Para transcribir el audio de tus videos usa nuestro [Media Transcriber](https://apify.com/fabrikit/media-transcriber).

# Actor input Schema

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

Direct links to video files or HLS (.m3u8) playlists, e.g. from your storage bucket, CDN or CMS. The link must return the video itself, not a web page with a player. Video platform pages (YouTube, TikTok, Instagram, Vimeo, Twitch...) are refused.

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

count: a fixed number of frames spread evenly over the video. interval: one frame every N seconds. timestamps: frames at the exact times you list. scenes: a frame each time the picture changes (cuts), billed also per minute scanned.

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

How many evenly spaced frames to take from each video. Each frame is taken from the middle of its part of the video, so the black first and last frames are avoided.

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

One frame every N seconds, starting at the start of the window. Values below 3 seconds are decoded in a single pass (frames within a couple of video frames of the exact grid).

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

Exact times to capture, as seconds ("95.5") or HH:MM:SS(.mmm) / MM:SS ("00:01:35.500"). Times after the end of a video are skipped.

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

How different two consecutive frames must be to count as a new scene, from 0.05 (very sensitive, many frames) to 0.95. 0.3 catches hard cuts; try 0.15-0.2 for slow fades or slides.

## `minSceneGapSeconds` (type: `number`):

Ignore new scenes that start less than this many seconds after the previous captured one (avoids bursts on flashes and fast edits).

## `maxScanMinutes` (type: `integer`):

Scene detection decodes every frame, so it is limited to the first N minutes of the window to keep runs fast and the scan cost predictable.

## `startSeconds` (type: `number`):

Only take frames after this point of each video. 0 = from the beginning.

## `endSeconds` (type: `number`):

Only take frames before this point of each video. 0 = until the end.

## `exactTimestamps` (type: `boolean`):

count and interval modes normally use the nearest keyframe inside each slot (fast and cheap); the real timestamp is always reported. Turn on to decode the exact frame at every planned time. timestamps mode is always exact.

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

Upper limit of frames saved from one video, in every mode.

## `maxItems` (type: `integer`):

The run stops after saving this many frames across all videos (each frame is one dataset item and one charge).

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

Black, white or single-colour frames (fades, title gaps) are replaced by a frame a little later in the same slot, or dropped without charge. Not applied in timestamps mode, where such frames are kept and flagged with blank = true.

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

Drop frames that look almost the same as a frame already saved from the same video (perceptual hash), e.g. a static slide over several intervals. Dropped frames are not charged.

## `duplicateDistance` (type: `integer`):

Maximum perceptual-hash difference (0-20 bits out of 64) for two frames to count as duplicates. Higher drops more.

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

JPG is small and fine for previews and AI vision; PNG is lossless and larger.

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

Frames wider than this are scaled down keeping the aspect ratio; smaller videos are never upscaled. 0 keeps the original size. For HLS playlists the smallest stream at least this wide is used.

## `jpegQuality` (type: `integer`):

1-100. Higher means better images and bigger files.

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

Also save one JPG grid with the thumbnails of up to 64 frames of each video (free); its link is in contactSheetUrl.

## `includeImageBase64` (type: `boolean`):

Add an imageBase64 data URL to every record, handy for AI agents and scripts that cannot fetch links. Keep maxWidth small (e.g. 512) when you turn this on.

## `proxyConfiguration` (type: `object`):

Videos are fetched directly. Only if a host refuses the request (401, 403, 429) is it retried through this proxy (Apify datacenter by default). Residential proxy is never used.

## Actor input object example

```json
{
  "videoUrls": [
    {
      "url": "https://download.blender.org/durian/trailer/sintel_trailer-480p.mp4"
    },
    {
      "url": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
    }
  ],
  "mode": "count",
  "frameCount": 8,
  "intervalSeconds": 10,
  "timestamps": [
    "5",
    "00:00:12.5",
    "0:30"
  ],
  "sceneThreshold": 0.3,
  "minSceneGapSeconds": 1,
  "maxScanMinutes": 30,
  "startSeconds": 0,
  "endSeconds": 0,
  "exactTimestamps": false,
  "maxFramesPerVideo": 100,
  "maxItems": 200,
  "skipBlankFrames": true,
  "skipDuplicateFrames": false,
  "duplicateDistance": 6,
  "imageFormat": "jpg",
  "maxWidth": 1280,
  "jpegQuality": 85,
  "contactSheet": true,
  "includeImageBase64": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One item per frame (and one per failed video)

## `images` (type: `string`):

Key-value store with the JPG/PNG frames and the contact sheets

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

Frames saved and charged, blank and duplicate frames skipped, scene scan units, failed videos

# 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://download.blender.org/durian/trailer/sintel_trailer-480p.mp4"
        },
        {
            "url": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
        }
    ],
    "timestamps": [
        "5",
        "00:00:12.5",
        "0:30"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fabrikit/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://download.blender.org/durian/trailer/sintel_trailer-480p.mp4" },
        { "url": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4" },
    ],
    "timestamps": [
        "5",
        "00:00:12.5",
        "0:30",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("fabrikit/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://download.blender.org/durian/trailer/sintel_trailer-480p.mp4"
    },
    {
      "url": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
    }
  ],
  "timestamps": [
    "5",
    "00:00:12.5",
    "0:30"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call fabrikit/video-frame-extractor --silent --output-dataset

```

## MCP server setup

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