# Audio & Video Converter - MP3, MP4, WAV, WebM, GIF (FFmpeg) (`wood-between-studio/media-converter`) Actor

Convert audio and video files from URLs in bulk with FFmpeg: MP4 to MP3, WAV to MP3, MOV to MP4, video to GIF, WebM, FLAC, OGG. Trim, resize, compress, extract audio, normalize loudness. From $0.002 per minute.

- **URL**: https://apify.com/wood-between-studio/media-converter.md
- **Developed by:** [Wood Between Studio](https://apify.com/wood-between-studio) (community)
- **Categories:** Videos, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 audio minutes

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

## Audio & Video Converter: MP4 to MP3, WAV, WebM, GIF and More with FFmpeg

**Convert audio and video files in bulk from direct URLs** with FFmpeg, no install needed. MP4 to MP3, MOV to MP4, WAV to MP3, video to GIF, MKV to MP4, any format to WebM, FLAC, OGG, Opus or M4A. **Trim, resize, compress, mute, mix down to mono and normalize loudness** in the same step. Every converted file gets a direct download link.

### Why use it?

- **12 output formats:** MP3, M4A, AAC, WAV, FLAC, OGG, Opus, MP4 (H.264), MOV, MKV, WebM (VP9) and high-quality animated GIF (palette-optimized).
- **Reads almost anything** FFmpeg can: mp4, mov, mkv, webm, avi, flv, mpeg, wmv, mp3, wav, m4a, aac, flac, ogg, opus, amr...
- **Extract audio** from video in one click (choose an audio output format).
- **Compress and resize** video with a max height (e.g. 720p) and a CRF quality slider. Web-ready MP4 (`faststart`).
- **Podcast-ready audio:** EBU R128 loudness normalization and mono mixdown.
- **Trim** with a start time and duration.
- **Fair per-minute pricing**, and failed files are free.

### Use cases

- Turn recorded webinars, meetings or lectures (MP4) into MP3 for podcasts and transcription tools
- Compress product videos and screen recordings to 720p MP4 or WebM for websites
- Make GIF previews from short clips for docs, tickets and social posts
- Batch-convert WAV or FLAC audio libraries to MP3 or M4A
- Feed downstream Actors (transcription, AI) with a consistent audio format

### Input

| Field | Default | Notes |
|---|---|---|
| `fileUrls` | (required) | Direct links to media files |
| `outputFormat` | `mp3` | mp3, m4a, aac, wav, flac, ogg, opus, mp4, webm, mov, mkv, gif |
| `audioBitrate` | `192k` | 64k-320k |
| `maxHeight` | `0` (keep) | Downscale video, e.g. 720 |
| `videoQuality` | `23` | CRF, lower = better |
| `trimStart` / `trimDuration` | `0` | Seconds |
| `normalizeAudio` | `false` | Loudness normalization |
| `mono` / `removeAudio` | `false` | |
| `gifFps` / `gifWidth` | `12` / `480` | GIF only, max 60 s |
| `maxFileMb` | `1024` | Larger inputs are skipped (free) |

```json
{ "fileUrls": ["https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"], "outputFormat": "mp3", "normalizeAudio": true }
```

### Output

Converted files are saved in the run's key-value store. The dataset has one row per input with the download link:

```json
{
  "url": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4", "status": "success", "format": "webm",
  "inputMb": 1.08, "inputContainer": "mov,mp4,m4a,3gp,3g2,mj2", "inputDurationSecs": 5.05, "inputVideoCodec": "h264", "inputAudioCodec": "aac",
  "outputKey": "0001-flower.webm", "outputUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/0001-flower.webm?signature=...",
  "outputMb": 0.18, "durationSecs": 5.05, "width": 640, "height": 360, "billedEvent": "video-minute", "billedUnits": 1, "conversionSecs": 1.9, "error": null
}
```

### Pricing

Pay only for output, per started minute. Platform usage is included.
| Event | Price |
|---|---|
| Audio minute (any audio format) | $0.002 |
| Video minute, up to 720p | $0.01 |
| HD video minute, 721p-1440p | $0.03 |
| 4K video minute, above 1440p | $0.15 |
| GIF created (up to 60 s) | $0.01 |

Example: a 60-minute webinar to MP3 costs $0.12. Files that fail to download or convert are not charged. Set a maximum charge per run for a hard cap.

### Limits

- Use **direct file URLs** (the link ends in a media file or serves one). Pages on YouTube, TikTok, Instagram, Vimeo and similar platforms are not supported, because downloading from them is against their terms.
- Default memory is 4 GB (1 CPU). Long HD or 4K videos convert faster with more memory.
- GIFs are capped at 60 seconds; use `trimStart` and `trimDuration` to pick the part you want.

### Responsible use

Only convert files you own or have the right to use. You are responsible for the content you process.

### Support

Need another codec, subtitles, thumbnails or watermarking? Open an issue on the **Issues** tab. We read every one.

### Call it from curl, JavaScript or Python

You can run this Actor in the [Apify Console](https://apify.com/wood-between-studio/media-converter) with no code, or call it as an API from curl, JavaScript or Python. Replace `YOUR_TOKEN` with an [Apify API token](https://console.apify.com/account/integrations).

#### curl

```bash
curl "https://api.apify.com/v2/acts/wood-between-studio~media-converter/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fileUrls": ["https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"], "outputFormat": "mp3"}'
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('wood-between-studio/media-converter').call({
  "fileUrls": [
    "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
  ],
  "outputFormat": "mp3"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("wood-between-studio/media-converter").call(run_input={
  "fileUrls": [
    "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
  ],
  "outputFormat": "mp3"
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

You can also schedule the Actor, cap the spend per run, and send the dataset to Google Sheets, Slack or a webhook from the Console. Store page: [apify.com/wood-between-studio/media-converter](https://apify.com/wood-between-studio/media-converter).

# Actor input Schema

## `fileUrls` (type: `array`):

Direct links to audio or video files you have the right to convert (mp4, mov, mkv, webm, avi, mp3, wav, m4a, flac, ogg...). Web pages of video platforms are not supported.

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

Audio formats extract the sound track; video formats re-encode the video.

## `audioBitrate` (type: `string`):

For lossy audio, e.g. 128k, 192k, 320k.

## `maxHeight` (type: `integer`):

Downscale video to at most this height (keeps aspect ratio). 0 = keep original. 720 or lower is billed at the SD rate, 721-1440 at the HD rate, above 1440 at the 4K rate.

## `videoQuality` (type: `integer`):

Lower = better quality and bigger file. 23 is a good default, 28 compresses strongly.

## `trimStart` (type: `number`):

Optional. Skip the first N seconds.

## `trimDuration` (type: `number`):

Optional. Keep only this many seconds (0 = to the end).

## `normalizeAudio` (type: `boolean`):

Apply EBU R128 loudness normalization (podcasts, voice).

## `mono` (type: `boolean`):

Mix audio down to one channel.

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

Mute: output video without a sound track.

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

Only for GIF output.

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

Only for GIF output. GIFs are limited to 60 seconds.

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

Larger files are skipped (free).

## Actor input object example

```json
{
  "fileUrls": [
    "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
  ],
  "outputFormat": "mp3",
  "audioBitrate": "192k",
  "maxHeight": 0,
  "videoQuality": 23,
  "trimStart": 0,
  "trimDuration": 0,
  "normalizeAudio": false,
  "mono": false,
  "removeAudio": false,
  "gifFps": 12,
  "gifWidth": 480,
  "maxFileMb": 1024
}
```

# Actor output Schema

## `results` (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 = {
    "fileUrls": [
        "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wood-between-studio/media-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 = { "fileUrls": ["https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"] }

# Run the Actor and wait for it to finish
run = client.actor("wood-between-studio/media-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 '{
  "fileUrls": [
    "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
  ]
}' |
apify call wood-between-studio/media-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wood-between-studio/media-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/ZoY0cUSyZT1hxOmED/builds/ojGcxSjb8JiYW6am7/openapi.json
