Tech Tuesday: Audio Codecs Demystified 🔊

1756847328960.png
Welcome to Tech Tuesday! This week, we’re unpacking one of the most misunderstood parts of the audio world: codecs. If you’ve ever wondered why some songs sound amazing and others… not so much, or why your FLAC files won’t play over Bluetooth, this one’s for you.


Whether you’re streaming from your phone, plugging in a USB drive, or building out a home theater with your WiiM setup, understanding codecs helps you get the best sound possible and make the right decisions for your audio.

What Are Audio Codecs?​


Let’s keep it simple: a codec is a way of compressing and decompressing audio. Audio codecs are essentially the "languages" that digital audio files speak. A codec is a combination of the words coder/decoder. It is a device or computer program which encodes or decodes a data stream or signal. In the case of audio, it compresses the file for transmission and decompresses the received files upon playback.

Think of it as a sophisticated filing system that determines how your music is stored, how much space it takes up, and what quality you can expect when you play it back. Some codecs prioritize quality. Others prioritize speed or file size. And some try to balance all three.

Codecs play a huge role in audio since they affect your listening experience. You could be using a very high-end device for streaming music, but ultimately, your experience will depend on several factors, a big one being the codec that has been chosen to process the audio file you're listening to.

The Foundation: Sample Rate, Sample Depth, and Bit Rate​

The quality of an audio file is dependent primarily on three variables: sample rate, sample depth and bit rate. These variables are used when analog audio is converted into digital audio, and affect the overall audio quality. The higher each of these three variables are, the better your audio is going to sound. This also means the data transfer is larger, and so the connection to the source needs to be faster and more reliable.

Sample Rate: Simply put, this is how many times per second the audio is sampled. More samples allow for accurate reproduction of higher frequencies within the audible and inaudible ranges and help prevent aliasing distortion. 44.1kHz is standard for CDs, while 48kHz is common in movies and video. It is measured in samples per second or Hertz (Hz/kHz). The sample rate determines the maximum frequency that can be accurately captured. Higher sample rates can help with technical aspects like filter design and processing headroom, but for most listening situations, standard rates capture all audible frequencies perfectly and modern ADCs and DACs like we use in WiiM devices implement almost perfect filters and vanishingly low noise even at 44.1kHz sample rate.

Sample Depth: Also known as bit depth, sample size, or sample precision, it refers to how precisely each audio sample's amplitude is measured. This determines the dynamic range of the recording which is essentially how quiet a sound can be before it gets lost in the noise floor. 16-bit audio offers about ~96dB of dynamic range, which covers the full range from the quietest sounds humans can hear up to to uncomfortably loud levels. 24-bit audio provides a theoretical ~144dB of dynamic range, offering much more headroom for recording and mixing, though the difference is rarely, if ever, audible in final playback in the home. Higher bit depths are primarily beneficial during recording and production stages.

Bit Rate: This is how much data is processed every second, measured in bits per second (bps or kbps). For uncompressed audio, bit rate is calculated by multiplying sample rate, bit depth, and number of channels. However, for compressed audio formats (like MP3, AAC, or Ogg), bit rate is determined by the compression algorithm and quality settings, independent of the original sample rate and bit depth. Higher bit rates in compressed formats generally mean better sound quality and larger file sizes, while lower bit rates result in smaller files but potential quality loss due to compression artifacts.

1756847414125.png

The Bit Rate, Sample Depth, and Sample Rate all show on a WiiM Ultra or Amp Ultra screen right at the bottom.


Compression Types: The Trade-offs​

There are essentially three kinds of audio compression techniques.

Lossy: These formats shrink the file by cutting out audio data. MP3 and AAC are common here. They save space but lose some sound quality, especially at lower bitrates. Lossy audio involves a high degree of compression but doesn't decompress files back to their original data amount.

Lossless: These compress the file without losing any audio data. FLAC and ALAC are good examples. You get CD-quality sound in a smaller file.

Uncompressed: As in… not compressed, and you guessed it, it doesn’t have any compression at all. WAV and AIFF fall into this group. They sound great, with the same audio as Lossless, but take up a lot more space… about 10MB per minute of audio.

🎯 Why It Matters for WiiM Users​

You could have top-tier speakers, but if your audio file is heavily compressed, you’re not hearing everything. On the flip side, trying to stream a massive WAV file over Bluetooth might cause lag or dropouts.

Knowing your codecs helps you:
  • Pick the right format for your setup
  • Avoid compatibility issues
  • Maximize sound quality without wasting space

