Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Google Businesses The Internet Media Music

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)."
This discussion has been archived. No new comments can be posted.

Sneaking Past Heavy-Handed Audio Compression on YouTube

Comments Filter:
  • Update (Score:5, Informative)

    by niceone ( 992278 ) * on Sunday July 27, 2008 @03:32PM (#24360407) Journal
    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.
  • Re:This hurts (Score:5, Informative)

    by _xeno_ ( 155264 ) on Sunday July 27, 2008 @03:32PM (#24360411) Homepage Journal

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

  • by PetiePooo ( 606423 ) on Sunday July 27, 2008 @03:42PM (#24360501)

    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)

    by drspliff ( 652992 ) on Sunday July 27, 2008 @03:45PM (#24360535)

    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)

    by AvitarX ( 172628 ) <me@brandywinehund r e d .org> on Sunday July 27, 2008 @03:46PM (#24360541) Journal

    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.

  • by 4D6963 ( 933028 ) on Sunday July 27, 2008 @03:54PM (#24360609)

    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.

  • by Anonymous Coward on Sunday July 27, 2008 @03:59PM (#24360643)

    Read more http://replaygain.hydrogenaudio.org/ [hydrogenaudio.org].

  • Re:Cheap asses (Score:3, Informative)

    by 4D6963 ( 933028 ) on Sunday July 27, 2008 @04:01PM (#24360661)
    And how exactly would that help making smaller files?
  • by Not The Real Me ( 538784 ) on Sunday July 27, 2008 @04:26PM (#24360805)

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

  • by daem0n1x ( 748565 ) on Sunday July 27, 2008 @04:40PM (#24360905)

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

    They do, it's called compression.

  • by jimicus ( 737525 ) on Sunday July 27, 2008 @04:48PM (#24360945)

    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.

  • by billcopc ( 196330 ) <vrillco@yahoo.com> on Sunday July 27, 2008 @04:54PM (#24360999) Homepage

    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)

    by Derling Whirvish ( 636322 ) on Sunday July 27, 2008 @06:08PM (#24361521) Journal
    I measured that KFC tone at 4825 kHz with a spectrum analyzer. It's not very high at all -- certainly not the mosquito tone.
  • by eh2o ( 471262 ) on Sunday July 27, 2008 @06:29PM (#24361643)

    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)

    by account_deleted ( 4530225 ) on Sunday July 27, 2008 @08:45PM (#24362695)
    Comment removed based on user account deletion
  • by olyar ( 591892 ) on Sunday July 27, 2008 @09:44PM (#24363167) Homepage Journal

    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)

    by old and new again ( 985238 ) on Sunday July 27, 2008 @10:19PM (#24363417) Homepage
    see my newest videos, uplaoded this week, as soon as I drop the kick the level jumps 6-10 dB and when the kicks come back it squashes and pumps like a benassi bassline (not in a good way) http://www.youtube.com/profile_videos?user=muzik4machines [youtube.com] compare the newest one (destroyed by youtube) and some older ones where it sounds almost exactly like my original mix (at 22KHz, but still, not squashed) and t does so with the quick uploader as well as the uploaded videos, which is even worse, the quick uploader, i would understand as people uses built in mics and stuff, but my final, mastered HD performance is squashed all life out of it, mono-ified and downsampled to 22, 050 KHz, it's not really an incentive for artists to upload their stuff anymore, it makes you sound liek you don't know how to mix properly (and it does it with the qui
  • by old and new again ( 985238 ) on Sunday July 27, 2008 @10:32PM (#24363499) Homepage
    youtube reencodes any flv now, before you uploaded an flv with a total bitrate under 350kbps and it WASN'T re encoded, thus stereo sound, they re encode EVERYTHING now, even a 100 kbps total flv was re encoded
  • by xjesus ( 231140 ) on Monday July 28, 2008 @12:38AM (#24364225)

    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

  • by MadKeithV ( 102058 ) on Monday July 28, 2008 @03:55AM (#24365271)
    Technically compressors don't raise the level either, they reduce it. It's the make-up gain afterward that raises the level.
  • Re:Update (Score:3, Informative)

    by 4D6963 ( 933028 ) on Monday July 28, 2008 @06:21AM (#24365989)
    Oh that's not the same clipping we're talking about. The clipping we're actually talking about is when sample values get hard-limited, which creates distortions (also referred to as non-linearities because they emerge from having the sound go through a non-linear system, in this case a function that forbids a sample value from exceeding a certain value) and can make even ultra-sounds produce audible distortions, which is one of the two main principles behind the so-called "sound laser".
  • Re:Update (Score:1, Informative)

    by Anonymous Coward on Monday July 28, 2008 @09:18AM (#24367423)

    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.

  • by musanim ( 1334517 ) on Tuesday July 29, 2008 @12:09AM (#24380295) Homepage

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

"Everything should be made as simple as possible, but not simpler." -- Albert Einstein

Working...