# How to extract audio from a video

> The most reliable way to extract audio from a video is ffmpeg.

Canonical URL: https://vivu.ai/guide/how-to-extract-audio-from-a-video

The most reliable way to extract audio from a video is ffmpeg. The command `ffmpeg -i input.mp4 -vn -c:a copy output.m4a` pulls out the audio track without re-encoding it, so the result is identical to the original and runs about as fast as your disk can read the file. If you'd rather click than type, VLC's convert option, QuickTime Player's audio-only export on a Mac, and the audio export in most video editors all do the same job. Which one fits depends on how many files you have and what you plan to do with the audio next.

## Check what's in the file first

A video file is a container that holds one or more streams. Run `ffprobe input.mp4` and look for the lines that say `Audio:`. They tell you the codec (aac, pcm_s16le, opus, ac3) and how many audio tracks the file has.

Two things follow from that. If the codec is AAC, you can copy it straight into an `.m4a` file with no conversion. If there is more than one audio track, you have to pick one. Interview footage often has this, with a lav mic on one track and the camera mic on another.

## Route 1: ffmpeg on the command line

Most cases need one of these commands:

```
# copy the audio as-is (AAC into .m4a)
ffmpeg -i input.mp4 -vn -c:a copy output.m4a

# convert to WAV for editing or transcription
ffmpeg -i input.mp4 -vn -c:a pcm_s16le output.wav

# take only the second audio track
ffmpeg -i input.mov -map 0:a:1 -vn -c:a pcm_s16le track2.wav
```

`-vn` drops the video. `-c:a copy` keeps the original audio data, and any other codec setting re-encodes it. The cost is a few minutes of installing and getting used to the syntax. The payoff is batch work. On macOS or Linux, one loop handles a whole folder:

```
for f in *.mp4; do ffmpeg -i "$f" -vn -c:a copy "${f%.mp4}.m4a"; done
```

## Route 2: a media player

VLC has a Convert/Save option (Convert / Stream on a Mac). You add the file, choose an audio profile such as MP3, and save. On a Mac, QuickTime Player has File > Export As > Audio Only, which writes an `.m4a`. Both are fine for listening copies. The VLC route re-encodes, so it's a weaker choice when the audio is going back into an edit.

## Route 3: your video editor

Put the clip on a timeline, trim it, and export audio only. This is the right route when you need one section rather than the whole file, or when you want to fix levels before handing the audio off. It's the slowest route for anything in bulk.

## Route 4: online converters

You upload the video and download the audio. That's fine for a short clip with nothing sensitive in it. The costs show up with larger files: upload time, size caps on free tiers, and your footage sitting on someone else's server. Unreleased interviews or client material are better kept on your own machine.

## Picking a format

Use WAV if the audio is going into an editor or a transcription tool. It's uncompressed and large, and every tool reads it. Use M4A (AAC) or MP3 for listening and sharing. Each time a lossy file is re-encoded to another lossy format, it loses a little more, so copy the stream when you can.

## When you don't need to extract audio at all

Pulling the audio out is often a step toward something else, usually a transcript. Most transcription tools read video files directly and deal with the audio themselves, so extracting first just gives you one more file to keep track of. [Transcribing straight from the video](https://vivu.ai/guide/how-to-transcribe-video-to-text) is usually the shorter path. If the recording is noisy, [the transcription approach you pick](https://vivu.ai/guide/what-s-the-best-way-to-transcribe-noisy-audio) will matter far more than the audio format.

The other common reason is finding a spot. Someone remembers a guest saying something good in one of dozens of recordings, so the plan is to extract, transcribe, and then search the text. That works if you remember the words, and [search-video-by-spoken-words](https://vivu.ai/guide/search-video-by-spoken-words) goes through how. It breaks down when you remember the moment but not the wording. [Vivu](https://vivu.ai/platform) works from the video itself: you upload the recordings to a project, they're indexed once, and a plain-language question returns time ranges you can open, each with a short reason it matched, wherever in the project they are. Some of those will be near misses, like a passage that's only next to what you asked about, and it doesn't hand you an audio file, so a person still picks what to keep and ffmpeg is still the tool if the deliverable is an MP3.

So the deciding question is what you need at the end. If it's a file, decide by volume: for one clip use whatever is already open, and for a folder use ffmpeg. If it's a place in the recording, the audio file probably wasn't the goal in the first place.

## FAQ

### Does extracting audio from a video lose quality?

No, as long as you copy the stream. In ffmpeg, `-c:a copy` writes the same audio data into a new container, so the output is bit-for-bit the same audio. Quality drops only when you re-encode to a lossy format like MP3, and it drops again each time a lossy file is re-encoded. Converting to WAV loses nothing, but it can't bring back what the original compression removed.

### Why does ffmpeg say the codec isn't supported in the container?

The file extension you picked can't hold that audio codec. AAC goes in `.m4a`, PCM goes in `.wav`, Opus goes in `.ogg` or `.webm`, and MP3 audio goes in `.mp3`. Run `ffprobe` on the source to see the codec and match the extension to it, or remove `-c:a copy` and let ffmpeg re-encode.

### Can I extract audio from a YouTube video?

For your own uploads, download the original from YouTube Studio and extract the audio from that file. For other people's videos, downloading usually breaks the platform's terms, and the audio is still under copyright, so get permission before you use it anywhere.

### What audio format is best for transcription?

WAV or the original AAC. Every transcription tool accepts both, and mono is fine. Most speech-to-text tools resample audio internally, so a higher sample rate won't improve accuracy. A clean source with little background noise will.
