# Video Converter & Compressor — MP4, WebM, MP3, GIF, Thumbnails (`openregistry/video-converter`) Actor

Convert and compress video or audio files by URL: MP4 (H.264), WebM, MP3, M4A, animated GIF, resize to 1080p/720p/480p, trim, mute, and extract thumbnails. Public download links. Pay per minute.

- **URL**: https://apify.com/openregistry/video-converter.md
- **Developed by:** [Mahé Perrin](https://apify.com/openregistry) (community)
- **Categories:** Videos, Developer tools
- **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 video minute (up to 480p)s

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 Converter & Compressor — MP4, WebM, MP3, GIF, Thumbnails

Convert, compress and trim **video and audio files by URL**: MP4 (H.264/AAC) that plays everywhere, WebM (VP9/Opus)
for the web, MP3 or M4A audio extracted from any video, animated GIFs, and still-frame thumbnails. Every result comes
with a **public download link**.

**From $0.002 per minute.** No API key, no subscription, no watermark; files that fail are not charged.

### What you can do

- **Convert** MOV, MKV, AVI, WebM, M4V, FLV, 3GP, MPEG… to **MP4** or **WebM**.
- **Compress**: choose a quality level and a smaller resolution (1080p, 720p, 480p, 360p, 240p) to shrink phone and
  screen recordings, typically 50–90 % smaller.
- **Extract audio** to **MP3** or **M4A** (podcasts, interviews, music videos, voice notes), or convert WAV/FLAC/OGG.
- **Trim** with a start and end time (`1:30` to `2:45`): only the kept part is processed and billed.
- **Animated GIF** from any part of a video (up to 60 s), with frame rate and width.
- **Thumbnails / frame extraction**: N frames evenly spread, or one frame every X seconds, as JPEG or PNG; alone or
  together with a conversion.
- **Remove the audio track**, keep or limit 60 fps, portrait videos handled (rotation respected).

### Input

| Field | What it does |
|---|---|
| `mediaUrls` | Direct public links to video or audio files (up to 2 GB each) |
| `outputFormat` | `mp4` (default), `webm`, `mp3`, `m4a`, `gif` or `none` (thumbnails only) |
| `resolution` | `original` (up to 1080p), `1080`, `720`, `480`, `360`, `240`; never upscaled |
| `quality` | `high`, `medium` (default), `low`: video compression level and audio bitrate (192/128/96 kbps) |
| `startTime`, `endTime` | Optional cut points: seconds (`90`) or timestamps (`1:30`, `00:01:30.5`) |
| `removeAudio` | Silent MP4/WebM |
| `keepHighFrameRate` | Keep 50/60 fps (otherwise limited to 30 fps) |
| `thumbnailCount` / `thumbnailInterval` | N evenly spread frames, or one frame every X seconds (max 500 per file) |
| `thumbnailFormat`, `thumbnailWidth` | JPEG or PNG; width in pixels (0 = original) |
| `gifFps`, `gifWidth` | GIF frame rate (default 12) and width (default 480 px) |
| `maxFiles` | Stops the run after this many files |

```json
{
  "mediaUrls": ["https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_5MB.mp4"],
  "outputFormat": "mp4",
  "resolution": "480",
  "quality": "medium",
  "thumbnailCount": 3
}
```

**Direct file links only.** YouTube, TikTok, Instagram, Facebook, X, Vimeo and other platform pages are refused: the
link must return the media file itself (a file in your cloud storage with a public link, a CDN, your own server, a
podcast enclosure…).

### Output

Files are saved in the run's key-value store; every row gives their **public download links**.

| Field | Example |
|---|---|
| `mediaUrl` | the source file |
| `outputUrl`, `outputKey` | link to the converted file, `001-clip.mp4` |
| `format`, `width`, `height` | mp4, 854, 480 |
| `durationSeconds`, `startSeconds` | processed length and cut start |
| `outputSizeBytes`, `sourceSizeBytes` | 5 210 334, 17 285 665 |
| `sourceWidth`, `sourceHeight`, `sourceDurationSeconds`, `sourceCodec` | 1920, 1080, 634.6, h264 |
| `thumbnails` | `[{ "time": 6, "key": "001-clip-frame-001.jpg", "url": "…" }]` |
| `billedMinutes`, `priceTier`, `processingSeconds` | 1, sd-minute, 8.5 |
| `error` | only on failed rows (not charged) |

### Pricing

Pay per event. Video minutes are counted on the processed (trimmed) duration, per started minute, at the price of the
**output** resolution:

| Event | Price |
|---|---|
| Audio minute (MP3, M4A) | $0.002 |
| Video minute up to 480p | $0.009 |
| Video minute, 720p | $0.022 |
| Video minute, 1080p | $0.045 |
| Animated GIF, per started 10 seconds | $0.007 |
| Thumbnail (each frame delivered) | $0.0008 |
| Video file in thumbnails-only mode | $0.002 |

Examples: a 10-minute 1080p phone video compressed to 720p costs $0.22; one hour of video to MP3 costs $0.12; ten
frames from a video cost $0.01. With `keepHighFrameRate` on a 50/60 fps video, video minutes count twice.

Not charged: invalid or refused links, web pages instead of files, failed downloads, unreadable files, files without
the needed track, failed conversions and frames that could not be extracted. If you set a maximum charge per run, files
that would go over it are skipped before processing.

### Speed and limits

- Files are processed one after another. A minute of 1080p video takes roughly 10 to 60 seconds to encode depending on
  the server load; 480p and audio are much faster.
- Up to 2 GB and 3 hours processed per file. Output is limited to 1080p. Video sources above 1080p (4K) are not
  supported yet for video or GIF output; MP3/M4A extraction and thumbnails work with them.
- Output links stay available as long as the run's storage is kept (according to your Apify data retention).
- Only process media you have the right to use.

### Open-source components

Conversions are done by **FFmpeg**, installed unmodified from the Alpine Linux package repository and run as a separate
program. That FFmpeg build is licensed under the GPL (version 2 or later) because it includes GPL components such as
x264; its source code is available from Alpine Linux and ffmpeg.org. The Actor's own code only calls the `ffmpeg` and
`ffprobe` commands.

# Actor input Schema

## `mediaUrls` (type: `array`):

Direct public links to video or audio files: MP4, MOV, MKV, WebM, AVI, M4V, MP3, WAV, M4A, FLAC, OGG… Up to 2 GB each. YouTube, TikTok, Instagram and other platform pages are not supported: the link must return the file itself.

## `outputFormat` (type: `string`):

Format of the converted file. MP3 and M4A extract the audio track from videos. Choose None to only extract thumbnails.

## `resolution` (type: `string`):

Target size of the short side (height for landscape, width for portrait videos). Videos are never upscaled; output is limited to 1080p. Lower resolutions give smaller files and a lower price.

## `quality` (type: `string`):

Compression level for video (constant-quality encoding) and audio bitrate (192/128/96 kbps for MP3 and M4A).

## `startTime` (type: `string`):

Optional. Cut the media from this point: seconds (90) or timestamp (1:30, 00:01:30.5). Only the kept part is billed.

## `endTime` (type: `string`):

Optional. Cut the media at this point: seconds or timestamp. Leave empty to keep everything until the end.

## `removeAudio` (type: `boolean`):

Produce a silent video (MP4 and WebM only).

## `keepHighFrameRate` (type: `boolean`):

By default the output frame rate is limited to 30 fps (smaller files, enough for most uses). Turn on to keep 50/60 fps videos smooth; minutes above 30 fps are billed twice.

## `thumbnailCount` (type: `integer`):

Extract this many still frames, evenly spread over the video (or over the trimmed part). 0 = none. Takes precedence over the interval.

## `thumbnailInterval` (type: `number`):

Extract one frame every X seconds instead (for example 10 for one frame every 10 s). Max 500 frames per file. 0 = off.

## `thumbnailFormat` (type: `string`):

Image format of the extracted frames.

## `thumbnailWidth` (type: `integer`):

Resize frames to this width, keeping the aspect ratio (never upscaled). 0 = original video size.

## `gifFps` (type: `integer`):

Frame rate of animated GIFs. Lower values give smaller files.

## `gifWidth` (type: `integer`):

Width of animated GIFs, keeping the aspect ratio (never upscaled). GIFs cover at most 60 seconds from the start time.

## `maxFiles` (type: `integer`):

Stop after this many processed files. To cap the cost, also set the maximum charge per run in Apify.

## Actor input object example

```json
{
  "mediaUrls": [
    "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_5MB.mp4"
  ],
  "outputFormat": "mp4",
  "resolution": "original",
  "quality": "medium",
  "removeAudio": false,
  "keepHighFrameRate": false,
  "thumbnailCount": 0,
  "thumbnailInterval": 0,
  "thumbnailFormat": "jpg",
  "thumbnailWidth": 0,
  "gifFps": 12,
  "gifWidth": 480,
  "maxFiles": 100
}
```

# Actor output Schema

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

No description

## `files` (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 = {
    "mediaUrls": [
        "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_5MB.mp4"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("openregistry/video-converter").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 = { "mediaUrls": ["https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_5MB.mp4"] }

# Run the Actor and wait for it to finish
run = client.actor("openregistry/video-converter").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 '{
  "mediaUrls": [
    "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_5MB.mp4"
  ]
}' |
apify call openregistry/video-converter --silent --output-dataset

```

## MCP server setup

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

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/AyIF2zvXj7dKpXyAy/builds/qNX5WBgAYBUzBCiOG/openapi.json
