ABOUT ME
PROJECTS
OTHER
GALLERIES

A comparison of audio and video codecs

This page presents the difference between codecs. We talk about lossy compression, since the goal is to deliver the best quality over a specified bitrate. For audio, there's lossless compression (FLAC or TrueHD), but these won't matter here.

Audio

The audio files were encoded with their reference encoders for the best quality.
The used encoders:
- MP3: libmp3lame
- AAC-LC, HE-AAC, HE-AAC v2: libfdk_aac
- Opus: libopus
- Vorbis: libvorbis

MP3

The MP3 (or MPEG-1 audio layer 3) is the most frequently heard music format that is supported by a lot of devices and software. The MP3 was first released in august of 1993 and even now it will stay the most known format. Even though it's popular, it's not the best one.

128 kbps

96 kbps

64 kbps

48 kbps

36 kbps

AAC-LC

The AAC-LC (Low Complexity AAC or simply AAC) is the MPEG audio's newer codec that is part of the MPEG-4 standard. Earlier it was in MPEG-2, but later moved to MPEG-4 and first released in 1999. The AAC audio can be found in video recordings of phones and on most social sites. Personally, it's better to use than MP3. Huge pro is that it can be put into an MPEG-4 container with the .m4a extension.

128 kbps

96 kbps

64 kbps

48 kbps

36 kbps

24 kbps

HE-AAC

The HE-AAC (low complexity AAC audio with SBR extension) is a modified version of AAC that uses Spectral Band Replication to reproduce the higher frequencies. HE-AAC was first released in 2003 for the MPEG-4 standard. This audio compression is used in TikTok, Spotify (on low setting), as well as in digital radios.

128 kbps

96 kbps

64 kbps

48 kbps

36 kbps

24 kbps

16 kbps

HE-AAC v2

HE-AAC v2 (low complexity AAC audio with SBR extension and parametric stereo) is HE-AAC's extended version that was first released 1 year after HE-AAC in 2004, again for the MPEG-4 standard. It also implements Parametric Stereo to compress the difference between stereo channels.

48 kbps

36 kbps

24 kbps

16 kbps

12 kbps

Opus

The Opus is developed by the Xiph.org foundation and first released on August 26th, 2012. Opus is used by YouTube and it's the WebM container's default audio codec. Opus combines two codecs: SILK and CELT's functions. In most cases, it uses CELT mode, although it's a mix.

128 kbps

96 kbps

64 kbps

48 kbps

36 kbps

24 kbps

16 kbps

12 kbps

8 kbps

Vorbis

Vorbis is also developed by Xiph.org and libvorbis was first released it on July 19th, 2002. Vorbis is the OGG container's default audio codec.

128 kbps

96 kbps

64 kbps

48 kbps

Video

Compressing video is more complex and that's why most encoders have a lot of settings. Not only the bitrate defines the quality, but the encoder's preset.

The video files were encoded using these libraries:
- H.264: libx264
- HEVC/H.265: libx265
- VP9: vp9_qsv (Quick Sync Video hardware encoder)
- AV1: libaom-av1 and libsvtav1

Notes:
- The transcoded videos are in Full HD resolution (1920x1080) and run at 24 FPS.
- The slow presets just mean that the CPU spends more time with encoding. On faster presets, it spends less time.
- In VP9 and AV1's case, it was hard to do constant bitrate, the numbers show the estimated bitrate. The two codecs were made for constant quality (a.k.a. CRF).

H.264

The H.264 (AVC or MPEG-4 part 10) is the most frequently used video codec that was first released in 2003. It's basically used on most platforms, since the encoding speed and quality is somewhat acceptable, perfect for streaming. H.264 is part of the MPEG-4 standard and it's the default video codec for MP4, MOV, MKV containers.

Slow preset (veryslow)

2 Mbps

1 Mbps

500 kbps

200 kbps

Fast preset (ultrafast)

2 Mbps

1 Mbps

500 kbps

200 kbps

H.265

The H.265 (a.k.a. HEVC, or MPEG-H part 2) is the successor of H.264 that was first released by MPEG on June 7th, 2013 for the MPEG-H standard. For example, the codec is used by TikTok and Facebook. Its downside is that it's heavily patented.

Slow preset (slower)

2 Mbps

1 Mbps

500 kbps

Fast preset (faster)

2 Mbps

1 Mbps

500 kbps

VP9

The VP9 was developed by Google that was released 10 days after HEVC, on June 17th, 2013. The codec is mainly used on YouTube and it's one of the WebM container's codec. The codec and its reference encoder, libvpx-vp9 is free to use with no charge.

Slow preset (veryslow)

2 Mbps

1 Mbps

500 kbps

200 kbps

Fast preset (veryfast)

2 Mbps

1 Mbps

500 kbps

200 kbps

AV1

The AV1 is developed by AOM (Alliance for Open Media) that was first released on March 28th, 2018. The codec is also used on YouTube and another codec for the WebM container.
For the AV1, there's three software encoder, I used two for this comparison: libaom-av1 and libsvtav1. libaom-av1 is the best quality software encoder, but its drawback is the poor performance, since the encoder focuses on quality. That's why Intel and Netflix cooperated and created the libsvtav1 encoder library. libsvtav1 focuses on performance, sacrificing quality for real-time application.

libaom-av1's fastest preset (-cpu-used 8)

2 Mbps

1 Mbps

500 kbps

200 kbps


libsvtav1's slower preset (-preset 5)

2 Mbps

1 Mbps

500 kbps

200 kbps

libsvtav1's faster preset (-preset 10)

2 Mbps

1 Mbps

500 kbps

200 kbps

Sources:

MP3
AAC-LC
HE-AAC and HE-AAC v2
Opus
Vorbis
H.264
HEVC
VP9
AV1
Encoded video's source (Pexels)

The encoded videos are for personal use and only for examples. Highly recommended to use the original from the origin site that is free to use.

The encoded audio is the same case.

Song: Jim Yosef - Link [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/Link
Watch: http://youtu.be/9iHM6X6uUH8