# Video Breakdown AI – Hook Score, Shot List & Summary (`gazidev/ai-video-analyzer`) Actor

Analyze your own video files with a vision AI: hook of the first 3 seconds with a score, timestamped shot list, on-screen text, products and brands seen, summary, captions and hashtags as JSON. MP4/MOV/WebM links or uploads. No API key. Failed files free.

- **URL**: https://apify.com/gazidev/ai-video-analyzer.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 video analyzeds

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

## AI Video Analyzer – Hooks, Shot List & Summary from Your Files

Upload a video (or paste a direct file link) and get a **vision-AI breakdown as clean JSON**: the **hook of the first 3 seconds** with a 1–10 score and an improvement tip, a **shot list with exact timestamps** and a keyframe per shot, **on-screen text**, **products and brands seen**, a **summary**, **ready-to-post captions** and **hashtags**.

Built for marketers, UGC creators, agencies and ad teams who want to tear down their own reels, ads, product demos and drafts at scale. No API key needed: the model runs through Apify's OpenRouter Actor and is billed to your Apify account. You pay **$0.02 per video** (first minute included) plus **$0.008 per extra minute**. Failed files are free.

### How it works

1. **Shot detection** (ffmpeg scene cuts): exact start/end of every shot, long shots split so nothing is missed.
2. **Keyframes**: one frame per shot plus 3 extra frames from the first 3 seconds (the hook).
3. **Transcript**: Whisper (on CPU, 99 languages) so the AI knows what is said, including the spoken hook.
4. **Vision AI** (default Gemini 2.5 Flash-Lite, or GPT, Claude, any OpenRouter vision model): one call per video returns the analysis. Timestamps always come from step 1, never from the model.

### What you get for each video

| Field | Description |
|---|---|
| `hook` | `description`, `spokenText`, `onScreenText`, `hookType` (question, bold-claim, problem, demo, before-after, product-reveal…), `strengthScore` 1–10, `why`, `improvementTip` |
| `shots[]` | `index`, `start`, `end`, timecodes, `keyframeUrl`, `transcript` of that shot, AI `description`, `shotType` (close-up, talking head, screen recording, product shot…), `onScreenText`, `purpose` |
| `onScreenText[]` | every caption/overlay/title the model can read, with timecode |
| `productsAndBrands[]` | `name`, `kind` (product, brand, logo, app, service, place), `firstSeen`, `evidence` (visual, on-screen-text, spoken), `context` |
| `summary`, `format`, `tone`, `targetAudience`, `callToAction`, `topics[]` | creative strategy at a glance |
| `suggestedCaptions[]`, `hashtags[]` | ready to post (count and language configurable) |
| `transcriptText`, `gridImageUrl` | full transcript and one contact-sheet image of all shots |
| `llmUsage`, `model` | tokens and OpenRouter cost of the analysis |

### Use cases

- **Ad and UGC creative teardowns**: score hooks across 50 variants, see which shot types and CTAs you use.
- **Social media workflow**: captions and hashtags for each new edit, in the language of the video.
- **Brand and sponsorship checks**: list every product, logo and brand mention in your own footage.
- **Shot lists and edit notes**: timestamped shot list for editors, translators or accessibility notes.
- **Content libraries**: searchable summaries and topics for your own video archive.

### Input

```json
{
  "videoUrls": ["https://cdn.example.com/ads/summer-reel-v3.mp4"],
  "model": "google/gemini-2.5-flash-lite",
  "outputLanguage": "",
  "instructions": "Captions for TikTok, playful tone",
  "captionCount": 3,
  "hashtagCount": 12,
  "maxFramesForAI": 16,
  "transcribe": true,
  "maxDurationMinutes": 10
}
```

Sources: direct file links (MP4, MOV, WebM, MKV, AVI, M4V…), Dropbox / Google Drive / OneDrive file links, **file uploads** in the input form, an Apify dataset (field with the URL) or an Apify key-value store with video files.

**Only your own files.** YouTube, TikTok, Instagram, Facebook, X, Vimeo, Twitch and other platform links are **rejected** (free error row): their terms of service do not allow downloading. Export the file from your editor or your own account and upload it instead.

### Output example

