Best Audio Codec for Video: AAC vs Opus vs MP3 (2026)
Take one audio track and encode it twice at 96 kbps: once as Opus, once as MP3. Most people pick the Opus file as the cleaner of the two. MP3 only closes the gap past 160 kbps, and by then the file is roughly twice the size.
That single comparison is the practical question behind the best audio codec for video. Three formats cover almost everything you will export: AAC for reach, Opus for size, and MP3 for old hardware.
This guide shows how to check what a file already uses. It also covers re-encoding the audio without wrecking the sound, and the cases where the right move is to leave it exactly as it is.
What Is the Best Audio Codec for Video?
For most videos, AAC is the best audio codec and the safe default. It plays on phones, browsers, televisions, and consoles, and it holds up well from 128 kbps to 192 kbps in stereo.
Opus reaches the same quality at roughly half the bitrate, and the Opus codec project documents how. Its weakness is playback: some older televisions, car stereos, and standalone players ignore it.
MP3 is the fallback for legacy gear. It is the least efficient of the three, so it needs 192 kbps to 256 kbps to match what AAC or Opus manage at half that.
| Codec | Typical bitrate | Best for | Old-hardware support |
|---|---|---|---|
| AAC | 128–192 kbps | Everything, as the default | Wide |
| Opus | 64–128 kbps | Web video and small files | Partial |
| MP3 | 192–256 kbps | Legacy devices | Wide |
Check What Your Audio Already Uses
Before you change anything, find out what is inside the file. Guessing leads to pointless re-encodes that only cost quality.
With FFmpeg installed, one command prints the audio stream’s details. It reports the codec, bitrate, sample rate, and channel count:
ffprobe -v error -select_streams a:0
-show_entries stream=codec_name,bit_rate,sample_rate,channels
-of default=nw=1 input.mp4
Three values matter here. The codec name tells you whether a conversion is needed, while the sample rate tells you whether a resample is coming. The channel count decides the bitrate you should aim for.
If the source is already AAC at 128 kbps or higher, there is usually nothing to gain from re-encoding. Leave it and fix the loudness instead. If you are unsure which rate to keep, the sample rate guide compares 44.1 kHz with 48 kHz.
HandBrake and most editors show the same details in the export panel. Look in the audio tab, beside a drop-down that lists the codecs the app can write.
Method 1: Re-encode the Audio With FFmpeg
FFmpeg can rewrite the audio while the video stream is copied untouched. Copying the picture keeps the job fast and stops the video from losing a generation of quality. The options live in the FFmpeg documentation, and a shorter list of everyday recipes sits in our command reference.
Set it up in four steps. Copy the original somewhere safe so a bad export never overwrites the master. Pick the encoder, knowing that aac is built in while Opus needs libopus and MP3 needs libmp3lame. Choose a bitrate that matches the destination rather than the highest number available. Finally, keep -c:v copy so the picture is remuxed rather than re-encoded.
The safest default writes AAC into an MP4. Use it when in doubt:
ffmpeg -i input.mp4 -c:v copy -c:a aac -b:a 160k output.mp4
The smallest file comes from Opus inside an MKV. Keep the bitrate near 96 kbps:
ffmpeg -i input.mp4 -c:v copy -c:a libopus -b:a 96k -vbr on output.mkv
MP3 is the last resort for old hardware. A quality setting of 2 lands near 190 kbps:
ffmpeg -i input.mp4 -c:v copy -c:a libmp3lame -q:a 2 output.mp4
One container rule matters here. Browsers accept Opus only alongside VP8, VP9, or AV1 video inside WebM. An H.264 picture plus Opus works in MKV, which desktop players handle, but browsers usually will not. The trade-offs between the boxes are covered in the container formats guide.
When the command finishes, run the ffprobe check again. Confirm the codec, bitrate, and channel count are what you intended before you delete anything.
Method 2: Use Your Editor or HandBrake Preset
When you are exporting a finished edit, you are not adding an encoder, just choosing one. The software already ships with the codecs you need.
In HandBrake, open the Audio tab and set the Codec drop-down to AAC, Opus, or MP3. Then set a bitrate or pick a quality value, export, and check the result in a player before you commit.
In an editor such as Resolve, Premiere, or Final Cut, the export dialog has its own Audio tab. Set the codec to AAC, match the sample rate to your timeline, and set the bitrate to 192 kbps for music or 128 kbps for speech.
If the destination is a large platform, remember that it re-encodes your audio anyway. YouTube serves AAC in its MP4 streams and Opus in its WebM and DASH streams, and the viewer’s connection decides which one appears. You cannot pick it at upload, so hand the platform a clean 192 kbps AAC file and let its own pipeline handle the rest.
What an Audio Re-encode Can and Cannot Do
A converter changes the codec and the container. It cannot add detail that was never recorded, and it cannot recover what an earlier encode already discarded.
There is no single best audio codec for every job, only the one that fits the destination. A codec is a delivery format, not an upgrade.
Every extra lossy pass leaves a mark. Encode a lossy file into a second lossy format and the artifacts accumulate, even when you raise the bitrate at the same time.
Quality does not follow the bitrate number. A track re-wrapped to 320 kbps from a thin 96 kbps source stays thin, just larger.
Loudness is a separate task from codec choice. An encoder will not level a track that jumps between quiet and loud, and that needs a normalisation pass of its own. Our audio normalisation walkthrough covers it.
Rights and Responsible Use
Changing a codec never changes who owns the sound. The music, the dialogue, and the ambience in your export belong to the people who created them, and running a file through an encoder transfers none of that ownership.
Encoding your own recording for your own archive is one thing. Publishing someone else’s track inside your video, or selling a file that carries it, needs a licence that covers that exact use.
Personal reference and commercial redistribution are different permissions, and a file being easy to convert is not a licence for either. When a track came from a paid release or a streaming service, treat its use as restricted until you hold written permission. The YouTube copyright help page shows how one large platform applies those limits in practice.
Troubleshooting
The audio drifts out of sync after conversion
Cause: the audio was resampled or re-encoded while the video’s duration was rebuilt, so the two streams no longer align. Fix: keep -c:v copy, keep the original sample rate, and copy the audio stream with -c:a copy if the current codec is already acceptable.
Video plays, but the television has no sound
Cause: the track is Opus, or an AC-3 variant the display cannot decode. Fix: remux to AAC at 192 kbps with -c:a aac -b:a 192k, then test on the device itself.
The player calls the codec unsupported
Cause: Opus was written into an MP4 container, which few players read. Fix: move Opus to WebM or MKV, or switch the track to AAC and keep the MP4.
The export sounds worse than the original
Cause: an already-lossy source was encoded a second time, stacking new artifacts on old ones. Fix: re-export from the original master, or copy the audio stream without touching it.
FFmpeg reports “Unknown encoder libopus”
Cause: the build you installed was compiled without the Opus library. Fix: install a full build that includes it, or fall back to libvorbis or aac, which most builds include.
The file got bigger after compression
Cause: the target bitrate was set above the source bitrate. Fix: set the bitrate at or below the source, or leave the stream untouched when it is already the right codec.
Frequently Asked Questions
What is the best audio codec for video?
AAC is the best audio codec for most video, because it plays widely and holds up at 128 kbps to 192 kbps. Choose Opus when size matters and you control playback, and MP3 only for legacy devices.
Is Opus better than AAC?
Opus is more efficient, reaching the same quality at a lower bitrate. Below about 128 kbps the difference is easy to hear, while above 192 kbps the two are close enough that most listeners cannot separate them.
Should I use MP3 for video?
No, not unless a device requires it. MP3 is the oldest and least efficient of the three, and most editors and phones play AAC or Opus without complaint.
What bitrate should I use for video audio?
Use 128 kbps to 192 kbps AAC for stereo in most videos. Go to 256 kbps for dense music you will master later, and drop to 96 kbps Opus for web video where size is the priority.
Does converting the audio lose quality?
Yes, once the source is lossy. A second lossy encode adds a little damage each time, even at a high bitrate. Copy the audio stream instead when the codec is already the one you want.
Can I put Opus inside an MP4 file?
Rarely, and not usefully. Support for Opus in MP4 is patchy across players. Put Opus in WebM with VP9 or AV1 video, or in MKV for desktop playback.
What audio codec does YouTube use?
YouTube serves AAC in its MP4 streams and Opus in its WebM and DASH streams. You do not choose between them when you upload, because the platform picks per viewer.
Is 320 kbps always better than 128 kbps?
No. Bitrate helps only when the source actually holds the detail. Re-encoding a thin 96 kbps track to 320 kbps makes it larger, not better.
Which Codec Should You Use?
Choose AAC at 128 kbps to 192 kbps when the file has to play almost anywhere: phones, browsers, televisions, group chats. It is the unglamorous answer that rarely fails.
Choose Opus when you control playback and size is the priority, typically 96 kbps web video or a clip you will send over a chat app. Keep the picture in WebM or MKV.
Choose MP3 only when a specific old device refuses everything else. When the audio is already AAC at a sensible bitrate, choose nothing at all: copy the stream and leave the master alone.