# Video Thumbnail Generator: Poster Frame & Contact Sheet (`data-done-right/video-thumbnail-generator`) Actor

Make a poster thumbnail and/or contact sheet from video file URLs: auto-picks a sharp, well-lit frame (skips black and flat ones) or cuts the frame at your time. jpg/png/webp, signed links. Direct files only, no YouTube, no face or content AI. Free when a video fails.

- **URL**: https://apify.com/data-done-right/video-thumbnail-generator.md
- **Developed by:** [Data Done Right](https://apify.com/data-done-right) (community)
- **Categories:** Videos, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.40 / 1,000 video thumbnaileds

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 Thumbnail Generator: Poster Frame & Contact Sheet

This **video thumbnail generator** turns video file URLs into a **poster frame** and/or a **contact sheet**: it picks a sharp, well-exposed frame automatically (or cuts the frame at a time you choose) and builds a grid of evenly spaced frames with timecodes. You get JPG, PNG or WebP images with signed download links, one dataset row per video. It runs ffmpeg and Pillow, so there is no browser, API key or AI model to set up.

> **What it does NOT do.** It reads **direct video files** (mp4, mov, webm, mkv, avi...) from a URL. It does **not** download from YouTube, Vimeo, TikTok, Instagram or other streaming sites, and it rejects those page links without charge. The automatic pick is a plain image heuristic: it skips black, washed-out and flat frames and prefers detail and contrast. It does **not** recognise faces, text, people or what is "interesting", and it does not judge aesthetics, so for a hand-picked cover use a poster time. It does not add titles, overlays or captions to the image. It respects robots.txt and cannot read files behind a login or on private addresses.

### What you get

- **Poster frame:** one image per video, either the best-scoring frame or the exact frame at your time (seconds, HH:MM:SS or a percentage).
- **Contact sheet:** one grid image per video, 1 to 48 evenly spaced frames, each labelled with its timecode.
- **One row per video:** links, the chosen time, frame size, file size, video facts (duration, resolution, fps, codec), status and notes. The price is per video, whichever outputs you choose.

### How to generate a thumbnail from a video URL

1. Paste one or more **direct video URLs** in `videoUrls` (the prefilled sample works as is).
2. Leave `posterTimestamp` empty for the automatic pick, or set a time such as `12.5`, `00:01:05` or `25%`.
3. Run it. Each video gets `posterUrl` and/or `sheetUrl` in the dataset. Files are also in the run's key-value store, with the run summary in the `SUMMARY` record.

### How to make a contact sheet of a video

Set `outputs` to `contactSheet` (or leave `both`), then choose `contactSheetTiles` (frames in the grid), `contactSheetColumns` and `contactSheetTileWidth`. The frames are taken from the middle of equal slices of the whole video, so they cover it from start to end. Timecodes on the tiles can be switched off with `contactSheetTimecodes`.

### How to get the frame at an exact time

Set `posterTimestamp` for the whole run, or give one video its own time in `videos`: `[{"url": "https://example.com/a.mp4", "name": "launch-ad", "posterTimestamp": "00:00:12"}]`. A time past the end of the video uses the last frame and the row says so in `note`. An unreadable time gives that video an error row and no charge.

### How the automatic pick works

Without a poster time, the Actor decodes `candidateFrames` small frames (default 16) spread across the video, ignoring the first and last `skipEdgesPercent` (default 5%). Each frame is scored on edge detail, contrast and mid-range brightness. Frames that are nearly black, nearly white or almost one colour (fades, blank title cards, solid backgrounds) are rejected. The best of the rest is cut again at full size. The row shows `posterMethod` (`auto`), `posterScore` (0 to 1, comparable within one video only) and `framesScored`. If every sampled frame is dark or flat, the least bad one is used and `note` says so. It cannot know which frame you would like best: if two frames score exactly the same, the earlier one wins.

### Input

| Field | Default | What it does |
|---|---|---|
| `videoUrls` (required) | one sample | Direct video file URLs. Example: `https://example.com/clip.mp4`. |
| `videos` | none | Per-video `name` and `posterTimestamp`: `[{"url": "...", "name": "ad", "posterTimestamp": "50%"}]`. |
| `outputs` | `both` | `poster`, `contactSheet` or `both`. |
| `posterTimestamp` | empty (auto) | Poster time: `12.5`, `00:01:05` or `25%`. |
| `imageFormat` | `jpg` | `jpg`, `png` or `webp`. |
| `imageQuality` | 85 | 1 to 100, JPG and WebP only. |
| `posterWidth` | 1280 | Max poster width in px, 0 = original. Never upscales. |
| `candidateFrames` | 16 | Frames compared for the auto pick (4 to 40). |
| `skipEdgesPercent` | 5 | Ignore this share of the start and the end (0 to 30). |
| `contactSheetTiles` | 12 | Frames in the grid (1 to 48). |
| `contactSheetColumns` | 4 | Tiles per row (1 to 12). |
| `contactSheetTileWidth` | 320 | Tile width in px (80 to 640). |
| `contactSheetTimecodes` | true | Timecode on each tile. |
| `maxVideosPerRun` | 100 | Hard cap on videos per run (max 1,000). Extra videos are listed as skipped. |
| `maxVideoSizeMb` | 500 | Larger files are rejected (max 2,048). |
| `maxDurationMinutes` | 240 | Longer videos are rejected without charge. |
| `videoTimeoutSecs` | 600 | Per download and per ffmpeg step. |
| `outputStoreName` | empty | Keep the images in a named key-value store. |

Input example:

```json
{
  "videoUrls": ["https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"],
  "outputs": "both",
  "imageFormat": "jpg",
  "contactSheetTiles": 12,
  "contactSheetColumns": 4
}
```

### Output

One row per video. This is a real row from a local run of the sample above (5 s, 960x540):

```json
{
  "sourceUrl": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
  "videoIndex": 1,
  "name": null,
  "durationSeconds": 5.055,
  "videoWidth": 960,
  "videoHeight": 540,
  "fps": 29.97,
  "codec": "h264",
  "format": "jpg",
  "posterUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/v01-poster.jpg",
  "posterKey": "v01-poster.jpg",
  "posterTimestamp": 2.101,
  "posterTimecode": "00:00:02.101",
  "posterMethod": "auto",
  "posterScore": 0.7685,
  "framesScored": 16,
  "posterWidth": 960,
  "posterHeight": 540,
  "posterBytes": 26254,
  "sheetUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/v01-contact-sheet.jpg",
  "sheetKey": "v01-contact-sheet.jpg",
  "sheetTiles": 12,
  "sheetColumns": 4,
  "sheetWidth": 1300,
  "sheetHeight": 556,
  "sheetBytes": 143553,
  "status": "ok",
  "error": null,
  "note": null
}
```

On Apify the links are signed download links. A failed video has `status` `error`, the reason in `error`, and no image fields.

### Use cases

- Give every video in a library or CMS a poster image without picking frames by hand.
- Build link-preview and Open Graph images from the frame at a fixed time or percentage.
- Make contact sheets for editors, archivists and reviewers who need to scan a long video at a glance.
- Create the cover images for a video catalogue, course site or podcast-with-video feed in bulk.
- Feed a video pipeline: one poster per video as the preview for the clips you cut, merge or subtitle.

### How much does it cost

Pay per event: **$0.01 per video delivered** (`video-thumbnailed`, $10 per 1,000). A video is charged only when everything you asked for was created: the poster, the contact sheet, or both. If one of them fails, nothing is delivered and nothing is charged. Rejected links, failed and skipped videos and the `SUMMARY` record are free. Plan discounts apply (Silver about 10%, Gold and higher about 20%).

- 1,000 videos: $10.
- 10,000 videos: $100.
- 100,000 videos: $1,000.

The price is per video whatever its length, so `maxDurationMinutes` (default 240) and `maxVideoSizeMb` (default 500) also limit the work one charge can cause. `maxVideosPerRun` caps a run, and if you set a maximum spend per run the Actor stops cleanly when it is reached and removes the files it could not charge for. A local test of the 5-second 960x540 sample (download, 16 scored frames, poster and a 12-tile sheet) took about 3 seconds in total. If you only need frames, not a scored pick or a sheet per video, Video Frame Extractor charges per frame and can be cheaper for a single frame.

### FAQ

#### Which video sources work?

Direct links to video files that the server returns with a normal GET: mp4, mov, webm, mkv, avi and similar. HLS or DASH playlists (m3u8, mpd) and pages of video sites are rejected without charge. The host must allow automated fetching in its robots.txt, and links to private or internal addresses are blocked.

#### Is the automatic frame really "the best"?

It is the best by a simple measure: detail, contrast and brightness, with black, washed-out and flat frames removed. It does not understand content. It works well to avoid fade-ins, black frames and blank title cards; it will not choose the frame where someone smiles. Raise `candidateFrames` for a finer search, or set `posterTimestamp` when you know the moment.

#### Does it detect scenes?

No. The automatic pick samples evenly spaced frames and does not run scene detection. For scene-change frames, keyframes or one frame every N seconds, use Video Frame Extractor.

#### What happens if only part of the job fails?

All or nothing per video. If the poster is made but the contact sheet cannot be, the video gets an error row, no file is kept and no charge is made. Frames that cannot be decoded inside a contact sheet are left out and the row notes how many; the sheet is still delivered if at least one tile exists.

#### Which image sizes do I get?

The poster is shrunk to `posterWidth` (default 1280 px) keeping the aspect ratio and is never enlarged. The contact sheet is about `contactSheetColumns` x `contactSheetTileWidth` wide, with the tile height from the video's aspect ratio.

#### Which limits apply?

Files up to 2 GB (default 500 MB), 240 minutes by default, up to 1,000 videos per run. The whole file is downloaded once per video, and videos with no readable video track get an error row. Contact sheet text uses a built-in font, which shows timecodes only.

#### How long are the images kept?

In the run's key-value store, which expires with your plan's retention period. Set `outputStoreName` to keep them in a named store until you delete it.

### Use with the Apify API, MCP, n8n and Make

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("data-done-right/video-thumbnail-generator").call(run_input={
    "videoUrls": ["https://example.com/launch.mp4"],
    "outputs": "both", "posterTimestamp": "25%"})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["status"], row["posterUrl"] or row["error"], row["sheetUrl"])
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('data-done-right/video-thumbnail-generator').call({
  videoUrls: ['https://example.com/launch.mp4'], outputs: 'poster', imageFormat: 'webp' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

In n8n or Make use the Apify node with the actor name and the same JSON. With Apify's MCP server (mcp.apify.com) an AI assistant can call it: "make a thumbnail and contact sheet for this mp4". It needs only a video URL.

### Related tools

- **Video Frame Extractor: Keyframes, Scenes & Thumbnails for AI**: many frames per video (keyframes, scene changes, every N seconds), priced per frame.
- **Cut Video: Video Trimmer, Clip Cutter & Video to GIF**: cut clips, segments, GIFs or MP3s from video URLs.
- **Extract Audio from Video: MP3, WAV & FLAC in Bulk**: the audio track of each video as an audio file.

# Actor input Schema

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

Direct links to video files (mp4, mov, webm, mkv, avi). Example: https://example.com/clip.mp4. Every video gets the outputs chosen below. YouTube, Vimeo, TikTok and other streaming-site page links are rejected, with no charge.

## `videos` (type: `array`):

Optional per-video settings: \[{"url": "https://example.com/a.mp4", "name": "launch-ad", "posterTimestamp": "00:00:12"}, ...]. 'name' is used in the file names; 'posterTimestamp' overrides the run-wide poster time for that video. Used in addition to 'Video URLs'.

## `outputs` (type: `string`):

Poster = one image of the best frame (or the frame at your time). Contact sheet = one grid image of evenly spaced frames. The price is per video, the same for any choice.

## `posterTimestamp` (type: `string`):

Leave empty to let the Actor pick the best frame. Or set the exact time: seconds (12.5), HH:MM:SS (00:01:05) or a percentage of the video (25%). A time past the end uses the last frame and adds a note.

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

File type of the poster and the contact sheet.

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

JPG and WebP only. 85 is a good balance; 95 is near-lossless and larger. Ignored for PNG.

## `posterWidth` (type: `integer`):

Shrink the poster to this width, keeping the aspect ratio. 0 = original size. Never upscales. Example: 1280.

## `candidateFrames` (type: `integer`):

How many evenly spaced frames are scored when you do not set a poster time. More frames find a better one but take longer. Example: 16.

## `skipEdgesPercent` (type: `number`):

Frames in the first and last part of the video are not considered (fades, title cards, end credits). 5 = ignore the first and last 5 percent. 0 = use the whole video.

## `contactSheetTiles` (type: `integer`):

Number of frames in the grid, evenly spaced across the whole video. Example: 12 gives 3 rows of 4.

## `contactSheetColumns` (type: `integer`):

Tiles per row. Rows follow from the tile count. Example: 4.

## `contactSheetTileWidth` (type: `integer`):

Width of one tile. The sheet is about columns x tile width wide. Example: 320.

## `contactSheetTimecodes` (type: `boolean`):

Write the time of each frame in the corner of its tile.

## `maxVideosPerRun` (type: `integer`):

Hard cap on videos processed in one run (and so on what you can be charged). Videos past the cap are listed as skipped.

## `maxVideoSizeMb` (type: `integer`):

Source files above this size are rejected before the download finishes.

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

Longer videos are rejected without charge. Example: 240 = 4 hours.

## `videoTimeoutSecs` (type: `integer`):

Applies separately to each download and to each ffmpeg step.

## `outputStoreName` (type: `string`):

Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period. Example: my-thumbnails.

## Actor input object example

```json
{
  "videoUrls": [
    "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
  ],
  "outputs": "both",
  "imageFormat": "jpg",
  "imageQuality": 85,
  "posterWidth": 1280,
  "candidateFrames": 16,
  "skipEdgesPercent": 5,
  "contactSheetTiles": 12,
  "contactSheetColumns": 4,
  "contactSheetTileWidth": 320,
  "contactSheetTimecodes": true,
  "maxVideosPerRun": 100,
  "maxVideoSizeMb": 500,
  "maxDurationMinutes": 240,
  "videoTimeoutSecs": 600
}
```

# Actor output Schema

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

One row per video with the poster and contact sheet links, frame time, size and status, as JSON, CSV, Excel and more.

## `records` (type: `string`):

Key-value store records: the poster and contact sheet files, the run summary and notes on any problems.

# 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://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-done-right/video-thumbnail-generator").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://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"] }

# Run the Actor and wait for it to finish
run = client.actor("data-done-right/video-thumbnail-generator").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://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
  ]
}' |
apify call data-done-right/video-thumbnail-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-done-right/video-thumbnail-generator"
        }
    }
}
```

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/3KfWYu5MRMkQnaQL5/builds/IdUlPhqQC70h08UxD/openapi.json