Next up, we’ll break down which formats WiiM devices actually support and how to choose the best one for your setup.


Audio Formats Supported by WiiM Devices​

Your WiiM devices are incredibly versatile when it comes to audio format support. Whether you're streaming from a service, playing files off a USB drive, or setting up a multi-room system, knowing what formats work best can save you time and help you get better sound.
Here’s a breakdown of what’s supported and when to use each format.

Lossless Formats​

FLAC (Free Lossless Audio Codec) FLAC compresses audio without sacrificing quality. You get uncompressed audio in a smaller file which works out to be usually about half the size of the same content in WAV format, with 16-bit, 44.1 kHz FLAC files you'll get CD-quality audio. It’s open-source, widely supported, and works across all WiiM devices. FLAC can go up to 32-bit, 96kHz, which is better than CD quality. Perfect for building a high-res library without eating up all your storage.

AIFF (Audio Interchange File Format) AIFF is Apple’s version of uncompressed audio. It’s big, clean, and sounds great. It also supports rich metadata, so you can include album art, song titles, and more. All WiiM devices support AIFF and its compressed variant (.aifc). You can stream these through the WiiM Home app or DLNA.

WAV (Waveform Audio File Format) WAV files are uncompressed and sound exactly like the original recording. They’re large, so not ideal for streaming over weak connections, but perfect for short clips or high-quality playback. Supported across all WiiM devices.

ALAC (Apple Lossless Audio Codec) ALAC is Apple’s version of FLAC. It compresses audio without losing quality and works well in Apple’s ecosystem. WiiM devices support ALAC, so if your library is built in iTunes or Apple Music, you’re good to go.

High-Resolution Audio​


DSD (Direct Stream Digital)
  • Ultra-high-resolution format originally used for SACDs
  • Supported on all WiiM devices except the WiiM Mini
  • WiiM devices convert DSD to PCM (up to 192kHz) for playback
  • Supports both .dsf and .dsd file extensions
  • Note: DSD files are converted to PCM format rather than played natively

Lossy Formats​


MP3 (Moving Picture Experts Group Layer-3 Audio) Still the most common format around. MP3 files are small and compatible with just about everything. WiiM devices support sampling rates from 8kHz to 48kHz and bitrates from 8kbps to 320kbps, including variable bit rate (VBR). At higher bitrates, MP3 sounds pretty good. At lower ones, you’ll notice the drop in quality.

AAC (Advanced Audio Coding) AAC is Apple’s preferred format and is used by Apple Music and YouTube. It’s more efficient than MP3, so you get better sound at the same file size. WiiM devices support AAC across the board.

WMA (Windows Media Audio) WMA is Microsoft’s lossy format. It’s compact and sounds decent, especially over Bluetooth. Not widely supported by streaming services, and not necessarily compatible with Apple devices, but WiiM supports it at 44.1kHz and 48kHz.


Surround Sound and Multi-Channel Audio​


Dolby Digital 5.1​

WiiM Ultra, WiiM Amp Ultra, and WiiM Amp Pro support Dolby Digital 5.1 surround sound, opening up exciting possibilities for home theater setups:
  • Input: Via HDMI ARC and Optical connections
  • Channel support: 5.1 channels (Front Left/Right, Center, Surround Left/Right, plus Subwoofer)
  • Setup: Uses multiple WiiM devices in a multi-room configuration
  • Current limitation: Dolby Digital 5.1 is the only surround format supported (no Dolby Atmos or DTS)
For TV audio, ensure your television is set to output "Dolby Digital" in the audio settings when connected via HDMI ARC or Optical.


Bluetooth Audio Codecs​

WiiM devices support several Bluetooth audio codecs for wireless streaming:

Currently Supported​

  • SBC (Sub-Band Coding): Universal Bluetooth codec, basic quality
  • AAC (Advanced Audio Coding): Better quality, especially with Apple devices
  • LC3 (Low Complexity Communications Codec): Available on WiiM Ultra as part of Bluetooth LE Audio


Playlist Formats​

M3U Playlists​

If you’re using a USB drive, WiiM devices with USB ports (Amp, Amp Pro, Amp Ultra, Ultra) support M3U playlists. Just make sure:
  • The playlist is encoded in UTF-8
  • You use relative file paths, not absolute ones
  • You store the playlist anywhere on the USB drive
  • You include track duration and metadata if you want it to show up
Example M3U format:

Code:
#EXTM3U

#EXTINF:123,Artist 1 - Song 1

song1.mp3

#EXTINF:145,Artist 2 - Song 2

Album1/song2.mp3


