# Smart Social Media Video Thumbnail Generator (`badruddeen/smart-social-media-video-thumbnail-generator`) Actor

Intelligent multi-platform video thumbnail generator using FFmpeg. Automatically extracts high-quality frames with balanced interval sampling and intro-skipping, optimizes size and compression, and works with TikTok, X (Twitter), Instagram, Facebook, Vimeo, and LinkedIn.

- **URL**: https://apify.com/badruddeen/smart-social-media-video-thumbnail-generator.md
- **Developed by:** [Badruddeen Naseem](https://apify.com/badruddeen) (community)
- **Categories:** Videos, Social media, Automation
- **Features:** Limited permissions
- **Stats:** 45 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $70.00 / 1,000 processed videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Smart Video Thumbnail Optimizer

### What does Smart Video Thumbnail Optimizer do?

Smart Video Thumbnail Optimizer is an intelligent multi-platform video thumbnail generator that automatically extracts high-quality frames from online videos.

This Apify Actor:

- Accepts video URLs from supported platforms
- Resolves platform-specific video sources when needed
- Downloads the video
- Extracts evenly spaced thumbnails using FFmpeg
- Outputs optimized WebP thumbnails with public URLs
- Stores structured metadata for each generated frame

It is built for content creators, social media marketers, automation workflows, and anyone who needs high-quality thumbnails without manual frame selection.

***

### Supported Platforms

Smart Video Thumbnail Optimizer currently supports:

- TikTok
- Vimeo
- Facebook
- Instagram
- X (formerly Twitter)
- LinkedIn

You can provide public video post URLs from these platforms — the actor automatically handles resolution and downloading internally.

***

## How It Works

- Platform detection (TikTok, Vimeo, Facebook, Instagram, X, LinkedIn)

- Video resolution (if required)

- Secure download of the video file

- Duration detection via FFprobe

- Even interval timestamp calculation

- Frame extraction via FFmpeg

- WebP conversion and resizing

- Metadata storage in Dataset

- Optional thumbnail storage in Key-Value Store

The actor automatically adjusts timestamps to avoid extracting frames beyond video duration.

***

### Requirements

- Runs on Apify platform (Node.js + FFmpeg included)

- Recommended memory: 4096 MB (for larger videos)

- Recommended timeout: 3600 seconds (for batch runs)

***

### Features

- Batch processing of multiple video URLs
- Automatic platform detection
- Skips first X seconds (default: 5s) to avoid intros
- Generates configurable number of thumbnails per video (default: 8)
- Balanced interval sampling across video duration
- Resizes with aspect-ratio preservation + smart padding
- High-quality WebP output (tunable quality)
- Stores thumbnails in Key-Value Store
- Stores detailed metadata in Dataset
- Public image URLs for easy preview or download
- Secure URL validation (SSRF protection)

***

### Why use Smart Video Thumbnail Optimizer?

Choosing the right thumbnail is critical for increasing engagement and click-through rates across platforms like TikTok, Instagram, LinkedIn, Facebook, and X.

Manually scrubbing through videos to find good frames is time-consuming and inconsistent.

Smart Video Thumbnail Optimizer helps you:

- Automatically generate thumbnails from social media video posts
- Batch process multiple videos at once
- Create consistent thumbnails across platforms
- Reduce manual editing time
- Quickly preview multiple frame options
- Integrate thumbnail generation into automation workflows

If you would like more inspiration on how video automation could help your business or organization, check out our [industry pages](https://apify.com/industries).

***

### How to use Smart Video Thumbnail Optimizer

1. Click on **Try for free**.
2. Provide one or more supported video URLs.
3. Configure your preferences (thumbnail size, count, quality).
4. Click **Run**.
5. Preview or download generated thumbnails from the Dataset tab.

The entire process runs automatically.

***

### Input

Provide video URLs and optional settings:

```json
{
  "videoUrls": "https://www.tiktok.com/@example/video/123456\nhttps://vimeo.com/12345678",
  "count": 8,
  "size": "1280x720",
  "quality": 80,
  "skipStartSeconds": 5,
  "intervalSeconds": null,
  "testMode": false
}
```

### Input Parameters

- **videoUrls** (string, required) — One or multiple URLs (newline or comma separated)

- **count** (number, default: 8) — Number of thumbnails per video

- **size** (string, default: "1280x720") — Output dimensions (WIDTHxHEIGHT)

- **quality** (number, 1–100, default: 80) — WebP compression quality

- **skipStartSeconds** (number, default: 5) — Seconds skipped at start

- **intervalSeconds** (number, optional) — Custom spacing between thumbnails

- **testMode** (boolean, default: false) — If true, skips Key-Value storage

***

### Output

#### Dataset

One dataset item per thumbnail, including:

- videoUrl

- resolvedVideoUrl

- videoIndex

- durationSeconds

- thumbnailNumber

- timestampSeconds

- imageUrl

- width

- height

- bestThumbnail (middle frame)

- isBest

- testMode

***

### Results Example

```json
{
  "videoUrl": "https://www.linkedin.com/videos/example",
  "durationSeconds": 42.3,
  "thumbnailNumber": 4,
  "timestampSeconds": 12.5,
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/...",
  "width": 1280,
  "height": 720,
  "isBest": false
}
```

***

### Key-Value Store

Contains generated WebP thumbnail files:

```
thumb_video_0_thumb_001.webp
thumb_video_0_thumb_002.webp
...
```

All thumbnails are publicly accessible via generated URLs.

***

### Pricing

- Apify gives you $5 free usage credits every month on the Apify Free plan.

- For consistent content workflows, we recommend the Starter or Scale plans depending on batch size and processing needs.

***

### Tips for Best Results

- Use higher resolution (1280x720 or above) for professional thumbnails

- Increase quality for marketing use cases

- Skip at least 3–5 seconds to avoid intro screens

- Use intervalSeconds for precise frame control

- Batch similar-length videos for consistent outputs

***

### Limitations

- Only supports the listed platforms

- Does not currently include face detection or engagement scoring

- Does not yet support YouTube

- Very short videos may produce closely spaced thumbnails

***

### Is it legal to use Smart Video Thumbnail Optimizer?

- Smart Video Thumbnail Optimizer is designed for processing videos you own or have permission to process.

- Ensure you have appropriate rights to any video content before using this actor.

- If your videos contain personal data, ensure compliance with GDPR and other applicable regulations.

- If unsure, consult your legal team.

# Actor input Schema

## `videoUrls` (type: `string`):

Public video URLs from supported platforms (TikTok, Vimeo, Facebook, Instagram, X, LinkedIn). One URL per line.
Example:
https://vimeo.com/76979871

## `count` (type: `integer`):

Number of thumbnails to generate per video

## `size` (type: `string`):

Target thumbnail dimensions (aspect ratio preserved with padding)

## `quality` (type: `integer`):

WebP compression quality (higher = better quality, larger file size)

## `skipStartSeconds` (type: `number`):

Ignore the first X seconds (intros, logos, black frames)

## `intervalSeconds` (type: `number`):

Time between each thumbnail. Leave empty for automatic even spacing across video duration.

## `testMode` (type: `boolean`):

If enabled, Actor runs without storing thumbnails in the Key-Value Store (metadata still appears in Dataset).

## Actor input object example

```json
{
  "videoUrls": "https://vimeo.com/76979871",
  "count": 8,
  "size": "1280x720",
  "quality": 80,
  "skipStartSeconds": 5,
  "testMode": false
}
```

# Actor output Schema

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

Full dataset with video metadata and thumbnail previews (switch to 'Overview' view for image previews).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("badruddeen/smart-social-media-video-thumbnail-generator").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("badruddeen/smart-social-media-video-thumbnail-generator").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 '{}' |
apify call badruddeen/smart-social-media-video-thumbnail-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,badruddeen/smart-social-media-video-thumbnail-generator"
        }
    }
}
```

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/ybKjCfdpRUiyXoknm/builds/Gr4eUJ4uJg9NDrGbq/openapi.json