```json
{
  "fileName": "Abbott_and_Costello_Go_to_Mars_Official_Trailer_(1953).webm",
  "durationSec": 51.9,
  "hookStrength": 8,
  "hook": {
    "description": "Black screen, then the text \"U.S.A. TO CLAIM WHOLE PLANET\", a meeting room, a rocket launch, two men in spacesuits.",
    "spokenText": "Today, the United States plan to claim a whole planet ...",
    "onScreenText": "U.S.A. TO CLAIM WHOLE PLANET",
    "hookType": "bold-claim",
    "strengthScore": 8,
    "improvementTip": "Consider adding a more dynamic visual element or a question in the first second."
  },
  "shots": [
    {"index": 2, "start": 3.605, "end": 5.426, "startTimecode": "00:00:03.605",
     "keyframeUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/001-...-shot-002.jpg",
     "transcript": "Today, the United States plan to claim a whole planet",
     "description": "Medium shot of a man in a suit addressing men seated around a table.", "shotType": "medium shot", "purpose": "context"}
  ],
  "onScreenText": [{"timecode": "00:01", "text": "U.S.A. TO CLAIM WHOLE PLANET"}, {"timecode": "00:14", "text": "Bud ABBOTT Lou COSTELLO Go To Mars"}],
  "productsAndBrands": [],
  "summary": "This trailer for \"Abbott and Costello Go to Mars\" promises a comedic sci-fi adventure ...",
  "suggestedCaptions": ["..."],
  "hashtags": ["#AbbottAndCostello", "#ClassicComedy", "#SciFiComedy", "#1950sMovies"],
  "llmUsage": {"promptTokens": 6966, "completionTokens": 1914, "costUsd": 0.0014622, "calls": 1}
}
```

See `SAMPLE_OUTPUT.json` in the source for a full real row. Error rows (`type: "error"`, `errorCode`, `error`) are never charged.

### Pricing

| Event | Price | When |
|---|---|---|
| Video analyzed | **$0.02** | each video with a valid AI analysis (includes the first minute) |
| Extra video minute | **$0.008** | each further started minute analyzed (after the first) |

Examples: a 30-second reel = **$0.02**; a 3-minute demo = $0.02 + 2 × $0.008 = **$0.036**.
**AI tokens** are billed separately by Apify's [OpenRouter Actor](https://apify.com/apify/openrouter) at OpenRouter prices (10x on the Apify free plan). With the default Gemini 2.5 Flash-Lite a 1-minute video with 19 frames used ~7k prompt + ~2k output tokens: **$0.0015** at OpenRouter prices (about $0.015 on the free plan). Each row shows `llmUsage.costUsd`.

Free: rejected links, failed downloads, audio-only files, AI errors and invalid AI answers, runs stopped by your maximum cost. The Actor respects **Maximum cost per run**: long videos are cut to what fits (`truncatedReason: "maxTotalCharge"`) and the run stops gracefully.

| Actor (Apify Store, Oct 2026) | Price model |
|---|---|
| **This Actor** | $0.02 / video (+$0.008 / extra minute) + tokens |
| tubetext/video-breakdown-ai | $0.03 / video (platform links) |
| frameprobe/reel-teardown | $0.04 / video |
| ntriqpro/video-intelligence-analyzer | $0.05 / analysis |

### Use with AI agents / Apify MCP

