# Extract Video Frames for AI Vision Models

**Use case:** 

Turn a direct video link (MP4, MOV, WebM) into 4 evenly spaced JPG frames, resized to 512 px and returned in each row as a base64 data URI, ready to send to the vision model you already use. The Actor only extracts frames; image analysis is done by your own model and billed by that service. $0.003 per video + $0.001 per frame, plus Apify's start fee ($0.00005 per run at 1 GB).

## Input

```json
{
  "videoUrls": [
    {
      "url": "https://asunoki.jp/downloads/video-frame-extractor/sample-10s-640x360.mp4"
    }
  ],
  "mode": "count",
  "frameCount": 4,
  "intervalSeconds": 5,
  "maxFramesPerVideo": 50,
  "imageFormat": "jpg",
  "maxWidth": 512,
  "quality": 80,
  "skipBlankFrames": true,
  "inlineDataUri": true,
  "maxDurationMinutes": 180,
  "maxDownloadMbPerVideo": 200,
  "maxSecondsPerVideo": 300
}
```

## Output

```json
{
  "imageUrl": {
    "label": "Frame",
    "format": "image"
  },
  "videoUrl": {
    "label": "Video",
    "format": "link"
  },
  "frameIndex": {
    "label": "#",
    "format": "number"
  },
  "timecode": {
    "label": "Timecode"
  },
  "time": {
    "label": "Seconds",
    "format": "number"
  },
  "width": {
    "label": "Width",
    "format": "number"
  },
  "height": {
    "label": "Height",
    "format": "number"
  },
  "bytes": {
    "label": "Bytes",
    "format": "number"
  },
  "type": {
    "label": "Row type"
  },
  "code": {
    "label": "Error / note code"
  },
  "reason": {
    "label": "Details"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Video Frame Extractor (direct links) for AI Vision Actor is ready to run with the inputs already set for "Extract Video Frames for AI Vision Models". [Sign up or log in](https://console.apify.com/create-task-from-example/m81eRjX0TTKf5QLL0) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Extract Video Frames for AI Vision Models" task

The Video Frame Extractor (direct links) for AI Vision Actor will start running based on the input automatically. You can also change all the input fields, like video links, which frames, and more, to match your specific use case.

### 3. Receive the "Extract Video Frames for AI Vision Models" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as frame, video, #, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Extract Video Frames for AI Vision Models" task via API](https://apify.com/asunoki/video-frame-extractor.md).

## FAQ

### Does this task analyse the images?

No. It returns the frames. Send imageUrl or dataUri to your own vision model; that service is billed separately by its provider.

### Can I use a YouTube or TikTok link?

No. Video platform pages are refused and no video or frame event is charged for them. Use a direct link to a video file you are allowed to process.

### Why 512 px?

Smaller frames keep dataset rows and vision requests small. Raise maxWidth if your model needs more detail.

### What does the example cost?

1 video and 4 frames: $0.007 in video and frame events, plus Apify's start fee ($0.00005 at 1 GB). Failed links and skipped blank frames add no event charges.

## About this Actor

This example demonstrates how to use [Video Frame Extractor (direct links) for AI Vision](https://apify.com/asunoki/video-frame-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/asunoki/video-frame-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/asunoki/video-frame-extractor.md

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`).