Getting the Best Results​

Understanding audio codecs helps you make informed decisions about your music collection and streaming setup. Here are key takeaways:
  1. For archiving CDs: Use FLAC for the perfect balance of quality and file size
  2. For portable devices: MP3 320kbps or AAC 256kbps work well if you’re not as worried about the quality.
  3. For critical listening: Stick to lossless formats and wired connections
  4. For home theater: WiiM Ultra or WiiM Amp Ultra with Dolby Digital 5.1 setups
  5. For streaming: Choose services that match your quality preferences, libraries, and features.

The beauty of WiiM devices lies in their flexibility and customization. They can handle almost any audio format you throw at them while maintaining excellent sound quality. Whether you're a casual listener who wants convenience or an audiophile seeking maximum fidelity, understanding these codec basics will help you get the most from your WiiM ecosystem.


Which Audio Format Is Best For You?​

It has to be said that there is conflicting online information on this topic. And that is probably because there is no right answer to this question. It depends on what you prioritize more. A lossless or uncompressed audio file format is the best format for sound quality. These include FLAC, WAV or AIFF. These types of files are considered "hi-res" because they are equal to or better than CD-quality. The tradeoff is that these files will be very large.

At the end of the day, it is a trade-off you're going to have to make. You have to decide what you value more and in what order:
  • Sound quality: Choose lossless (FLAC, AIFF, WAV) or high-bitrate lossy formats
  • Storage space: Lossy formats like MP3 320kbps or AAC 256kbps offer good quality with reasonable file sizes
  • Download time/Streaming: Lower bitrate files stream faster but with reduced quality

For Bit-Perfect Audio Playback​

  1. Use lossless formats (FLAC, AIFF, WAV) for your music library
  2. Connect via wired connections (HDMI ARC, Optical, Coaxial) when possible
  3. Set fixed volume at 100% and disable EQ when using external DACs
  4. Use USB drives formatted correctly with UTF-8 encoding for playlists

For Convenience vs. Quality Balance​

  1. MP3 320kbps or AAC 256kbps offer excellent quality with reasonable file sizes
  2. FLAC files provide perfect quality with good compression
  3. Streaming services like Qobuz, Amazon Music, and Tidal offer high-quality options

For Surround Sound​

  1. Ensure TV outputs Dolby Digital 5.1 in audio settings
  2. Use HDMI ARC or Optical connections to WiiM Ultra, WiiM Amp Ultra, or Amp Pro
  3. Set up additional WiiM devices for surround channels
  4. Configure through WiiM Home app for proper speaker placement

Streaming Service Compatibility​

Your WiiM devices work with numerous streaming services:
  • Spotify, Apple Music (via Bluetooth/Casting)
  • Amazon Music, Qobuz, Tidal, YouTube Music (native integration)
  • Internet Radio (including custom URL storage)
  • Home Music Share (DLNA from local servers)


Technical Limitations to Know​

📶 Network Stability​

Wi-Fi matters more than you think. Even if your files are high quality, a weak or unstable connection can cause:
  • Dropouts or buffering
  • Lower resolution playback (some services auto-adjust)
  • Sync issues in multi-room setups
📌 Tip: Use 5 or 6GHz Wi-Fi if possible. It’s faster and less crowded than 2.4GHz, especially in apartments or dense neighborhoods.

🔗 Connection Type​

How you connect your WiiM device to your speakers or amp affects sound quality.
Connection Type
Quality Impact
Notes
Optical (TOSLINK)ExcellentSupports up to 24-bit/192kHz PCM. Clean and reliable.
CoaxialExcellentSimilar to optical, but uses electrical signals.
USB DACBestWiiM Ultra supports USB audio out. Great for high-end DACs.
RCA AnalogGoodDepends on the DAC inside your WiiM device. Pro Plus and Ultra have upgraded DACs.
BluetoothVariableDepends on codec (AAC, SBC, LC3). Convenient, but not ideal for critical listening.
HDMI ARCExcellentWiiM Ultra and Amp Ultra support HDMI ARC with Dolby Digital. Great for TV setups.
📌 Tip: If you’re using analog output, check your device’s DAC specs. WiiM Ultra uses the ESS Sabre DAC, which sounds noticeably cleaner than the Mini or Pro.

What's Next?​

Audio codec support continues to evolve with firmware update. Keep an eye on firmware updates and community discussions for the latest developments!




Have questions about specific audio formats or need help optimizing your setup? Join the discussion, fellow users and WiiM team members are always happy to help! Anything missing from this doc, or think it needs clarifications or changes, speak up too!
 
