How to extract audio from video without unnecessary re-encoding
For transcription, you may only need the audio track, so there’s no reason to transfer several gigabytes of video. Extracting a track and re-encoding it are different operations.
Find the track you need
A video may have multiple languages, the host’s voice on a track separate from the mix, or no audio at all. Open the file in a player and check which tracks are available. Listen to a passage with speech as well as any musical intro.
If you only need the words from a video, you may not have to extract anything. Start with the Video to text page and check its upload options. Extract audio when you have a specific file size, compatibility or editing problem.
Copy or convert?
In FFmpeg, -map 0:a:0 selects the first audio track, and -c:a copy copies it without re-encoding. Use a file extension that matches a compatible container. The example below is for an AAC track saved in M4A. Check the source before using it on another video.
If the container is incompatible or you need a different codec, export from an editor or explicitly encode the audio. Renaming the extension doesn’t convert the file contents. Keep the original video.
Check the result
Compare the duration and listen to the start, middle and end. Check that you selected the right language and channel. If the video has edits with gaps or unusual timestamps, check separately that the sound matches the picture.
Use a name that shows where the file came from, such as interview_audio_original.m4a. Record how you made it. This helps the editor tell an extracted track from a processed one and avoid mixing up versions when correcting the text.
Worked example
| Checkpoint | Observation | Action |
|---|---|---|
| Track 1 | Russian speech | Select that track |
| AAC codec | M4A container | Stream copy is possible |
| End of the file | Last line is present | Check duration |
Working example
# For a video with AAC as its first audio track ffmpeg -i input.mp4 -map 0:a:0 -c:a copy output.m4a # The input and output files must have different names.
What else to check
For the differences between extensions, containers and codecs, see the audio and video format guide. Then check the resulting text against the transcript editing checklist.
Frequently asked questions
Will quality be lost?
A compatible stream copy doesn’t re-encode the audio. Lossy re-encoding may discard some information.
Why does the command return an error?
The track may be missing, or its codec and the container may not be compatible. Inspect the file properties first rather than guessing at an extension.