# Convert a short video clip with ffmpeg

**Use case:** 

Converts a 10 second sample WebM clip with ffmpeg at the default settings and returns a download link for the result. Pick another output format such as MP3, WAV, GIF or MKV, set the resolution, frame rate or quality, trim or normalize loudness, and swap in your own video or audio files.

## Input

```json
{
  "mediaUrls": [
    {
      "url": "https://test-videos.co.uk/vids/bigbuckbunny/webm/vp9/360/Big_Buck_Bunny_360_10s_1MB.webm"
    }
  ],
  "outputFormat": "webm",
  "videoCodec": "auto",
  "quality": "medium",
  "videoBitrateKbps": 0,
  "width": 0,
  "height": 0,
  "withoutEnlargement": true,
  "fps": 0,
  "removeAudio": false,
  "audioBitrateKbps": 192,
  "sampleRate": "keep",
  "audioChannels": "keep",
  "normalizeLoudness": false,
  "gifFps": 10,
  "gifLoop": true,
  "stripMetadata": false,
  "maxFileSizeMb": 1000,
  "timeoutSecondsPerFile": 1800
}
```

## Output

```json
{
  "outputUrl": {
    "label": "Converted file",
    "format": "link"
  },
  "url": {
    "label": "Source",
    "format": "link"
  },
  "ok": {
    "label": "Converted",
    "format": "boolean"
  },
  "outputFormat": {
    "label": "To",
    "format": "text"
  },
  "inputContainer": {
    "label": "From",
    "format": "text"
  },
  "inputVideoCodec": {
    "label": "Source video",
    "format": "text"
  },
  "inputAudioCodec": {
    "label": "Source audio",
    "format": "text"
  },
  "outputVideoCodec": {
    "label": "New video",
    "format": "text"
  },
  "outputAudioCodec": {
    "label": "New audio",
    "format": "text"
  },
  "inputWidth": {
    "label": "Source width",
    "format": "number"
  },
  "inputHeight": {
    "label": "Source height",
    "format": "number"
  },
  "outputWidth": {
    "label": "New width",
    "format": "number"
  },
  "outputHeight": {
    "label": "New height",
    "format": "number"
  },
  "outputDurationSeconds": {
    "label": "Length (s)",
    "format": "number"
  },
  "inputBytes": {
    "label": "Source bytes",
    "format": "number"
  },
  "outputBytes": {
    "label": "New bytes",
    "format": "number"
  },
  "savedPercent": {
    "label": "Saved %",
    "format": "number"
  },
  "chargedMinutes": {
    "label": "Minutes charged",
    "format": "number"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

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

The Media Converter: WebM, MKV, MP3, WAV, FLAC, Opus and GIF Actor is ready to run with the inputs already set for "Convert a short video clip with ffmpeg". [Sign up or log in](https://console.apify.com/create-task-from-example/BTJagFDl8qeOicrgM) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Convert a short video clip with ffmpeg" task

The Media Converter: WebM, MKV, MP3, WAV, FLAC, Opus and GIF Actor will start running based on the input automatically. You can also change all the input fields, like media urls, output format, and more, to match your specific use case.

### 3. Receive the "Convert a short video clip with ffmpeg" 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 converted file, source, converted, 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 a short video clip with ffmpeg" task via API](https://apify.com/examsens.ai/media-converter.md).

## About this Actor

This example demonstrates how to use [Media Converter: WebM, MKV, MP3, WAV, FLAC, Opus and GIF](https://apify.com/examsens.ai/media-converter.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/examsens.ai/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/examsens.ai/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`).
