# Video to SRT – Subtitle Files from Video & Audio (Whisper) (`gazidev/video-to-srt`) Actor

Turn video and audio files into SRT and VTT subtitle files with Whisper, in 99 languages, with optional English translation. Direct file links, Dropbox and Google Drive. Returns subtitle file links and timed segments. No API key. $0.009 per minute plus $0.003 per file.

- **URL**: https://apify.com/gazidev/video-to-srt.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 $9.00 / 1,000 minute subtitleds

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 to SRT – Subtitle Files from Video & Audio (Whisper)

**Turn a video or audio file into ready-to-upload SRT and WebVTT subtitle files.** Paste direct links to your files, or Dropbox and Google Drive share links. You get a download link for each subtitle file, the detected language and the timed segments.

Whisper runs inside the Actor (faster-whisper on CPU), so you need **no OpenAI API key, no account elsewhere and no subscription**. You pay **$0.009 per started minute plus $0.003 per file**, and failed files are free.

### What it does

- **Makes subtitle files, not burned-in captions.** Upload the `.srt` to YouTube Studio, Premiere, DaVinci Resolve or CapCut, and use the `.vtt` for HTML5 players and course platforms.
- **Lets you set the subtitle layout.** Choose the characters per line (default 42) and lines per cue (default 2). Long speech is split into more cues, at punctuation where possible.
- **Handles 99 languages.** The language is detected automatically, or you can force one.
- **Can translate to English.** Set `task` to `translate` for English subtitles from any spoken language, at the same price.
- **Takes many formats:** mp4, mov, mkv, webm, avi, mp3, m4a, wav, ogg, flac and anything else ffmpeg can read.
- **Reports failures clearly.** Downloads are retried, and a bad link, private file or silent video becomes a free error row. One bad file does not stop the run.
- **Respects your budget.** It never subtitles more minutes than your *Maximum cost per run* allows.

### What it does not do

