The Lede: Apple devices are applying Automatic Gain Control (AGC) to my digital audio files, and I don’t know why.
Update: Not that simple. Turns out it is VLC on iOS that is the culprit. See additional notes at the bottom of this post.
Back to the original post: I don’t normally listen to digital music streamed through my iPhone, because a) I won’t go near iTunes, and b) I have a couple of perfectly good USB MP3 players, which I’ve used on cycling outings.
Recently we’ve been ripping our audio CDs to FLAC format and loading them into a NAS from Synology, which provides a DLNA (Universal Plug-n-Play) audio server. It works fine although the available client applications that you can use to listen to the files are just okay. VLC seems pretty good, and it is supported on all our computers (Windows, Linux, Mac) and mobile devices (Android, Apple).
This weekend I did some work in the garden, and because I was within our WiFi zone, I decided to try streaming music from the DLNA server using VLC on my new iPhone, an SE 2020.
It sounded like shit.
Now, Apple did a lot of funky stuff in recent IOS versions (14, 15) involving monitoring playback volumes, and reducing headphone levels if you exceed recommendations. To be clear, I’m not talking about that. That’s a whole other rant. No, I’m talking about Automatic Gain Control, which used to be a thing on tape recorders to limit audio levels hitting the tape, or on playback (sometimes called “dynamic loudness control”).
It was really noticeable on my latest completed project, the Annulus Suite.
Annulus was stitched together in a Cakewalk project and mastered at 14 LUFS in order to retain the dynamics. I thought the end result was pretty good. I exported it to a lossless, compressed format called FLAC using CD-quality 16 bit audio depth. The results were pretty good, and that ‘s the version I uploaded to BandCamp to make available for purchase – the official release, if you like.
So it was very distressing to hear the peaks squashed, and any significant bass pulling the levels down, the dynamics chewed away and spat out. It was being pushed through an audio compressor.
I couldn’t find any obvious documentation about this from Apple (apart from the aforementioned digression about the nanny-state excessive headphone volume control). Where was this effect coming from? Was it the Apple Earbuds? VLC? The iPhone? I did some comparisons, and here are the results:
The FLAC file is located on the Synology NAS, available to stream via DLNA. I used VLC to play the audio file, and recorded the output from various mobile devices via the 3.5mm audio jack, into my ECHO Layla 3G PCI audio interface.
- Track 1 is the FLAC file, directly imported into the project.
- Track 2 is from my Windows 10 laptop running VLC;
- Track 3 is from my iPhone 5c (IOS 9.3.5) running VLC app;
- Track 4 is from my iPad Air 2 (IOS 13.6.1) running VLC app;
- Track 5 is from my iPhone SE 2020 (IOS 15.0.2) running VLC.
Because each device had slightly different levels on the volume control, I normalized each clip for comparison purposes. The Windows playback sounds great and seems unchanged. However I hope it is obvious to you that the Apple devices are severely messing with the dynamic range on playback. I don’t think there is any practical difference between tracks 4 and 5, but it is interesting that the iPhone 5c running the older OS is still clearly affecting the output dynamics, albeit not as badly as the later devices.
I’m going to publish this post now, but I’m not done researching. More as it comes to hand.
Update: A couple of further tests today. Stick to one device, but compare apps. I used VLC, Synology’s DS Audio, and FlacBox:
Each track was recorded from the iPhone SE using the same volume level on the iPhone control (one notch below 100%). Again, I’ve normalized the clips for display comparison.
DS Audio and FlacBox do not apply any AGC to the output. It sounds dynamic and great. So… is it just VLC? VLC has always been my “gold standard” on conventional desktops (Linux, Windows) so it is distressing to find that the mobile version appears to be misbehaving.
Additional Update: This thread on Reddit may have the answer: Does iOS VLC app put a volume maximizer on all audio by default?
There ARE EQ controlls in the iOS app! You have to be in Landscape mode… And guess what? The “Preamp” is above 0db by default and seems to be causing the ducking effect! I lowered the preamp to 0 and my issue is resolved! I’d like to say this is a bug; by default VLC should not be doing any DSP.plutoniumhead, reddit.com/r/VLC
I carefully set the EQ to “Flat” and adjusted the preamp to 0db. The result:
Okay, it worked. There’s much less compression or ducking going on. I won’t say “none” because I can’t tell without extra careful comparison which I can’t be bothered doing. These controls are hard to find; tricky to adjust; and not persistent between songs! This is not a solution; barely even a work-around.
Also, this thread on the Videolan forum shows that there are other folks who have noticed the problem, complained about it, and the “known issue” doesn’t seem to be able to be addressed competently. Yeah, I said it. Even the “fixed in 4.0” comment doesn’t fill me with confidence that the issue has even been identified correctly. This is sad.
Until further notice, I do not recommend using VLC on iOS for audio playback.
Thank you for posting this. I am a lunatic for bit perfect audio playback, I can’t stand to have anything messing with it between the FLAC file and my ears. It’s not just purism, my ears seem to be sensitive to spatial detail, so fiddled-with music sounds “smaller” to me.
I, too had thought VLC to be pretty good about this, once one goes into the settings, but it appears not to be so on iOS. FlacBox, you say?