Last edited:
I wanted to try and get a lot of good, easy to understand information put together to help folks without getting too into all the little rabbit holes. I know it doesn't cover every little thing. Don't want to make it so long people won't even read it ;)
IMHO the problem is not simplification (which is IMO very welcome), but the fact that some statements are misleading or even factually incorrect. In addition, the article seems to generically suggest that "more is better", when we know this is not really the case after a point due to limits of human perception. My concern is that this helps perpetuate many anxieties that are common in this hobby (and humans in general) so in practice it might not really help people get the sound quality improvement they are after. It might get them chasing things that make little to no difference in sound quality (like high sample rates or "bit-perfect") instead of things that make a very meaningful difference (like speaker placement and room EQ).

I'll try to highlight a few statements I find the most problematic.

Sample Rate: Simply put, this is how many times per second the audio is sampled. More samples mean more detail. 44.1kHz is standard for CDs, while 48kHz is common in movies. It is measured in samples per second or Hertz (Hz/kHz). Think of it like frame rate in video or animation, more samples mean smoother, more detailed audio.
This is another example of a misleading statement, but one I see thrown around often as the comparison seems quite compelling at first.

However, video frame rate isn't really the best comparison to audio sample rate, given that in audio the sample rate defines the range of audio spectrum that can be recorded/reproduced, while in video frame rate does NOT define the range of the color spectrum that can be contained in the recording.

Increasing audio sample rate means that the captured audio can now contain higher frequencies than what it could with a lower sample rate.

