# Video to Viral Clips: Vertical Shorts with Animated Captions (`datasur-labs/video-to-viral-clips`) Actor

Turn any long video or podcast into vertical 9:16 Reels / TikTok / YouTube Shorts with trendy word-by-word animated captions. Auto-finds the best moments, transcribes in 99 languages with open-source Whisper, outputs MP4 + SRT. No signup, no subscription: pay per clip.

- **URL**: https://apify.com/datasur-labs/video-to-viral-clips.md
- **Developed by:** [Data Sur Labs](https://apify.com/datasur-labs) (community)
- **Categories:** Videos, Social media, AI
- **Features:** Limited permissions
- **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/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 Viral Clips: vertical Shorts with animated captions

**Turn a long video, webinar, stream or podcast into ready-to-post vertical clips for TikTok, Instagram Reels and YouTube Shorts.** It finds the best moments automatically, reframes to 9:16 and burns in **trendy word-by-word animated captions** (the "Hormozi / MrBeast" style). No signup, no monthly subscription: **pay per clip**.

### Features

- ✂️ **Auto highlight detection**: scores every 20–60 s window for hooks (questions, numbers, "secret", "mistake", "why"…), speech density, loudness and full-sentence endings. Works in English, Spanish and Portuguese, and transcribes any language.
- 🗣️ **Transcription in 99 languages** with open-source Whisper running inside the Actor. No external AI API, so your media isn't sent to third parties.
- 🔤 **5 caption styles**: `bold-pop` (white + yellow active word), `impact` (huge condensed + green), `boxed`, `neon`, `minimal`.
- 📱 **Two 9:16 layouts**: `blur-fill` (full frame over a blurred background, never cuts faces) or `crop` (fills the screen).
- 📦 **Outputs**: 1080×1920 MP4 per clip, per-clip SRT, full transcript (SRT, TXT, JSON with word timestamps).
- 🎯 **Manual mode**: pass exact `[{"start": 65, "end": 110}]` ranges to just reframe and caption.
- 💸 **Transcript-only mode** (`renderClips: false`): timestamps of the best moments + SRT, very cheap.

### Input

| Field | Default | Notes |
|---|---|---|
| `videoUrl` | required | Direct MP4/MOV/MP3/WAV link (Dropbox `?dl=1`, S3, GCS, CDN) or a page supported by yt-dlp (Vimeo, X, Twitch VODs…). YouTube blocks cloud servers, so use a direct file link. |
| `clipCount` | 3 | Clips to generate (max 10). |
| `minClipSeconds` / `maxClipSeconds` | 20 / 60 | Clip length range. |
| `captionStyle` | bold-pop | bold-pop, impact, boxed, neon, minimal |
| `layout` | blur-fill | blur-fill or crop |
| `language` | auto | e.g. en, es, pt |
| `whisperModel` | base | tiny (fastest) or base |
| `clips` | — | Manual ranges in seconds |
| `renderClips` | true | false = transcript + timestamps only |

### Output (dataset row per clip)

```json
{
  "clipNumber": 1, "start": 104.8, "end": 134.1, "durationSecs": 29.3, "highlightScore": 10.6,
  "hook": "Why most people never make money online…",
  "videoUrl": "https://api.apify.com/v2/key-value-stores/…/records/clip-1.mp4",
  "srtUrl": "https://api.apify.com/v2/key-value-stores/…/records/clip-1.srt",
  "captionStyle": "bold-pop", "layout": "blur-fill", "language": "en"
}
```

### Pricing (pay per event)

- **$0.10 per rendered clip** (1080×1920 MP4 with captions)
- **$0.01 per minute of source transcribed**
- **$0.02 per run start**
- Transcript-only mode: **$0.01 per clip found** instead of the render fee.

Example: a 30-minute podcast → 5 clips = $0.02 + $0.30 + $0.50 = **$0.82**, versus $15–30/month for clipping SaaS tools.

### Good to know

- Processing time: about 6 s per source minute to transcribe, plus about 1 s per clip second to render (4 GB memory).
- Only process media you own or have permission to use.
- Great for agencies and "clippers" running many channels, and for automations (Make, n8n, Zapier, API, MCP): call it with a URL and get the MP4 links back.

# Actor input Schema

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

Direct link to an MP4/MOV/WEBM/MP3/WAV file (Dropbox ?dl=1, S3, Google Cloud, your CDN) or a public page supported by yt-dlp (Vimeo, X/Twitter, Twitch VODs, many podcasts). YouTube blocks cloud servers: use a direct file link. Only process content you own or have rights to.

## `clipCount` (type: `integer`):

How many highlight clips to find and render (auto mode).

## `minClipSeconds` (type: `integer`):

Shortest clip.

## `maxClipSeconds` (type: `integer`):

Longest clip (Reels/TikTok/Shorts sweet spot: 20-60 s).

## `captionStyle` (type: `string`):

Animated word-by-word caption look.

## `layout` (type: `string`):

How a horizontal video becomes 9:16.

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

ISO code like en, es, pt, fr, de. Leave empty to auto-detect (99 languages).

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

Open-source Whisper model run locally; no external API.

## `clips` (type: `array`):

Skip auto-detection and cut exact ranges: \[{"start": 65, "end": 110}]. Seconds.

## `renderClips` (type: `boolean`):

Off = only transcript + clip timestamps + per-clip SRT (much cheaper).

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

Safety limit on source media length.

## Actor input object example

```json
{
  "videoUrl": "https://upload.wikimedia.org/wikipedia/commons/a/a4/Kees_Moeliker%2C_How_a_dead_duck_changed_my_life.webm",
  "clipCount": 3,
  "minClipSeconds": 20,
  "maxClipSeconds": 60,
  "captionStyle": "bold-pop",
  "layout": "blur-fill",
  "whisperModel": "base",
  "renderClips": true,
  "maxDurationMinutes": 60
}
```

# Actor output Schema

## `clips` (type: `string`):

One row per clip with MP4 and SRT links.

## `transcript` (type: `string`):

Subtitles for the whole source.

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

JSON summary of the run.

# 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://upload.wikimedia.org/wikipedia/commons/a/a4/Kees_Moeliker%2C_How_a_dead_duck_changed_my_life.webm"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datasur-labs/video-to-viral-clips").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://upload.wikimedia.org/wikipedia/commons/a/a4/Kees_Moeliker%2C_How_a_dead_duck_changed_my_life.webm" }

# Run the Actor and wait for it to finish
run = client.actor("datasur-labs/video-to-viral-clips").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 '{
  "videoUrl": "https://upload.wikimedia.org/wikipedia/commons/a/a4/Kees_Moeliker%2C_How_a_dead_duck_changed_my_life.webm"
}' |
apify call datasur-labs/video-to-viral-clips --silent --output-dataset

```

## MCP server setup

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

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/Uf8efH51Ds0XdEWFC/builds/Squb76XZCKaMvPiOU/openapi.json
