# Video Frame Extractor with Transcript: Keyframes for LLMs (`webstack-labs/video-frame-extractor`) Actor

Extract keyframes from your MP4, MOV or WEBM file links with the words spoken at each frame: scene changes plus evenly spaced frames, a free contact sheet and an optional Whisper transcript aligned to every frame, ready for GPT, Claude or Gemini. $0.002 per frame; failed videos free.

- **URL**: https://apify.com/webstack-labs/video-frame-extractor.md
- **Developed by:** [Webstack Labs](https://apify.com/webstack-labs) (community)
- **Categories:** AI, Videos, 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 $2.00 / 1,000 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 with Transcript: Keyframes for LLMs

A **video frame extractor with transcript**: turn a video into the few pictures that matter, **plus what is said while each one is on screen**. Paste
links to MP4, MOV, WEBM or other video files (or web pages that play one) and get, for every video, one row with its **key frames**
(scene changes and evenly spaced frames), their timecodes and image links, a **contact sheet** of all
frames in one image, and optionally the **Whisper transcript aligned to the frames**. That is the shape a
multimodal AI model (GPT-4o, Claude, Gemini) needs to "watch" a video without sending it every frame:
**video to LLM input** with keyframes, thumbnails and the spoken words, at $0.002 per frame.

- **Scene detection** with FFmpeg: the strongest cuts become frames; long shots are filled with evenly
  spaced frames, so every part of the video is covered (default up to 20 frames per video)
- Other modes: scene changes only, one frame every N seconds, or N evenly spaced frames
- **Contact sheet** (free): one JPEG grid of all frames with timecodes
- **Transcript aligned to frames** (optional): each frame carries the speech said while it is the
  current frame; Whisper runs on Apify, so your video is **not sent to any third-party AI API**
- **Timeline in Markdown**: one heading per frame with its image link and speech, ready to paste into an LLM
- JPEG or PNG, scaled to the width you choose (default 1280 px); time range (start and end)
- Pay per frame; **failed videos are free**; empty input = a free 12-second sample video

### Quick start: video to frames and transcript in one API call

Press **Start** with the empty input to process a free 12-second sample video. From your own code, send a link to a
video file and get the frames back in the same call (the token is your Apify API token). This call takes 10
evenly spaced frames of a short public test clip and attaches the words spoken while each frame is on screen
($0.02 for 10 frames plus $0.006 for the transcript minute):

```bash
curl -X POST "https://api.apify.com/v2/acts/webstack-labs~video-frame-extractor/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://github.com/mediaelement/mediaelement-files/raw/master/echo-hereweare.mp4"], "mode": "count", "framesPerVideo": 10, "includeTranscript": true}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("webstack-labs/video-frame-extractor").call(run_input={
    "videoUrls": ["https://example.com/videos/product-demo.mp4"],  # your MP4, MOV, WEBM files
    "includeTranscript": True,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["contactSheetUrl"])
    for frame in row["frames"]:
        print(frame["timecode"], frame["imageUrl"], frame["speech"])
    prompt = row["timelineMarkdown"]  # one heading per frame with image link and speech: paste into an LLM
```

Each row has `frames` (timecode, reason, `imageUrl`, `speech`), a free `contactSheetUrl` and `timelineMarkdown`.
Failed videos are free.

### Who uses it

- **AI and agent builders**: give an LLM the key frames and the words of a product demo, lecture,
  tutorial or meeting recording, to summarise it, answer questions or write chapters
- **Video and content teams**: thumbnails and storyboards, scene lists of long recordings, contact sheets
  for review
- **Dataset builders**: frames with timecodes (and captions from the speech) for training or evaluation
- **Automation** (n8n, Make, Zapier, the Apify API): send new videos from your storage and get frames back

### Input

```json
{
  "videoUrls": ["https://example.com/media/product-demo.mp4"],
  "framesPerVideo": 20,
  "mode": "auto",
  "includeTranscript": true
}
```

| Field | Default | What it does |
|---|---|---|
| `videoUrls` | – | Links to video files (anything FFmpeg reads) or to web pages with a video player. Empty = free sample. |
| `findVideoInPages` | true | For a web page link, find the video file the page plays and use it (`mediaUrl` in the row). |
| `framesPerVideo` | 20 | The most frames per video (1–200). |
| `mode` | `auto` | `auto` (scene changes + filler frames), `scenes`, `interval`, `count`. |
| `intervalSecs` | 10 | Seconds between frames in `interval` mode. |
| `sceneThreshold` | 0.3 | Scene change sensitivity (0.05–0.95); 0.15–0.2 for slides and screen recordings. |
| `sceneDetection` | `auto` | `accurate` (every frame), `fast` (key frames only), `auto` (accurate up to 2 minutes). |
| `minSecondsBetweenFrames` | 1 | No two frames closer than this, so you do not pay for duplicates. |
| `frameWidth` | 1280 | Scale frames down to this width (0 = original). |
| `imageFormat` | `jpeg` | `jpeg` or `png`. |
| `contactSheet` | true | One grid image of all frames (free). |
| `includeTranscript` | false | Whisper transcript aligned to the frames (charged per minute). |
| `whisperModel` | `base` | `base` or `tiny` (faster). |
| `transcriptLanguage` | auto | Language code such as `en`, `ja`, `de`. |
| `maxTranscriptMinutes` | 60 | Transcribe at most this many minutes per video. |
| `startSecs`, `endSecs` | whole video | Only take frames (and speech) from this time range. |
| `maxFileSizeMb` | 1000 | Larger files are skipped (free row). |
| `respectRobotsTxt` | true | Skip files whose site disallows automated access. |

Pages of YouTube, TikTok, Vimeo, Instagram and similar platforms are **not** supported: they are not
video files and their terms do not allow downloading. Use files you own or may download (your website,
S3, Google Cloud Storage or other storage links that download without logging in).

### Output

One row per video (the same fields on every row; failed videos have `status: "error"` and an `error` code):

```json
{
  "url": "https://example.com/media/product-demo.mp4",
  "fileName": "product-demo.mp4",
  "status": "ok",
  "durationSecs": 184.2,
  "width": 1920, "height": 1080, "fps": 30, "hasAudio": true,
  "sceneChangesFound": 31,
  "frameCount": 20,
  "frames": [
    {"index": 1, "timeSecs": 0.5, "timecode": "00:00:00.500", "reason": "start", "sceneScore": null,
     "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/video-00001-product-demo-frame-001-000000500.jpg",
     "width": 1280, "height": 720, "bytes": 81234,
     "speech": "Hi, in this demo I'll show you how to set up a new project.", "speechStartSecs": 0.4, "speechEndSecs": 6.1},
    {"index": 2, "timeSecs": 12.48, "timecode": "00:00:12.480", "reason": "scene", "sceneScore": 0.62, "...": "..."}
  ],
  "frameUrls": ["https://api.apify.com/v2/key-value-stores/.../records/video-00001-product-demo-frame-001-000000500.jpg", "..."],
  "contactSheetUrl": "https://api.apify.com/v2/key-value-stores/.../records/video-00001-product-demo-contact-sheet.jpg",
  "timelineMarkdown": "# product-demo.mp4 (00:03:04.200)\n\n## Frame 1 at 00:00:00.500 (opening frame)\n![frame 1](https://...)\nSpeech: Hi, in this demo ...",
  "transcriptStatus": "ok",
  "transcriptText": "Hi, in this demo I'll show you ...",
  "transcriptLanguage": "en",
  "transcriptSegments": [{"start": 0.4, "end": 6.1, "text": "Hi, in this demo I'll show you how to set up a new project."}],
  "billedFrames": 20,
  "billedTranscriptMinutes": 4,
  "error": null
}
```

(Values above illustrate the format.) Frame images and contact sheets are also in the run's key-value
store; `SUMMARY` holds the counts of the run.

### Pricing

- **$0.002 per frame returned** ($2 per 1,000 frames). The default 20 frames cost $0.04 per video.
- **$0.006 per started minute of transcribed speech**, only when `includeTranscript` is on.
- The contact sheet, the timeline and failed videos are free; so is the built-in sample. Plus Apify's
  small start fee. You can set a maximum cost per run in Apify: the Actor then returns fewer frames
  instead of going over it.

### Use it from AI agents (MCP)

The Actor is available to AI agents (Claude, ChatGPT, Cursor and others) through Apify's MCP server
(`mcp.apify.com`) and the API. Minimal input (one direct video file link):

```json
{"videoUrls": ["https://github.com/mediaelement/mediaelement-files/raw/master/big_buck_bunny.mp4"]}
```

The output is one row per video: read `frameUrls` (image links in time order) or `timelineMarkdown`
(frames with timecodes and, with `"includeTranscript": true`, the speech). Cost of this example: up to
20 frames × $0.002 = $0.04 plus the start fee (a short video may get fewer frames). Every row has the
same fields; videos that fail come back as free rows with `status: "error"` and an `error` code. An empty
input processes a 12-second sample video for free, so an agent can see the format first.

### How it compares

Frame and video-for-AI Actors on Apify Store with the most monthly users, and the price each one lists
for its main event on 2026-11-05 (check their pages for changes and for other prices):

| Actor | Listed price | Unit |
|---|---|---|
| **This Actor** | **$0.002** | frame (default up to 20 per video = $0.04); transcript $0.006 per minute, only when turned on |
| kantolabs/video-frame-extractor | $0.002 | frame |
| tiger19935/video-frame-extractor | $0.005 | video processed |
| frameprobe/video-scene-splitter | $0.02 | minute of video processed |
| grizzlygriff/video-llm-analyzer | $0.008 | analysis completed |
| ntriqpro/video-intelligence-analyzer | $0.05 | video/image AI analysis |

What you get here for the frame price: scene detection topped up with evenly spaced frames, a free
contact sheet, a Markdown timeline, many videos per run, failed videos free, and — the main difference —
the **speech said while each frame is on screen**, so an LLM gets pictures and words in one row. Whisper
runs on Apify: your video is not sent to a third-party AI API. This Actor returns frames and words, not a
written analysis; your own model does the reasoning. Choose an "analyzer" Actor if you want the summary
written for you.

### How it works

1. Each link is checked against the site's robots.txt (on by default) and downloaded once, with a size
   limit, using an honest User-Agent.
2. FFprobe reads the duration, size and streams. FFmpeg's scene filter scores how much each picture
   differs from the one before; the strongest changes (at least `minSecondsBetweenFrames` apart) are kept,
   and in `auto` mode the largest gaps are filled with evenly spaced frames.
3. Each frame is taken with an exact seek and saved as JPEG or PNG; Pillow builds the contact sheet.
4. With the transcript, the audio is transcribed with [faster-whisper](https://github.com/SYSTRAN/faster-whisper)
   (Whisper `base` or `tiny`, CPU), and every sentence is given to the frame that is on screen when it starts.
   Joined in order, the frames' speech is the whole transcript: nothing is lost or repeated.
5. The downloaded video is deleted.

### FAQ

**Which frames does `auto` choose?** The opening frame, the strongest scene changes and, where a shot is
long, frames in the middle of the largest gaps, up to `framesPerVideo`. A talking-head video without cuts
still gets evenly spaced frames.

**Why fewer frames than I asked for?** Short videos: frames closer than `minSecondsBetweenFrames` are not
returned. In `scenes` mode, only real scene changes are returned. You pay only for frames returned.

**Fast or accurate scene detection?** Accurate decodes every frame; fast reads only key frames, which
encoders place at most cuts but not all. `auto` uses accurate for videos up to 2 minutes.

**Can I use a Dropbox or Google Drive link?** Yes. Paste the normal share link of a file (Dropbox:
`dropbox.com/scl/fi/...` or `/s/...`; Google Drive: `drive.google.com/file/d/.../view`); it is turned into
the direct download link. The file must be shared with anyone who has the link; private files and folder
links are not read (free row `share_link_not_public`). The file name comes from the service.

**Can I give a web page instead of a file link?** Yes, a page with its own video player (a product page,
a course lesson, a blog post or a news article that embeds an MP4 or WEBM): the Actor reads the page once,
finds the file it plays (Open Graph `og:video` tags, `<video>`/`<source>` players, links to .mp4/.mov/.webm
files; at most 3 candidates, robots.txt checked for each) and processes that file. The row shows the page
in `url`, the file in `mediaUrl` and how it was found in `mediaFoundVia`. Players that load the video only
with JavaScript or as a stream (HLS) are not found; then you get a free `not_a_media_file` row. Turn it off
with `findVideoInPages: false`.

**Can I use a YouTube video?** No. Use a file you own or may download.

**Faces or objects?** No face recognition or analysis. Send the frames to the vision model of your choice.

**Is my video stored?** The downloaded file is deleted after processing. Frames stay in your run's
storage under your Apify account.

### Limitations

- CPU only. Long, high-resolution videos take a while with accurate scene detection (use `fast`).
- Files must download without logging in. Web pages work when their player links the file in the HTML;
  players that load it with JavaScript only, and streaming playlists (HLS .m3u8, DASH), are not supported yet.
- Transcript models: Whisper tiny and base; no speaker labels.

### Credits and licences

- FFmpeg (Debian package): LGPL/GPL. Pillow: MIT-CMU licence.
- OpenAI Whisper models: MIT licence. faster-whisper (SYSTRAN) and CTranslate2: MIT licence.
- The sample video is generated at build time with FFmpeg test patterns and espeak-ng.

# Actor input Schema

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

One link per line: a video file (MP4, MOV, WEBM, MKV, AVI, M4V, anything FFmpeg reads) or a web page with a video player, such as a product, course or blog page (the file it plays is found and used). Each video gives one row. Dropbox and Google Drive share links work. Pages of YouTube, TikTok, Vimeo, Instagram and similar platforms are not supported (their terms do not allow downloading). Empty = free 12-second sample.

## `findVideoInPages` (type: `boolean`):

When a link opens a web page instead of a file, look on that page for the video file it plays (Open Graph video tags, <video> players, links to .mp4/.mov/.webm files) and use that file. The row then has mediaUrl. Pages of YouTube, Vimeo and similar platforms are never used. Default: on. Turn off to get a free not_a_media_file row instead.

## `framesPerVideo` (type: `integer`):

The most frames to return per video (1-200, default 20). Each returned frame is one charged event. Short videos may get fewer frames (see Minimum seconds between frames).

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

auto (default) = the opening frame and the strongest scene changes, with evenly spaced frames filling long shots, so every part of the video is covered; scenes = only the opening frame and scene changes; interval = one frame every 'Seconds between frames'; count = 'Frames per video' evenly spaced frames.

## `intervalSecs` (type: `number`):

Used only with mode interval: one frame every this many seconds (default 10), up to 'Frames per video'.

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

How different two pictures must be to count as a scene change, from 0.05 (very sensitive) to 0.95 (only hard cuts). Default 0.3 suits most videos; use 0.15-0.2 for slides and screen recordings.

## `sceneDetection` (type: `string`):

accurate decodes every frame (best for short videos); fast looks only at the video's key frames, which encoders place at most cuts (much quicker for long videos). auto (default) = accurate up to 2 minutes of video, fast above.

## `minSecondsBetweenFrames` (type: `number`):

Frames closer than this are not both returned (default 1 second), so you do not pay for near-identical pictures. Lower it for very short clips.

## `frameWidth` (type: `integer`):

Frames wider than this are scaled down, keeping the aspect ratio (default 1280; 512-768 is enough for most AI vision models and cheaper to send). 0 = original size.

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

File format of the frames (default jpeg). The contact sheet is always JPEG.

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

Also make one JPEG grid with all frames of the video and their timecodes (free; default on). Handy to show a whole video to an AI model in a single image.

## `includeTranscript` (type: `boolean`):

Transcribe the speech with Whisper (run on Apify, no third-party AI API) and attach to each frame what is said while it is on screen. Charged per started minute of transcribed audio. Default off.

## `whisperModel` (type: `string`):

Speech model for the transcript: base (default, more accurate) or tiny (faster). Same price.

## `transcriptLanguage` (type: `string`):

Language code of the speech (en, ja, de, es, fr, ...), or empty to detect it.

## `maxTranscriptMinutes` (type: `integer`):

Only the first this many minutes of speech (from the start time) are transcribed and charged (default 60).

## `startSecs` (type: `number`):

Take frames (and the transcript) from this time on (default 0 = the beginning).

## `endSecs` (type: `number`):

Optional. Take frames only up to this time. Empty = until the end of the video.

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

Larger files are skipped (free row with an error), default 1000 MB.

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

Skip files whose site disallows automated access in robots.txt (default on). Turn off only for files you own or may download.

## Actor input object example

```json
{
  "videoUrls": [
    "https://example.com/media/product-demo.mp4"
  ],
  "findVideoInPages": true,
  "framesPerVideo": 20,
  "mode": "auto",
  "intervalSecs": 10,
  "sceneThreshold": 0.3,
  "sceneDetection": "auto",
  "minSecondsBetweenFrames": 1,
  "frameWidth": 1280,
  "imageFormat": "jpeg",
  "contactSheet": true,
  "includeTranscript": false,
  "whisperModel": "base",
  "transcriptLanguage": "",
  "maxTranscriptMinutes": 60,
  "startSecs": 0,
  "maxFileSizeMb": 1000,
  "respectRobotsTxt": true
}
```

# Actor output Schema

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

No description

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

No description

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("webstack-labs/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("webstack-labs/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 '{}' |
apify call webstack-labs/video-frame-extractor --silent --output-dataset

```

## MCP server setup

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