In general, sample rate needs to be at least double than the higher frequency in the recording (to avoid an artifact called "aliasing", which I won't go into here). Sample rates of 44,1kHz or 48kHz are therefore perfectly capable of capturing frequencies up to 20kHz, which is commonly accepted as the upper limit of hearing in young and healthy humans.

Frequencies above 20kHz are collectively called "ultrasound", and this is what can be captured with sample rates higher than 40kHz.

Some people may argue that higher sample rate allow the use of simpler anti-aliasing and reconstruction filters, and use of noise shaping to push quantization noise to inaudible frequencies - which is all indeed true.
However many ADCs and DACs today are designed so well that these are not really as compelling arguments as they once were. Many modern ADCs and DACs implement almost perfect filters and vanishingly low noise even at 44,1kHz sample rate.

To come back to the video comparison - high sample rates in audio mean that the recordings can contain both the audible and ultrasound part of the spectrum, which would be equivalent to video recording containing both visible and ultraviolet part of the spectrum.

In short, there's simply no guarantee that higher sample rates will result in "smoother, more detailed audio".

Sample Depth: Also known as sample size, sample precision, or bit depth, it refers to the quality of a sample. This tells you how much info is captured in each sample. Higher bit depth means richer sound. It’s kind of like going from an 8-bit image to a high-res photo, the higher bit depth means a more accurate representation of the original sound. While sample rate is just a quantitative measure of the number of samples in a second, the sample depth represents the quality of each recorded sample.
Sample (or bit) depth dictates the minimum level of noise in digital audio.

In theoretical best-case scenario 16-bit audio equals about 98dB signal-to-noise ratio (SNR), and 24-bit gives about 146dB SNR. Practical SNR values in best performing DACs today are about 96dB for 16-bit and about 130dB for 24-bit.

On the other hand, under best imaginable conditions human hearing has about 120dB dynamic range; going from the limit of audibility at 0dB SPL (under ideal circumstances - not many room this quiet in the world...), up to the limit of pain at about 120dB.

In practice rooms will have a noise floor significantly higher than 0 dB SPL (let's say 30 dB SPL for a quiet room, see more examples here), and you probably won't try to play peaks above 100-110dB to avoid going deaf quickly.

With some very easy math we find that as low as 70-80dB SNR can be sufficient (in gain and level optimized systems) to make noise inaudible and to allow extremely loud playback at the same time. Of course, not all systems will be fully optimized, so it is good to add 10-20dB of headroom on top.
This brings us to about 100dB SNR, and I hope it illustrates why 16bits is a pretty good standard for bit depth in audio reproduction. :)

The story chsnges a bit when talking about sound recording and processing - this is where higher bit depths can make sense indeed. But it is a different topic that I won't cover here.

Again, the "Higher bit depth means richer sound." statement is IMHO quite misplaced.

Uncompressed: As in… not compressed, and you guessed it, it doesn’t have any compression at all. The sound in the audio file remains the same as it was when the audio was recorded. WAV and AIFF fall into this group. They sound great but take up a lot of space… about 10MB per minute of audio.
Lossless and raw/uncompressed files both contain the 'same audio as it was when it was recorded'. It is IMHO misleading to state this only under uncompressed.

The DAC (digital-to-analog converter) turns your digital files into sound. It’s one of the most important parts of the chain.
It is a bit disheartening to see DACs highlighted as "one of the most important parts of the chain" from a company like WiiM, who obviously know better. :confused: Surely they know that loudspeakers, setup/placement and EQ play several orders of magnitude more important role than DACs when talking about sound quality. I get that products need to be marketed in the best light, but I get really sad seeing misinformation spread like this. :(

There are other parts of the article that I find problematic as well, but I'll stop here. Unfortunately I have to say that the way the article was written screams "gen AI" to me - which might actually help explain some of these statements. It would IMHO be great if people from both technical and marketing teams at WiiM proof-read such articles.

It would really be a shame if official WiiM documentation helps perpetuate long-standing audio myths and misinformation...
 
Last edited:
And when talking about codes, why do the WiiM not always show what codec is used?

In a radio stream we can see the bit rate and resolution but as we cannot see the codec, it's of little use.
 
You're correct, the WiiM Pro, Pro Plus, Amp, Amp Pro, and Ultra all support FLAC playback up to 24-bit/192kHz, assuming the output path (like USB or coaxial) and the connected DAC can handle it. The connections can be a bottleneck though as some DACs and receivers cap out at 96kHz on optical TOSLINK due to hardware limitations or older standards, so make sure everything in the chain supports it for compatibility.

Is there anywhere above you think we should add or update this?
Your initial statement was describing file formats so I think it’s more valid to say that in a WiiM context, FLAC files can be up to 24/192. If you want to mention playback over optical etc , that should be done elsewhere.
 
Sheesh... It is like writing an essay on Grammar addressed to a roomful of grammarians.

It's always easier to find faults than to write the article 🤷‍♂️
:LOL:

But that's the great thing! We've got some really awesome contributors here that really know their stuff. Keeps me honest and helps make sure that the content we share is the best it can be! Maybe I can get some of the experts here to start writing some of their own Tech Tuesdays, I've got lots of ideas and could always use a hand.

I've made some changes and hopefully it's now even better, but please everyone do let me know if you see anything that should be changed! I've removed the section on the DACs as I wasn't even that sure I wanted to include it in the first place. It doesn't really need to be in here when we talk about audio codecs.
 
It is IMHO a very misleading statement, as are a few others from the article.

This one implies that configuring WiiM for bit-perfect playback ensures better sound quality, which is not necessarily the case at all.
E.g. room correction is a fuction that can significantly improve sound quality in most cases when using loudspeakers, but it also makes the system not "bit-perfect" anymore. I'd personally take EQ over "bit-perfect" every time.

IMO "bit-perfect" is a buzzword, and an often misunderstood one at that.
Not a misleading statement. The thread's author simply expressed best practices for bit perfect pipelines when an external DAC is used.
 
Not a misleading statement. The thread's author simply expressed best practices for bit perfect pipelines when an external DAC is used.
It is not misleading anymore, now that the section title was changed - I agree!
 
It is a bit disheartening to see DACs highlighted as "one of the most important parts of the chain" from a company like WiiM, who obviously know better. :confused: Surely they know that loudspeakers, setup/placement and EQ play several orders of magnitude more important role than DACs when talking about sound quality. I get that products need to be marketed in the best light, but I get really sad seeing misinformation spread like this. :(
Just a general observation to add to the excellent commentary above (which I trimmed significantly to avoid reposting what others can read for themselves) -- once you have your stereo system set up to your liking, the biggest factor in sound quality isn't the technical details of the digital file format chosen to store the recording. Rather its what the artist, producer and recording engineer chose to do in the studio when recording, mixing and mastering the recording. Just think of the "loudness wars" that started some years ago and all the CD dynamic range that was absolutely wasted.

Some of the finest recordings I have are standard CD format (16/44.1K) and I can think of a number of hi-rez recordings that are downright mediocre, with a few even poor. Even a MP3 version of an excellent recording can get you 90%, 95% or more of the way to the uncompressed version. The same thing is true of vinyl -- there are some very good recordings out there, lots of mediocre ones, and an unfortunate share of poor ones.

For a while, hi-rez recordings were often better, I think primarily because they were a bit rare and the record labels put a bit of extra effort into them. With hi-rez now common I think many recordings have reverted back to their old habits and the technical advantages of the format are often largely wasted.
 
Back
Top