# Auto Caption & Subtitle Burner (`dami_studio/auto-caption-burner`) Actor

Add animated word-by-word captions to any video. Give a video URL, get the video back with subtitles burned in, plus SRT + word timestamps. 5 styles, full control, no login, no watermark. For TikTok, Reels, Shorts, podcasts, courses, ads, interviews — any spoken video.

- **URL**: https://apify.com/dami\_studio/auto-caption-burner.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Videos, For creators, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Auto Caption & Subtitle Burner

Give it a public video URL and it returns the same video with animated word-by-word captions burned in, plus the matching SRT file and word-level timestamps. It is built for short-form vertical content (TikTok, Reels, Shorts) but works on anything with speech: podcasts, course lessons, ads, interviews. No login, no watermark on the output.

### How it works

The actor downloads your video, pulls the audio with ffmpeg, runs it through Whisper for word-level timestamps, builds an ASS subtitle track in the preset you picked, and re-encodes the video with the captions burned in using x264. The active word is highlighted as it is spoken.

### Input

| Field | Required | Notes |
| --- | --- | --- |
| `videoUrl` | yes | Public direct URL to the source video (`.mp4` / `.mov` / `.webm`). You host it (S3, a CDN, a Drive direct link). Nothing is scraped. |
| `preset` | no | Visual style of the captions. One of `hormozi`, `beast`, `tiktok`, `clean`, `karaoke`. Defaults to `hormozi`. |
| `language` | no | ISO-639-1 code of the spoken language (`en`, `es`, `fr`, ...). Leave as `auto` to detect it. |
| `allCaps` | no | Force captions to uppercase, overriding the preset. |
| `fontSize` | no | Override the preset font size, in px at 1080 width (24-200). |
| `primaryColor` | no | Hex color of inactive words, e.g. `#FFFFFF`. |
| `highlightColor` | no | Hex color of the currently-spoken word, e.g. `#FFE000`. |
| `position` | no | Where captions sit: `top`, `center`, or `bottom`. |
| `wordsPerGroup` | no | How many words are on screen at once (1-8). |
| `crf` | no | x264 quality. Lower is better and bigger. 18 is visually lossless, 23 is smaller. Defaults to 18. |
| `openaiApiKey` | no | Your OpenAI key for Whisper. Required unless the actor owner has set a shared key. Stored as a secret. |

Every preset sets a sane font, size, outline, and highlight color. The style override fields only change the parts you specify and leave the rest of the preset alone.

### Output

Each run pushes one dataset record with the source dimensions, duration, word count, and the full transcript text. The rendered files land in the run's key-value store: the captioned MP4, an SRT file, and a JSON file of per-word timestamps (`word`, `start`, `end`). The dataset record's `output` object holds the keys and public URLs for the MP4 and SRT.

### Example

