FFmpeg API Cloud LogoFFmpeg API Cloud

extract audio from video ffmpeg

Extract audio from video with FFmpeg

If you need to extract audio from video with FFmpeg, the usual goal is to strip the sound track into a separate file for playback, transcription, or downstream processing. This page shows the practical FFmpeg command, the matching FFmpeg API request, and an online tool you can test in the browser.

FFmpeg CLI

How to extract audio from video in FFmpeg

A common FFmpeg audio extraction workflow drops the video stream, selects an audio codec, and writes the result into a standalone audio file.

FFmpeg audio extraction command

Click any part of the command to see what it does.

FFmpeg audio extraction command

ffmpeg

This runs the FFmpeg binary. The rest of the command defines the source file, removes the video stream, and writes a separate audio output.

API

Use the same audio extraction workflow through the FFmpeg API

If you need audio extraction inside your product, app, or backend workflow, the FFmpeg API gives you a faster path than maintaining your own media processing infrastructure. You can send one args-based request and reuse the same workflow in production.

Request

curl -X POST https://ffmpeg-api.cloud/v1/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "ffmpegArgs": [
    "-y",
    "-i",
    "{{input}}",
    "-vn",
    "-acodec",
    "libmp3lame",
    "{{output}}"
  ],
  "inputs": {
    "input": {
      "type": "url",
      "url": "https://example.com/input.mp4"
    }
  },
  "outputs": {
    "output": {
      "fileName": "audio-output.mp3"
    }
  }
}'

Response

{
  "jobId": "job_01hxyz...",
  "status": "queued",
  "runtimeSeconds": 0,
  "creditsCharged": 0,
  "createdAt": "2026-04-14T10:30:00.000Z"
}

Online tool

Try this FFmpeg API audio extraction tool online

Upload a source video, choose the output audio format, and run the extraction job in the browser. It is the quickest way to test the workflow before wiring the same request into your own app or backend.

Live playground

Extract audio from video with FFmpeg

Strip the audio track from a source video with an args-based FFmpeg API request.

Upload a file to generate a temporary source URL

Source URLs are valid for 1 hour. Max file size: 2GB.

Generated FFmpeg API request

This request is initialized from the current template, and you can edit it before running.

Use public URLs for inputs directly in this request. If you upload files above, copy the generated source URL into the request. In ffmpegArgs, each {} placeholder should match a key in inputs or outputs. For example, {} should match inputs.input, {} should match inputs.video, and {} should match outputs.output.

Use cases

Common ways to use FFmpeg audio extraction

Extracting audio is useful when you want a standalone sound file for listening, analysis, or downstream machine workflows.

Prepare audio for transcription or ASR

Strip the audio track from source videos before speech-to-text, moderation, captioning, or search indexing workflows.

Create audio-only deliverables

Generate MP3, WAV, or AAC files from recorded webinars, demos, interviews, or podcasts originally captured as video.

Simplify downstream media pipelines

Split audio from video when your app needs separate storage, review, or processing paths for each stream.

FAQ

FFmpeg extract audio FAQ

Common questions about extracting audio from video with FFmpeg, choosing output formats, and moving the same workflow into the FFmpeg API.

Related templates

Other FFmpeg templates

Explore other FFmpeg templates for MP4 to MP3, trimming, metadata inspection, and more.