# Video Frame Extractor & Thumbnail Maker (Bulk) (`toowl/video-frame-extractor`) Actor

Extract frames from videos in bulk from URLs: one every N seconds, N evenly spaced thumbnails, exact timestamps or every scene change. JPG, PNG or WebP. For AI datasets, previews and thumbnails. Pay per video.

- **URL**: https://apify.com/toowl/video-frame-extractor.md
- **Developed by:** [Chalid Ade](https://apify.com/toowl) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 videos processed

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/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 & Thumbnail Maker — bulk

Extract still frames from videos in bulk from URLs: **one every N seconds**, **N evenly spaced thumbnails**, **exact timestamps**, or **one per scene change**. JPG, PNG or WebP, resized if you like. Built for **AI vision datasets**, video previews, thumbnails and content moderation.

Runs ffmpeg inside the Actor: no third-party API.

### Modes

| `mode` | What you get |
| --- | --- |
| `interval` | One frame every `interval` seconds (0.5 = two a second) |
| `count` | `count` frames spread evenly over the video — thumbnails/storyboard |
| `times` | Frames at `timestamps`, e.g. `[0, 12.5, 60]` |
| `scenes` | A frame at each scene change (`sceneThreshold`, lower = more) |

### Input

```json
{
  "files": [{ "url": "https://example.com/ad.mp4" }],
  "mode": "count",
  "count": 6,
  "format": "webp",
  "width": 640
}
```

| Field | Default | Notes |
| --- | --- | --- |
| `files` | — | Video URLs |
| `mode` | `interval` | `interval`, `count`, `times`, `scenes` |
| `interval` | 1 | Seconds |
| `count` | 10 | |
| `timestamps` | — | Seconds |
| `sceneThreshold` | 0.3 | 0.05–0.9 |
| `maxFrames` | 100 | Per video, up to 1000 |
| `format` | `jpg` | `jpg`, `png`, `webp` |
| `quality` | 85 | JPG/WebP |
| `width` | original | px, height keeps the ratio |
| `maxFileSizeMb` | 500 | |

### Output

Frames go to the run's key-value store; one dataset row per video with every frame's time and link:

```json
{
  "url": "https://example.com/ad.mp4",
  "name": "ad.mp4",
  "frameCount": 6,
  "firstFrame": "https://api.apify.com/v2/key-value-stores/…/records/0001-ad-0001.webp",
  "frames": [
    { "time": 2.5, "url": "https://api.apify.com/v2/key-value-stores/…/records/0001-ad-0001.webp" },
    { "time": 7.5, "url": "https://api.apify.com/v2/key-value-stores/…/records/0001-ad-0002.webp" }
  ],
  "duration": 30.03,
  "width": 1920,
  "height": 1080,
  "fps": 29.97
}
```

### Pricing

Pay per event: one `video-processed` per video, however many frames. Failed videos are free.

### Free browser version

[toowl.my.id/en/extract-frames](https://toowl.my.id/en/extract-frames/) pulls frames from a video in your browser, free.

### Call it from your code

```bash
curl -X POST "https://api.apify.com/v2/acts/toowl~video-frame-extractor/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"files":[{"url":"https://example.com/your-file"}]}'
```

The same call works from Python (`apify-client`), JavaScript, Make, Zapier and n8n (Apify app/node or a plain HTTP request).

### Use it from AI agents (MCP)

Add this Actor as a tool to Claude, Cursor, VS Code or any MCP client through Apify's MCP server:

```
https://mcp.apify.com/?actors=toowl/video-frame-extractor
```

The agent can then pass file URLs and read the results itself.

### More toowl file APIs

Speech to text & subtitles, AI vocal remover, text to speech, AI object remover, PDF to Markdown, PDF to Word & Excel, HTML/URL to PDF, OCR, Office to PDF, PDF compressor, PDF merge/split, PDF password protect, PDF to image, image to PDF, bulk watermark, image converter and compressor, background remover, AI upscaler, image to SVG, QR code and barcode generators, QR/barcode reader, favicon generator, video compressor, frame extractor and audio converter. All pay per file, all batch-friendly: [toowl.my.id/en/api](https://toowl.my.id/en/api/).

Questions or a format that fails? Open an issue on the Actor's **Issues** tab.

# Actor input Schema

## `files` (type: `array`):

Direct links to the videos (MP4, MOV, WebM, MKV, AVI and most others).

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

How frames are picked from each video.

## `interval` (type: `number`):

For 'One every N seconds'. 0.5 = two frames a second.

## `count` (type: `integer`):

For 'N frames spread evenly'.

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

For 'At exact timestamps', e.g. \[0, 12.5, 60].

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

For 'At every scene change'. Lower = more frames.

## `maxFrames` (type: `integer`):

Stop after this many frames per video.

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

Image format of the extracted frames.

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

For JPG and WebP.

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

Resize frames to this width (height keeps the ratio). Empty = original size.

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

Larger files are skipped with an error (not charged).

## Actor input object example

```json
{
  "files": [
    {
      "url": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/sample-video.mp4"
    }
  ],
  "mode": "interval",
  "interval": 1,
  "count": 10,
  "timestamps": [
    1,
    3,
    5
  ],
  "sceneThreshold": 0.3,
  "maxFrames": 100,
  "format": "jpg",
  "quality": 85,
  "maxFileSizeMb": 500
}
```

# Actor output Schema

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

One row per input file, with a download link for the result where there is one.

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

Result files in the default key-value store, plus a SUMMARY record.

# 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 = {
    "files": [
        {
            "url": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/sample-video.mp4"
        }
    ],
    "timestamps": [
        1,
        3,
        5
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("toowl/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 = {
    "files": [{ "url": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/sample-video.mp4" }],
    "timestamps": [
        1,
        3,
        5,
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("toowl/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 '{
  "files": [
    {
      "url": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/sample-video.mp4"
    }
  ],
  "timestamps": [
    1,
    3,
    5
  ]
}' |
apify call toowl/video-frame-extractor --silent --output-dataset

```

## MCP server setup

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