Which Audio Format Is Lowest In Size

Audio libraries or podcasts are often a significant contributor to space shortages, whether you’re trying to conserve drive space and storage or reduce necessary streaming bandwidth. Thankfully, you needn’t entirely bite the bullet on quality to do so.

The best format to compress your audio is Ogg Opus, which achieves better fidelity while conserving the most disk space. AAC will be a more convenient choice on older platforms, iOS and macOS. However, raw PCM is technically the lowest in size in extreme cases.

If you’re aiming to minimize size, lossy coding is essential. However, working with lossy coding is a bit mysterious. Opus and its alternatives have their pros and cons, both in practical settings and especially in creating the smallest possible audio file.

Which Audio Format Is The Smallest?

The best choice for achieving maximum compression of your audio while losing the least amount of quality is the Ogg Opus format. Opus is a lossy (information discarding) audio format designed by Xiph to be the best for speech, replacing Speex. However, when combined with a suitable container format, it beats AAC, MP3, and Vorbis at storing audio media of any variety.

This needs to be clarified: Opus specifies the data stream format. A container file (such as Ogg or Matroska) contains the data stream. Often, Opus audio will reside in an Ogg container file and have the .opus file extension. However, as a user, you will usually only see file extensions such as .ogg/.mp4/.mkv/.webm, which are all container file formats that might contain Opus streams.

When it comes to reducing the size of lossy music files, the main thing you want to pay attention to is bitrate. Re-encoding to Opus at a lower bitrate may be the solution.

  • Below 96kbit/s – Where Opus’s better quality makes the most significant difference
  • 96-128kbit/s – Good for saving space without considerable artifacts
  • 128-196kbit/s – An excellent range for achieving decent savings while retaining quality
  • Over 196kbit/s – approaching/at transparency, where you can’t perceive the loss

What Are The Advantages Of Opus?

On technical merit, Opus should replace MP3 and AAC. At the same bitrate (amount of bits per second of audio), it surpasses AAC, MP3, and Ogg Vorbis at perceptual listening quality tests. This means you can compress audio down to lower bitrates: retaining more quality while shaving off a considerable percentage of space.

Opus is a free format: free of cost and free of licensing restrictions. So you can look at the reference implementation of Opus and help contribute to its development. On the other hand, you need a license to make and distribute an AAC codec, and certain US tech companies claim to have some patent coverage of MP3.

It also has another advantage: its decoding delay is usually just over 20ms but can be as low as 5ms. This makes it even better for interactive audio, web, streaming, etc. MP3, AAC, and Ogg Vorbis typically have delays of 100-400 milliseconds, which can make a discernable difference when conversing with someone through online services.

How Well Is Opus Supported?

Opus is supported on most of the latest versions of the leading operating systems. In particular, Linux, Windows, and Android support Opus out of the box. However, iOS and macOS only support Opus in Core Audio Format (.caf) containers by default. Although, on these platforms, you can install a media player such as VLC that supports Opus automatically.

However, if you’re aiming for playback on devices such as CD players and MP3 players, Opus will not be supported at all. In this case, use CD-DA and MP3, respectively.

Understandably, you may not always want to install software to play your music or podcasts. A format is only valuable where it’s supported. While Opus has become a better choice with time, you might find AAC to suit your needs while only taking up a fraction more space.

Apple Audio Coding (AAC) was designed to be a successor to MP3. Besides rare cases where MP3 is supported, and AAC isn’t, AAC should be used instead of MP3. AAC is less well-known than MP3, but it’s supported nearly universally, especially on Apple systems.

How Big Are Opus Audio Files?

How large are Opus files, and how do they compare to alternative audio formats? To give you an idea, we’ve compiled a table of the same music converted to different formats. We used two high-quality FLAC files as the audio source and have converted each using FFmpeg’s defaults.

File Format Encoding Type Music File 1, Size (KB) Music File 2, Size (KB)
Opus Lossy 1 154 2 885
Vorbis Lossy 1 127 3 414
MP3 Lossy 1 356 3 893
AAC Lossy 1 383 3 994
FLAC Lossless 8 391 27 525
WAV Lossless 14 939 42 910

This does not control for some confounding variables. For instance, the Vorbis and Opus files were encoded such that their bitrates were slightly lower than the others, at about 128kbit/s. However, this should give you a general feel for what to expect.

Should You Switch To Opus?

Unless you’re aiming to convert some lossless files (FLAC, ALAC, WAV, etc.) to a lossy format, converting your MP3 or AAC files to Opus usually isn’t a good idea. The space savings aren’t worthwhile unless you’re dealing with long recordings or operating high-bandwidth audio transfer/streaming services.

Transcoding between lossy formats will always incur a loss in quality. However, converting from one lossy encoding to Opus at a lower bitrate may be the best compromise if you need to slim down your audio.

The Smallest Possible Audio File

The technically smallest audio file can be crafted using the raw PCM format. To do so, we’ll need to sidestep the philosophical question of “What’s an audio file?” and settle for “The smallest file a standards-compliant audio player can correctly play without errors.”

Obviously, our audio stream will have to be as small as the codec allows. However, we also need to worry about metadata. Metadata is “data about the data” in the sense that the title, artist, genre, and album photo are metadata that describes the actual audio data stream.

Many formats force a minimal amount of metadata, for example:

  • A “magic” number to identify the file
  • The sample frequency: describing how fast to play the stream
  • The sample depth: representing how many bits are in each sample
  • Et cetera…

Of course, we want to minimize metadata. We’re in luck: some media players support a file of raw (no metadata) audio samples (pulse code modulation or PCM). However, you need to supply some information yourself. For example, with “ffplay -f u8 -ar 44100 -ac 1 file.raw”

What does that incantation mean?

  • “ffplay” is a command-line media player from the FFmpeg Project
  • “-f u8 -ar 44100 -ac 1” specifies a format of 1-byte samples at 44.1kHz on one channel
  • “file.raw” is our file’s name

How few samples can we put in file.raw before ffplay outputs an error? Lo and behold, zero. On Linux, “touch file.raw” creates the zero-byte file. Once ffplay is invoked, it “decodes” the “data” and “plays” without errors. Zero is unbeatable, so there you have it.

Conclusion

Practically speaking, lossy coding is essential if you’re aiming to minimize size. If you want to lower the bitrate, then definitely consider Opus. However, the benefits of one over the other often aren’t massive at a given bitrate, so it’s advisable to pick formats that meet your requirements and is supported on your devices.

REFERENCES

Similar Posts