Add the Actor through the [Apify MCP server](https://mcp.apify.com) (`gazidev/ai-video-analyzer`) or call it from the Apify API, n8n, Make or Zapier. Give the agent `videoUrls`; it gets one structured JSON per video (hook, shots, brands, captions) instead of raw frames.

### FAQ

**Do I need an OpenAI / Gemini key?** No. The model is called through Apify's OpenRouter Actor with your run's own token; Apify bills the tokens to your account.

**Can I analyze YouTube or TikTok videos?** No. Platform links are refused because their terms forbid downloading. Use files you own (upload, S3, CDN, Drive, Dropbox).

**Does it recognize people?** No. The model is told not to identify people from faces or voices; a name appears only if it is shown on screen or spoken.

**Which model is best?** Gemini 2.5 Flash-Lite (default) is cheapest and fast. Gemini 2.5 Flash or GPT-5 mini read small on-screen text better.

**Long videos?** Up to 120 minutes (`maxDurationMinutes`); the AI sees up to 40 shot keyframes, so it works best on ads, reels, demos and clips under ~10 minutes.

**Languages?** Whisper detects 99 spoken languages; captions are written in the video's language unless you set `outputLanguage`.

# Actor input Schema

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

Direct links to video files you have the right to analyze: MP4, MOV, WebM, MKV, AVI, M4V and more (your CDN, S3/R2/GCS bucket, Dropbox or Google Drive file shared as 'Anyone with the link', OneDrive). **YouTube, TikTok, Instagram, Facebook, X, Vimeo, Twitch and other platform page links are rejected** (free error row): their terms of service forbid downloading. Export the file from your editor or your own account and upload it below instead.

## `uploadedVideos` (type: `array`):

Upload video files from your computer (your own ads, reels, UGC, drafts). They are analyzed after the URLs above.

## `datasetId` (type: `string`):

Optional. Chain after another Actor: every value of the field below (string or array of strings) is processed like a video URL.

## `datasetField` (type: `string`):

Name of the dataset field that holds the video file URL, e.g. `url`, `videoUrl` or `fileUrl`.

## `keyValueStoreId` (type: `string`):

Optional. Every record in this store is analyzed as a video file (e.g. files you uploaded with the Apify API). JSON/text records become free error rows.

## `keyValueStorePrefix` (type: `string`):

Optional key prefix filter for the key-value store (e.g. `video-`).

## `maxVideos` (type: `integer`):

Stop after this many inputs (0 = no limit). Useful when reading a large dataset or store.

## `model` (type: `string`):

Called through Apify's OpenRouter Actor; token cost is billed to your Apify account at OpenRouter prices (10x on the Apify free plan). Default: about $0.001-0.003 per short video on paid plans. See README.

## `customModel` (type: `string`):

Optional: any vision-capable model ID from openrouter.ai/models, e.g. `qwen/qwen2.5-vl-72b-instruct`. Overrides the select above.

## `outputLanguage` (type: `string`):

Language for the summary, captions and hashtags, e.g. `English`, `Spanish`, `Turkish`. Empty = the language spoken in the video.

## `instructions` (type: `string`):

Optional, e.g. `Captions for TikTok, playful tone, mention free shipping` or `Our brand is Acme; flag competitor logos`.

## `captionCount` (type: `integer`):

How many ready-to-post captions to write.

## `hashtagCount` (type: `integer`):

How many hashtags to suggest (0 = none).

## `maxFramesForAI` (type: `integer`):

Up to this many shot keyframes (evenly spread) plus 3 hook frames from the first 3 seconds are sent to the model. More frames = finer shot descriptions and more image tokens.

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

ffmpeg scene-change score (0.05–0.95) above which a new shot starts. Lower = more shots (0.2 for subtle cuts), higher = only hard cuts.

## `minShotSeconds` (type: `number`):

Cuts closer than this to the previous one are merged (fast montages, flashes).

## `maxShotSeconds` (type: `number`):

Longer shots (talking heads, screen recordings) are split so the AI sees a frame at least this often. 0 = never split.

## `maxShots` (type: `integer`):

Upper limit on shots in the shot list (default 24 keeps the AI answer within the 2,048-token output limit of Apify's OpenRouter Actor). If more cuts are found, evenly spread ones are kept.

## `keyframeGrid` (type: `boolean`):

Save one contact-sheet JPEG of all shot keyframes with shot number and timecode (`gridImageUrl`). Free.

## `transcribe` (type: `boolean`):

Transcribe speech with Whisper (on-CPU, included in the price) so the AI knows what is said, including the spoken hook. Turn off for silent or music-only videos.

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

`base`: good accuracy for clear speech in 99 languages. `tiny`: about 2× faster, fine for clean English. Same price.

## `language` (type: `string`):

`auto` detects the language from the first 30 seconds of speech. Or force a Whisper code (`en`, `es`, `de`, `fr`, `pt`, `it`, `nl`, `tr`, `ru`, `ja`, `zh`, `ar`, `hi`…) for short or noisy clips.

## `vocabularyHint` (type: `string`):

Optional names and jargon that help Whisper spell them right, e.g. `Apify, Kubernetes, Dr. Nguyen`.

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

Only the first N minutes of each video are analyzed (`truncated: true`). The base price covers the first minute; each further started minute is one `extra-video-minute` event.

## `maxFileSizeMB` (type: `integer`):

Larger downloads are stopped (free error row).

## `downloadTimeoutSecs` (type: `integer`):

Maximum time to download one file. Retried on network errors and HTTP 429/5xx.

## Actor input object example

```json
{
  "videoUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/2/2c/Abbott_and_Costello_Go_to_Mars_Official_Trailer_%281953%29.webm"
  ],
  "datasetField": "url",
  "maxVideos": 0,
  "model": "google/gemini-2.5-flash-lite",
  "outputLanguage": "",
  "captionCount": 3,
  "hashtagCount": 12,
  "maxFramesForAI": 16,
  "sceneThreshold": 0.3,
  "minShotSeconds": 1,
  "maxShotSeconds": 20,
  "maxShots": 24,
  "keyframeGrid": true,
  "transcribe": true,
  "whisperModel": "base",
  "language": "auto",
  "maxDurationMinutes": 10,
  "maxFileSizeMB": 1000,
  "downloadTimeoutSecs": 600
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `shots` (type: `string`):

No description

## `errors` (type: `string`):

No description

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

No description

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

No description

## `results` (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 = {
    "videoUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/2/2c/Abbott_and_Costello_Go_to_Mars_Official_Trailer_%281953%29.webm"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/ai-video-analyzer").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://upload.wikimedia.org/wikipedia/commons/2/2c/Abbott_and_Costello_Go_to_Mars_Official_Trailer_%281953%29.webm"] }

# Run the Actor and wait for it to finish
run = client.actor("gazidev/ai-video-analyzer").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://upload.wikimedia.org/wikipedia/commons/2/2c/Abbott_and_Costello_Go_to_Mars_Official_Trailer_%281953%29.webm"
  ]
}' |
apify call gazidev/ai-video-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gazidev/ai-video-analyzer"
        }
    }
}
```

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/54QL5lJ5phHN5ZRXz/builds/k9eJc7Psulery1fvF/openapi.json