- **YouTube, TikTok, Instagram, Spotify, Facebook, X, Vimeo and SoundCloud links are rejected** with a clear error, because their terms of service do not allow downloading. Use a direct link to a file you have the rights to.
- **It does not label speakers or burn captions into the video.** See [Related Actors](#related-actors).
- **It is not perfect.** It uses Whisper's `tiny` and `base` models, which suit clear speech. Names and rare words can be misheard: in the sample below, "LibriVox" comes out as "Librebox". Noise, music and heavy accents lower the quality, so review subtitles before publishing them.
- **Timing is at segment level.** Whisper's segment times are used as they are. When a long segment is split into several cues, the split points are estimated from the text length, so those cues may be slightly off.

### Who it is for

- **Video editors and course makers** who need a subtitle file to load into their editor or platform.
- **n8n, Make and API workflows** that need subtitle files from a file link.
- **Accessibility work:** captions for your own recordings.

### Input

```json
{
  "urls": [
    "https://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3",
    "https://www.dropbox.com/scl/fi/abc123/lesson-01.mp4?rlkey=xyz&dl=0"
  ],
  "model": "base",
  "language": "auto",
  "task": "transcribe",
  "formats": ["srt", "vtt"],
  "maxCharsPerLine": 42,
  "maxLinesPerCue": 2,
  "maxDurationMinutes": 60,
  "maxFileMb": 500
}
```

| Field | Default | Notes |
|---|---|---|
| `urls` | 1:49 sample | Direct file links. Dropbox, Google Drive and OneDrive share links are converted to direct downloads. With no `urls` at all, the sample is used |
| `model` | `base` | `base` or `tiny` (faster, for clean English). Same price |
| `language` | `auto` | Or a Whisper code such as `en`, `de`, `es`, `fr`, `tr` |
| `task` | `transcribe` | `translate` gives English subtitles |
| `formats` | `srt`, `vtt` | Which files to save |
| `maxCharsPerLine` / `maxLinesPerCue` | 42 / 2 | Subtitle layout |
| `maxDurationMinutes` | 60 | Longer files are cut at this length, and only the minutes subtitled are billed |
| `maxFileMb` | 500 | Larger downloads are stopped (free). One hour of 1080p video is often 500 MB or more |

The sample is a public-domain LibriVox reading of Wordsworth's "Daffodils", from the Internet Archive.

### Output

One dataset row per file, and one `.srt` and `.vtt` file per file in the key-value store.

```json
{
  "sourceUrl": "https://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3",
  "fileName": "daffodils_wordsworth_64kb.mp3",
  "status": "ok",
  "durationSeconds": 108.93,
  "subtitledSeconds": 108.93,
  "truncated": false,
  "truncatedReason": null,
  "language": "en",
  "languageProbability": 0.993,
  "task": "transcribe",
  "model": "base",
  "srtUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/001-daffodils-wordsworth-64kb.srt",
  "vttUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/001-daffodils-wordsworth-64kb.vtt",
  "srtText": "1\n00:00:00,720 --> 00:00:04,720\nThis is a Librebox recording.\n\n2\n00:00:04,720 --> 00:00:08,720\nAll Librebox recordings\nare in the public domain.\n\n…",
  "srtTextTruncated": false,
  "cueCount": 32,
  "segments": [
    {
      "start": 0.72,
      "end": 4.72,
      "text": "This is a Librebox recording."
    },
    {
      "start": 4.72,
      "end": 8.72,
      "text": "All Librebox recordings are in the public domain."
    }
  ],
  "billedMinutes": 2,
  "fileSizeBytes": 872198,
  "hasVideo": false,
  "processingSeconds": 14.7,
  "cpuSecondsPerAudioMinute": 7.3,
  "note": null,
  "error": null,
  "processedAt": "2026-11-06T14:06:06Z"
}
```

- `srtUrl` and `vttUrl` link to the full files. `srtText` holds the first 50 KB of the SRT, and `srtTextTruncated` says whether it was cut.
- `segments` are Whisper's original segments. `cueCount` counts the subtitle cues after the layout rules.
- `truncated: true` with `truncatedReason` (`maxDurationMinutes` or `maxTotalCharge`) means only the first `subtitledSeconds` were subtitled and billed.
- Failed files have `status: "error"` and an `error` message. They are free.
- The `OUTPUT` record in the key-value store holds the run summary.

### Pricing

| Event | Price | When |
|---|---|---|
| `minute-subtitled` | **$0.009** | Each started minute subtitled (60.4 s counts as 1 minute) |
| `file-processed` | $0.003 | Each file subtitled successfully |
| `data-100mb` | $0.025 | Each started 100 MB of a file after its first 100 MB |
| Actor start | $0.00005 | Each run |

**Examples:** a 5-minute audio file or a 5-minute video under 100 MB costs $0.048. A 60-minute 1080p video of 480 MB costs $0.54 + $0.003 + 4 × $0.025 = $0.643.

**Free:** rejected links, download errors, web pages instead of media, files over the size limit, files without an audio track, files with no speech detected, and minutes cut off by `maxDurationMinutes`.

### Memory and speed

The default of 2 GB handles files of any length, because long files are processed in 10-minute pieces, each ending in the quietest moment near the cut. A 62-minute file peaked at 1.5 GB in a local test. Long files have not been run at 2 GB on Apify yet, so if a run ever fails for lack of memory, use 4 GB.

Processing took about a sixth of the file's length in the one cloud test so far (a 1:49 clip took 17.5 s at 2 GB). Treat that as a rough guide: it varies with the host and the speech. Apify gives 1 vCPU per 4 GB, so 4 GB can be faster. Your price does not change with memory.

### Related Actors

- [Audio & Video Transcription](https://apify.com/gazidev/media-transcriber): full transcripts, podcast RSS feeds, speaker labels and a more accurate `small` model.
- [Add Subtitles to Video](https://apify.com/gazidev/video-auto-subtitles): burns captions into the MP4.

### FAQ

**Can I use YouTube links?** No. Their terms of service do not allow downloading. Download your own video from your own account, put it on Dropbox, Google Drive or S3, and use that link.

**Why was my Google Drive link rejected?** The file must be shared as "Anyone with the link". Very large Drive files can still return a confirmation page, which is reported as a free error. In that case, use another host.

**Is my file stored?** It is deleted from the run's disk once it is processed. Subtitle files stay in the run's key-value store under your account, for as long as your Apify retention lasts.

**Do I need rights to the media?** Yes. Only submit media you own or may subtitle.

Whisper model weights: OpenAI Whisper (MIT), run through faster-whisper (MIT) and CTranslate2. This Actor is not affiliated with OpenAI.

# Actor input Schema

## `urls` (type: `array`):

Direct links to video or audio files: mp4, mov, mkv, webm, avi, mp3, m4a, wav, ogg, flac and more. S3 and CDN links work, and Dropbox, Google Drive (shared as 'Anyone with the link') and OneDrive share links are converted to direct downloads. **YouTube, TikTok, Instagram, Spotify, Facebook, X, Vimeo and SoundCloud page links are rejected**: their terms of service do not allow downloading. Only submit media you have the right to subtitle.

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

`base` (default): good for clear speech. `tiny`: about twice as fast at the same price, for clean single-speaker English.

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

`auto` detects the spoken language from the first 30 seconds. Or force a Whisper code to avoid mistakes on short or noisy clips: `en`, `es`, `de`, `fr`, `pt`, `it`, `nl`, `pl`, `tr`, `ru`, `uk`, `ar`, `hi`, `ja`, `ko`, `zh`...

## `task` (type: `string`):

`transcribe`: subtitles in the spoken language. `translate`: Whisper translates the speech into English subtitles, at the same price.

## `formats` (type: `array`):

Which subtitle files to save. Each one gets a download link in the results.

## `maxCharsPerLine` (type: `integer`):

42 is the common subtitle convention. Use a lower number, such as 28, for vertical video.

## `maxLinesPerCue` (type: `integer`):

Longer speech is split into more cues. The times of those split points are estimated from the text length.

## `maxDurationMinutes` (type: `integer`):

Longer files are cut at this length, and you pay only for the minutes subtitled.

## `maxFileMb` (type: `integer`):

Larger downloads are stopped and reported as a free error row. Downloads after the first 100 MB of a file carry the `data-100mb` fee.

## Actor input object example

```json
{
  "urls": [
    "https://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"
  ],
  "model": "base",
  "language": "auto",
  "task": "transcribe",
  "formats": [
    "srt",
    "vtt"
  ],
  "maxCharsPerLine": 42,
  "maxLinesPerCue": 2,
  "maxDurationMinutes": 60,
  "maxFileMb": 500
}
```

# Actor output Schema

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

No description

## `full` (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 = {
    "urls": [
        "https://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"
    ],
    "language": "auto"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/video-to-srt").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 = {
    "urls": ["https://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"],
    "language": "auto",
}

# Run the Actor and wait for it to finish
run = client.actor("gazidev/video-to-srt").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 '{
  "urls": [
    "https://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"
  ],
  "language": "auto"
}' |
apify call gazidev/video-to-srt --silent --output-dataset

```

## MCP server setup

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

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/1o2y8lE1bWnCtNZAe/builds/DI1zAbKwmLYuxGNiU/openapi.json
