Slashdot Mirror


Sneaking Past Heavy-Handed Audio Compression on YouTube

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)."

37 of 234 comments (clear)

  1. Wouldn't it be easier by phantomfive · · Score: 4, Insightful

    Wouldn't it be easier to set your gate correctly? Cut out the background sounds BEFORE submitting to youtube; do proper editing and then it doesn't matter so much what they do. Here, in my opinion, is a good site for all such information.

    --
    Qxe4
    1. Re:Wouldn't it be easier by PetiePooo · · Score: 4, Informative

      Wouldn't it be easier to set your gate 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.

    2. Re:Wouldn't it be easier by 4D6963 · · Score: 3, 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.

      --
      You just got troll'd!
    3. Re:Wouldn't it be easier by Anonymous Coward · · Score: 4, Interesting

      It still matters what they do. This kind of high compression is unsuitable for most material, yet they're insisting on it. Not only does it completely kill the dynamic range - imagine going to see a classical music concert and the entire concert is played at the exact same volume, no crescendos or decrescendos - that lack of dynamic range also dramatically quickens ear fatigue. What they're doing is great if they want people to stop listening (and therefore likely watching) YouTube videos as much. Otherwise, it's a really dumb idea.

      Using a noise gate to solve YouTube's poor decision is not very realistic - that's trying to get thousands and thousands of different people to fix something caused by YouTube trying to solve what wasn't really much of a problem. What's more, noise gate + high compression leads to Charlie Brown Special kinds of voice tracks and very limited musical choices - e.g., in a classical concert, instead of the quiet parts being just as loud as the loud parts, some of the quiet parts will simply be cut to silence. Noise gate + high compression can be cute for a bit in dialogue, and when done to a particular instrument - but not every instrument in a song - you can get some cool effects from it, but it's shitty thing for YouTube to require of people. It may be enough to force some users away.

  2. Re:and who came up with it? by saxoholic · · Score: 4, Interesting

    Well, it starts with the "Loudness War" Record companies/radio stations compete to make everything louder, because the louder the music is coming over the air, the more likely the listener is to notice it. I don't see how that would help youtube though, because we're not listening to youtube in the background like we are to the radio.

  3. Update by niceone · · Score: 5, Informative

    After some more testing it seems that there is a problem with high quality mode. With the tone and sample rate I used (19kHz and 44.1k) at least the high quality encoder whistles at, some other frequency. Sounds like somewhere less than 10kHz to me.

    I hope YouTube fix this soon.

    1. Re:Update by Anonymous Coward · · Score: 5, Interesting

      It looks to me like Google have done this on purpose to stop people uploading high quality audio with a still image. A lot of the music I've been listening too recently has been from youtube, I'm sure I'm not the only one...

    2. Re:Update by Distortions · · Score: 4, Informative

      That is NOT audio compression, that is automatic gain control (AGC). Huge difference. Audio compression makes loud and soft sounds closer to the same volume. Automatic gain control changes the gain based on the current volume ( thats why the hack works! ). In the high quality video I can hear something from the tone he added, it wasn't completely filtered or some harmonic of the tone got through. Still, not a bad hack :)... I wonder if a sub-sonic tone would work. Not only is youtube using AGC, its badly set up AGC. It would be fine if they set the release time higher and kill the response time so it doesn't clip when the volume increases. Or, they could do something even better and use real compression or even a multi-band compressor. Multi-band would be great, it would make the tinny webcam mics sound a lot better by balancing the equalization a bit.

      --
      Talent hits a target no one else can hit; Genius hits a target no one else can see.
  4. Re:This hurts by _xeno_ · · Score: 4, 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.)

    --
    You are in a maze of twisty little relative jumps, all alike.
  5. Just sneak past the entire recompression process? by 4D6963 · · Score: 4, Interesting

    Wouldn't another solution be to sneak past the entire recompression process by submitting a .flv video that meets YouTube's requirements to avoid recompression? Or would the compression on audio (not the same type of compression, the one this article is talking about) still be forced on these?

    By the way to improve the trick, what you could do is detect the envelope of your sound, a modulate your 19 kHz sine with an envelope complementary so that the two envelopes would sum up to a flat line, so your 19 kHz envelope would be f(t) = 1 - original_sound_envelope(t).

    --
    You just got troll'd!
  6. Standards by Dan+East · · Score: 5, Funny

    YouTube is just trying to enforce a standard level of quality to the content. Everyone expects crappy video with lots of compression artifacts, so the audio might as well follow suite.

    --
    Better known as 318230.
  7. Brevity Required by Tablizer · · Score: 5, Funny

    Can someone post an example I could possibly listen to for more than one second?

    No
         

    1. Re:Brevity Required by RealGrouchy · · Score: 5, Funny

      CLICK THUD TICK SSSS No FWWWW CLUNK CLICK

      I'm sorry--what did you say?

      - RG>

      --
      Hey pal, this isn't a pleasantforest, so don't waste my time with pleasantries!
  8. but is filtered out by the encoding process by NovaHorizon · · Score: 3, Interesting

    you mean that high pitched squeal that is driving me nuts in the example more then the audio compression? Yea.. that's filtered out all right...

  9. Re:Ruff ruff! by 4D6963 · · Score: 3, Funny

    Ruff ruff rufff, and ruff rufff, you little bigoted ruff ruff ruffff.

    Translation : I'm ultrasound-deaf, you insensitive clod!

    --
    You just got troll'd!
  10. Re:and who came up with it? by larry+bagina · · Score: 3, Insightful

    youtube is a huge money sink. They probably can't afford to hire people that have experience in audio compression, test different algorithms, etc. As to why... video and sound quality varies a lot, so they probably are trying to make everything more equal, so the viewer doesn't need to adjust their volume for every video.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  11. Re:This hurts by drspliff · · 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.

  12. Warning from ccalam in the second video by Looce · · Score: 5, Interesting

    The high quality version of the audio will have the 19 (or up to 22.1) kHz sine wave you choose to use in your video upload. So this is a trade-off of quality (high-quality = eek!) versus lack of unwanted range compression (low-quality = listenable, for lack of a better word).

    FWIW, I can hear 19 kHz waves. So this trade-off affects me.

    1. Re:Warning from ccalam in the second video by pz · · Score: 3, Interesting

      FWIW, I can hear 19 kHz waves. So this trade-off affects me.

      You won't hear 19 kHz much longer. Seriously, not because of this or any other particular factor (although there are many), but because everyone experiences upper-range hearing loss as they get older, and it starts at an astonishingly early age.

      --

      Put my fist through my alarm clock with its ding-dong death inside my ear. - The Blackjacks.
  13. Nomalization standard? by Waccoon · · Score: 4, Interesting

    It surprises me after all these years, audio formats don't provide recording information about the dynamics of the waveform.

    Cameras write EXIF information into JPEG files, why can't we have something similar for audio so we don't have to adjust the volume all the time?

    You don't have to be an audiophile to appreciate good audio. I have a custom amp next to my computer into which I've plugged headphones. Find anyone with a pair of headphones, and you'll find an amp, too. Either that, or a deaf person who's been tortured by a bad Flash file.

    1. Re:Nomalization standard? by jimicus · · Score: 3, Informative

      There is, in MP3 at least. It's used by mp3gain:

      http://mp3gain.sourceforge.net/faq.php

      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.

  14. Re:Lack of Choices by 4D6963 · · Score: 3, Funny

    It would be nice if YouTube offered some choices, such as volume adjustment

    Yeah, I mean, who on YouTube would even think of abusing that?

    --
    You just got troll'd!
  15. Re:and who came up with it? by Anonymous Coward · · Score: 5, Funny

    I have to keep jacking the knob up and down.

    To YouTube videos? Sicko!

  16. Re:and who came up with it? by mdmkolbe · · Score: 5, Insightful

    I don't think YouTube is trying to run a loudness war, but rather trying to fix up a lot of amateurish recordings that are uploaded with bad audio. I can't tell you how many recordings on the net are either way to quiet (e.g. I can't hear speech even at max volume) or too loud and that change in mid-video (e.g. person walks away from or closer to mic). Despite their good intentions, though, it seems to have fallen prey to the "Clippy" effect.

    What YouTube needs to do is have a little check-box on uploads that indicates whether to apply the auto-balance. And in case an uploader asks for no auto-balance when they really shouldn't (e.g. they think they know but don't) there should be a side link to listen to the auto-balanced version.

  17. Re:and who came up with it? by MightyYar · · Score: 4, Funny

    To YouTube videos? Sicko!

    What can I say? Unrehearsed rants into webcams really turn me on...

    --
    W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  18. Teen Buzz/Mosquito Ringtone by Looce · · Score: 3, Interesting

    I have indeed heard of such deterioration on the Teen Buzz website (which is currently down for excessive bandwidth usage?) - but this page describes it as well.

    Those little annoying sine-wave sounds are also used by TV advertisers such as Kentucky Fried Chicken to grab teens' attention if adults are not their market. (For the record, if you can't hear the tone, it sounds off when the KFC bucket shows up.)

  19. Re:and who came up with it? by daem0n1x · · Score: 3, Insightful

    I guess they are trying to compensate for the huge differences between recording quality in the videos people submit. Some are loud enough, others are very low and you have to turn the level way up to understand what people are saying.
    They could simply normalise the level, but if you have a speech with very low level and the guy drops the microphone in the middle, that one peak is so loud that will make the normalisation process useless.
    But compression is such a complex and subjective issue that it should be performed by hand. I guess they have an automated process for that, and it doesn't have any intelligence, just steamrolls all the audio it finds, whether it's speech, music, or anything else.

  20. Re:and who came up with it? by daem0n1x · · Score: 3, Informative

    they could have the volume knob (optionally) adjust to the appropriate volume for a given video.

    They do, it's called compression.

  21. Re:and who came up with it? by billcopc · · 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!

    --
    -Billco, Fnarg.com
  22. Re:and who came up with it? by billcopc · · Score: 5, Funny

    But what if you move away from the mic to breathe ?

    Chocolate Rain
    *whoooosh*
    Youtube makes my breathing loud again
    Chocolate Rain
    *whoooosh*
    My eardrums are whimpering in pain

    --
    -Billco, Fnarg.com
  23. Re:and who came up with it? by anotherone · · Score: 3, Insightful

    The typical youtube uploader can't even manage to tag their videos properly. Giving them MORE options is just dangerous.

    --
    Username taken, please choose another one.
  24. Re:and who came up with it? by archeopterix · · Score: 5, Funny

    This is just in. Studies have shown that on a popular site named Slashdot LOUD COMMENTS ARE MODERATED BETTER THAN QUIET ONES!!!

  25. Recording vs Processing by rueger · · Score: 3, Insightful

    Although I tend to think that Dan East summed it up best, I feel the need to point out that 95% of bad YouTube audio is the result of lousy recording quality, not subsequent processing.

    Garbage In, Garbage Out.

    The mics and electronics on most consumer camcorders (or that most people use with their Macs and PCs) are just plain crappy, and shouldn't be relied on for anything that you hope to distribute. And of course, some actual audio recording skills help too.

  26. Re:and who came up with it? by eh2o · · Score: 4, 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.

  27. Re:and who came up with it? by Anonymous Coward · · Score: 4, Interesting

    WPLJ 95.5 in NYC knew this very well back in the 70's they' use massive audio compression to keep the modulation index of the carrier at 95.5%... That needle just say there!

    My station WDJF 107.9 Westport CT cared about audio quality. The MI followed the full amplitude of the source audio. Fed by 2 channels of full 15 khz equalized ma-bell-telco pairs. We sounded good! But PLJ was much much louder.

  28. Re:and who came up with it? by X0563511 · · Score: 4, Insightful

    Then hide the options. You don't protect the idiot by rubber-coating all the corners in the room, you protect them by putting the knives out of reach.

    --
    For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
  29. Re:and who came up with it? by MadKeithV · · Score: 4, Informative

    Technically compressors don't raise the level either, they reduce it. It's the make-up gain afterward that raises the level.