```json
{
  "videoUrl": "https://example.com/my-short.mp4",
  "preset": "hormozi",
  "language": "auto",
  "allCaps": true,
  "highlightColor": "#FFE000"
}
````

### Pricing

$0.08 per minute of video, pay per result, no subscription.

### Notes

Transcription runs on Whisper, so you need an OpenAI key in `openaiApiKey` unless the owner has configured a shared one. Word timing is only as good as the audio: clean speech maps cleanly, heavy background noise or music can drift the highlights. The source has to be reachable at a direct URL, since the actor downloads the file rather than scraping a page.

# Actor input Schema

## `videoUrl` (type: `string`):

Public direct URL to the source video (.mp4 / .mov / .webm). You host it (S3/CDN/Drive direct link) — no scraping is performed.

## `preset` (type: `string`):

Visual style of the burned captions.

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

ISO-639-1 code of the spoken language (e.g. en, es, fr). Leave 'auto' to auto-detect.

## `allCaps` (type: `boolean`):

Force captions to uppercase (overrides the preset).

## `fontSize` (type: `integer`):

Override the preset font size.

## `primaryColor` (type: `string`):

Hex color of inactive words, e.g. #FFFFFF.

## `highlightColor` (type: `string`):

Hex color of the currently-spoken word, e.g. #FFE000.

## `position` (type: `string`):

Where captions sit on the frame.

## `wordsPerGroup` (type: `integer`):

How many words show on screen at once.

## `marginV` (type: `integer`):

Distance from the chosen edge, at 1920px height.

## `crf` (type: `integer`):

x264 CRF. Lower = higher quality/larger file. 18 = visually lossless, 23 = smaller.

## `openaiApiKey` (type: `string`):

Your OpenAI key for Whisper transcription. Kept private. Leave empty only if the actor owner has configured a shared key.

## `transcriptionBaseUrl` (type: `string`):

OpenAI-compatible base URL for transcription. Default https://api.openai.com/v1. Use to point at a proxy.

## `transcriptionModel` (type: `string`):

Whisper model name. Default whisper-1.

## Actor input object example

```json
{
  "videoUrl": "https://example.com/my-short.mp4",
  "preset": "hormozi",
  "language": "auto",
  "crf": 18,
  "transcriptionModel": "whisper-1"
}
```

# Actor output Schema

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

Result rows / metadata are stored in the default dataset (one row per item).

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

Generated media/files (video, audio, images, captions) are stored in the default key-value store.

# 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 = {
    "videoUrl": "https://example.com/my-short.mp4"
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/auto-caption-burner").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 = { "videoUrl": "https://example.com/my-short.mp4" }

# Run the Actor and wait for it to finish
run = client.actor("dami_studio/auto-caption-burner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrl": "https://example.com/my-short.mp4"
}' |
apify call dami_studio/auto-caption-burner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dami_studio/auto-caption-burner",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Auto Caption & Subtitle Burner",
        "description": "Add animated word-by-word captions to any video. Give a video URL, get the video back with subtitles burned in, plus SRT + word timestamps. 5 styles, full control, no login, no watermark. For TikTok, Reels, Shorts, podcasts, courses, ads, interviews — any spoken video.",
        "version": "0.1",
        "x-build-id": "SIPFg6DuzbXBkzS2m"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dami_studio~auto-caption-burner/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dami_studio-auto-caption-burner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dami_studio~auto-caption-burner/runs": {
            "post": {
                "operationId": "runs-sync-dami_studio-auto-caption-burner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dami_studio~auto-caption-burner/run-sync": {
            "post": {
                "operationId": "run-sync-dami_studio-auto-caption-burner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "videoUrl": {
                        "title": "Video URL",
                        "type": "string",
                        "description": "Public direct URL to the source video (.mp4 / .mov / .webm). You host it (S3/CDN/Drive direct link) — no scraping is performed."
                    },
                    "preset": {
                        "title": "Caption style preset",
                        "enum": [
                            "hormozi",
                            "beast",
                            "tiktok",
                            "clean",
                            "karaoke"
                        ],
                        "type": "string",
                        "description": "Visual style of the burned captions.",
                        "default": "hormozi"
                    },
                    "language": {
                        "title": "Spoken language",
                        "type": "string",
                        "description": "ISO-639-1 code of the spoken language (e.g. en, es, fr). Leave 'auto' to auto-detect.",
                        "default": "auto"
                    },
                    "allCaps": {
                        "title": "ALL CAPS",
                        "type": "boolean",
                        "description": "Force captions to uppercase (overrides the preset)."
                    },
                    "fontSize": {
                        "title": "Font size (px @1080 width)",
                        "minimum": 24,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Override the preset font size."
                    },
                    "primaryColor": {
                        "title": "Text color",
                        "type": "string",
                        "description": "Hex color of inactive words, e.g. #FFFFFF."
                    },
                    "highlightColor": {
                        "title": "Active-word color",
                        "type": "string",
                        "description": "Hex color of the currently-spoken word, e.g. #FFE000."
                    },
                    "position": {
                        "title": "Vertical position",
                        "enum": [
                            "top",
                            "center",
                            "bottom"
                        ],
                        "type": "string",
                        "description": "Where captions sit on the frame."
                    },
                    "wordsPerGroup": {
                        "title": "Words per line",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "How many words show on screen at once."
                    },
                    "marginV": {
                        "title": "Vertical margin (px)",
                        "minimum": 0,
                        "maximum": 1800,
                        "type": "integer",
                        "description": "Distance from the chosen edge, at 1920px height."
                    },
                    "crf": {
                        "title": "Output quality (CRF)",
                        "minimum": 12,
                        "maximum": 30,
                        "type": "integer",
                        "description": "x264 CRF. Lower = higher quality/larger file. 18 = visually lossless, 23 = smaller.",
                        "default": 18
                    },
                    "openaiApiKey": {
                        "title": "OpenAI API key (BYO)",
                        "type": "string",
                        "description": "Your OpenAI key for Whisper transcription. Kept private. Leave empty only if the actor owner has configured a shared key."
                    },
                    "transcriptionBaseUrl": {
                        "title": "Transcription base URL (advanced)",
                        "type": "string",
                        "description": "OpenAI-compatible base URL for transcription. Default https://api.openai.com/v1. Use to point at a proxy."
                    },
                    "transcriptionModel": {
                        "title": "Transcription model (advanced)",
                        "type": "string",
                        "description": "Whisper model name. Default whisper-1.",
                        "default": "whisper-1"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
