Sneaking Past Heavy-Handed Audio Compression on YouTube 234
niceone writes "Recently YouTube seems to have started applying extreme compression
to the audio of uploaded clips. This is the type of compressions used
by radio stations to make everything louder, but in this case applied
extremely badly. In quiet passages, breathing and shuffling become
overpoweringly loud. A gently plucked guitar chord becomes a distorted thud.
Listen to an example here. And here's what it could sound like — still not perfect, but a whole lot better. The
fixed version is thanks to a workaround proposed by
Sopranoguitar — the idea is to turn down the audio and mix in
a high frequency sine wave (I used 19kHz). The sine wave fools YouTube's
compressor into thinking that the file is at a uniform level (and does
not need the volume changing at all) but is filtered out by the encoding
process (so, no need to worry about deafening any dogs)."
Update (Score:5, Informative)
I hope YouTube fix this soon.
Re:This hurts (Score:5, Informative)
Sure, how about the given example? One second is really all you need.
In the heavily compressed one, you hear an annoying hiss and the sound of the microphone being moved for the first few seconds.
In the non-heavily compressed one, you don't.
That's really the complete example without having to listen to the song. Really, the first few seconds are the best example, because Google is apparently amplifying almost complete silence to noise. The song part really doesn't help much. (Or at least, as much as I was willing to listen to it, which was only a few seconds.)
Re:Wouldn't it be easier (Score:4, Informative)
Wouldn't it be easier to set your gate [wikipedia.org] correctly?
That would apparently help, but only in cutting out the quiet scrapes and shuffles before the actual (attempt at) music starts. During that silent period, YouTube's encoder would be cranking up the gain so much that, when the first guitar pluck occured, it would still be a highly clipped thud. This workaround keeps them from adjusting the gain at all.
In other words, prefiltering your audio stream with a gate would quiet down the quiet parts, but would not prevent YouTube's encoder from fiddling with the gain.
Re:This hurts (Score:5, Informative)
The worst examples I've seen have been videos of a lecture/speech, and while the main speaker has a microphone it also picks up sound from around the auditorium or lecture hall.
Normally this is fine as we have all become accustomed to faint background noise, with this extreme compression the faintest cough or shuffling in the audience sounds is as loud as the person speaking and is thus very distracting.
Considering most of the lectures I view are 30+ minutes long this really pisses me off.
Re:Compression (Score:2, Informative)
I don't know about the practicality, but I read a tutorial of running all of your sound (In Linux) through Jackd.
You could then run your applications through the jack rack and tweak it however you wanted.
Re:Wouldn't it be easier (Score:4, Informative)
During that silent period, YouTube's encoder would be cranking up the gain so much that, when the first guitar pluck occured, it would still be a highly clipped thud.
Well actually it really depends. It depends whether it's audio compression, or volume normalisation. If it's audio compression then things get amplified regardless of chronology, and therefore if you remove the ambient noise it won't get amplified to an audible hiss and it won't have a negative effect on anything else.
However what you were thinking about is "volume normalisation". In that case a quick change if volume would have the effect you described. I'm not sure which it is in this case but from the summary it looks like it's audio compression.
By the way, noise gating? There are more sophisticated things these days for that, like stuff based on STFTs and noise profiling.
It's called ReplayGain (Score:2, Informative)
Read more http://replaygain.hydrogenaudio.org/ [hydrogenaudio.org].
Re:Cheap asses (Score:3, Informative)
Re:Just sneak past the entire recompression proces (Score:3, Informative)
"...Wouldn't another solution be to sneak past the entire recompression process by submitting a .flv video..."
Last time I submitted a video, about six to eight months ago, Youtube did not accept .flv or .swf formats, even though that is the format that they use to stream. Youtube wanted mpg, divx or mov formats. That sucked because my original was done in swf. First I had to convert the swf to divx which I uploaded to Youtube. Converting from swf to divx resulted in a big quality degradation. Youtube then converted the divx back to flv which resulted in a second quality degradation with the audio being completely out of sync with the video.
Re:and who came up with it? (Score:4, Informative)
they could have the volume knob (optionally) adjust to the appropriate volume for a given video.
They do, it's called compression.
Re:Nomalization standard? (Score:4, Informative)
There is, in MP3 at least. It's used by mp3gain:
http://mp3gain.sourceforge.net/faq.php [sourceforge.net]
However, not all audio players support it. I'm pretty sure the iPod doesn't, nor does iTunes. (For some reason iTunes does have a "normalise levels on all selected tunes" option but that works by decoding/re-encoding the audio, which is a lot slower because in addition to the audio analysis you have to re-encode the file and is likely to introduce further interference to the stream).
Having said that, I've only got a fourth gen ipod. For all I know, more recent models do make use of this tag and furthermore, for all I know if iTunes knows that it's being synced with an ipod which does support the tag then that's what it uses to adjust the gain.
Re:and who came up with it? (Score:5, Informative)
Louder is one thing, compression is another.
Compression can help bring out the faint natural harmonics in a sound, making it "warmer", not unlike an overdriven tube amp. These harmonics are like ear candy to most people, subliminally making the sound more enjoyable.
Radio stations do it for various reasons, one is it helps them sustain peak output power. Another is that the average radio is a cheap chinese gadget that sounds like liquid ass, so the compression actually helps with the sound quality on those devices. When you also consider where radio is often heard, e.g. malls, outdoor venues, cube offices, you realize these are all substandard listening environments where high dynamic range really means you lose half the sound, so the compression again helps with perceived quality by driving most of the content above the noise threshold.
There are plenty of good reasons for sound compression, but its use should be toggled by the user, and for the love of god, give it some sane thresholds! For most content, anything above 4x compression is overkill!
KFC tone is 4825 kHz (Score:3, Informative)
Re:and who came up with it? (Score:5, Informative)
Compression can help bring out the faint natural harmonics in a sound
Only a multiband compressor can do this, otherwise it just raises the level of all harmonics by the same amount.
If the one on YT is fooled by a 19khz sinewave then its single band compressor.
3:1 compression is usually considered the upper limit for practical purposes. Most people do prefer a small amount of compression.
Comment removed (Score:4, Informative)
Re:and who came up with it? (Score:3, Informative)
You're not the only one wondering. Investors are as well. Found this story called Youtube Ads Underperforming [paidcontent.org]
Re:This hurts (Score:2, Informative)
Re:Just sneak past the entire recompression proces (Score:2, Informative)
Although a form of compression... (Score:2, Informative)
The more common term for this type of audio processing is referred to as AGC or Automatic Gain Control. A good number of camcorders have this built in already. It sounds like the issue with the youtube implementation is that the max gain allowed is just too much and the attack rate (for gaining up) is way too fast. Artistically they should allow you to turn it off or adjust the parameters, otherwise they just made all new music on the site sound bad.
Classic compression, on the other hand, is when the loud stuff is made quieter but the quiet stuff stays quiet. If you plot an input level vs output level you get a 'knee' where the threshold for compression begins. The angle of the knee is determined by the ratio of compression.
AGC is like someone has the volume knob and cranks it up so that you can always hear something regardless of the content. Usually there are minimum thresholds and max gain settings to go along with this to adjust issues such as these.
Normalizing is yet another technique which requires non-realtime analysis of the entire piece to determine and set a single gain setting for the entire file; a sort of best fit gain.
And from the more complex end, there's Dolby Volume which incorporates several of the above features with their own 'special sauce' in an attempt to provide uniform listening levels between sources and content. I haven't heard it yet to know if it is any good.
-david
Re:and who came up with it? (Score:5, Informative)
Re:Update (Score:3, Informative)
Re:Update (Score:1, Informative)
AGC and compression are the same thing.
Your definition: "Audio compression makes loud and soft sounds closer to the same volume. Automatic gain control changes the gain based on the current volume"
does not make any sense. You have just said the same thing twice.
Re:Warning from ccalam in the second video (Score:2, Informative)
The high quality version of the audio will have the 19 (or up to 22.1) kHz sine wave ...
Actually not; it gets filtered out by YouTube's compression algorithm. Here's a demo video with spectrograms showing the audio before upload and as received from YouTube (after compression) [youtube.com]; you'll see that the sine tone is completely removed (though there are other distortion artifacts that are not).