# Convert MP4 to MP3

**Use case:** 

Extract the audio track from MP4, MOV or WebM videos and save it as a 192 kbps MP3 with a public download link. Useful for podcasts, lectures, interviews and music clips. Switch the output to M4A, WAV, FLAC or OGG, normalize loudness, trim, or convert a whole list of videos at once. Priced per audio minute.

## Input

```json
{
  "mediaUrls": [
    "https://download.samplelib.com/mp4/sample-10s.mp4"
  ],
  "datasetField": "url",
  "operation": "extract-audio",
  "videoFormat": "mp4",
  "compressionLevel": "balanced",
  "maxResolution": "720",
  "fps": 0,
  "mute": false,
  "normalizeAudio": false,
  "audioFormat": "mp3",
  "audioBitrateKbps": 192,
  "gifFps": 10,
  "gifWidth": 480,
  "gifMaxSeconds": 10,
  "maxFileSizeMb": 500,
  "maxDurationMinutes": 60,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

## Output

```json
{
  "fileUrl": {
    "label": "Download",
    "format": "link"
  },
  "status": {
    "label": "Status",
    "format": "text"
  },
  "operation": {
    "label": "Operation",
    "format": "text"
  },
  "output.format": {
    "label": "Format",
    "format": "text"
  },
  "output.duration": {
    "label": "Duration s",
    "format": "number"
  },
  "output.width": {
    "label": "Width",
    "format": "number"
  },
  "output.height": {
    "label": "Height",
    "format": "number"
  },
  "output.sizeBytes": {
    "label": "Output bytes",
    "format": "number"
  },
  "output.sizeReductionPct": {
    "label": "Smaller by %",
    "format": "number"
  },
  "input.sizeBytes": {
    "label": "Input bytes",
    "format": "number"
  },
  "input.duration": {
    "label": "Input s",
    "format": "number"
  },
  "input.width": {
    "label": "In width",
    "format": "number"
  },
  "input.height": {
    "label": "In height",
    "format": "number"
  },
  "input.videoCodec": {
    "label": "In video codec",
    "format": "text"
  },
  "input.audioCodec": {
    "label": "In audio codec",
    "format": "text"
  },
  "processingSec": {
    "label": "Processing s",
    "format": "number"
  },
  "sourceUrl": {
    "label": "Source",
    "format": "link"
  },
  "errorCode": {
    "label": "Error code",
    "format": "text"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Video Converter & Compressor – MP4, MP3, WebM, GIF (FFmpeg) Actor is ready to run with the inputs already set for "Convert MP4 to MP3". [Sign up or log in](https://console.apify.com/create-task-from-example/WaZ1Dfk1RzqCnR1Z8) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Convert MP4 to MP3" task

The Video Converter & Compressor – MP4, MP3, WebM, GIF (FFmpeg) Actor will start running based on the input automatically. You can also change all the input fields, like media file urls (direct links), dataset field with the url, and more, to match your specific use case.

### 3. Receive the "Convert MP4 to MP3" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as download, status, operation, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Convert MP4 to MP3" task via API](https://apify.com/gazidev/media-converter.md).

## About this Actor

This example demonstrates how to use [Video Converter & Compressor – MP4, MP3, WebM, GIF (FFmpeg)](https://apify.com/gazidev/media-converter.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/gazidev/media-converter.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/gazidev/media-converter.md

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`).
