Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Difference between sound played on YouTube+same song extracted to MP4? (Read 16466 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Difference between sound played on YouTube+same song extracted to MP4?

Hello,

I have an impression, that a sound track extracted from MP4 file, downloaded from YouTube sounds different, than original material, played on-line from YouTube.

What I do in details:

1) I'm downloading a MP4 file from YouTube (as you know it's possible by e.g FireBug plugin for Firefox browser)

2) I'm playing the downloaded file with Winamp (equalizer is disabled) and I'm hearing difference comparing to the same file, played with YT and Adobe Flash Player

It's hard to explain what is this difference, but the sound in YT has higher dynamics - this played from hard drive is more "flat"... I can obtain similar effects in Windows, using preamplifier in Winamp (+2 dB), but it isn't a smart solution...

It looks like YouTube uses kind of sound optimalization or sound boosting, but I really don't know.

What do you think? What can be be a reason for such difference in sound, or maybe it's just an impression?

Thank you for your help.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #1
Firstly, claims about subjective sound quality are not reliable or useful to other people if they do not have the means to test it, or some evidence (e.g. results from an ABX test) that you genuinely hear these differences – in other words, that you are not just getting, as you said, an “impression” that they are different, due to knowing which is which as you compare them.

Secondly, I don’t know how the mentioned software works, so this may not be applicable, but it’s possible that it transcodes the original FLV, MP4, etc. file to an MP4 audio track rather than simply extracting it; this would further degrade the quality and could, in theory, explain some of the perceived differences if they are indeed genuine.

I personally highly doubt YouTube applies any effects in real-time, but I have no knowledge either way.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #2
It's hard to explain what is this difference, but the sound in YT has higher dynamics - this played from hard drive is more "flat"... I can obtain similar effects in Windows, using preamplifier in Winamp (+2 dB), but it isn't a smart solution...


I was always suspecting that on contrary, youtube apply some loudness compression.
I'm thinking you just  enjoy higher volume.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #3
I checked this with a vevo music video (720p) and could not find differences between the audio extracted from the mp4 and audio recorded from the video being played through flash player.
"I hear it when I see it."

Difference between sound played on YouTube+same song extracted to MP4?

Reply #4
It's hard to explain what is this difference, but the sound in YT has higher dynamics - this played from hard drive is more "flat"... I can obtain similar effects in Windows, using preamplifier in Winamp (+2 dB), but it isn't a smart solution...
On the contrary, level matching in order to make a fair comparison is the smart solution.  Unfortunately it doesn't appear that your comparison was double-blind and as such your subjective evaluation is useless.

I was always suspecting that on contrary, youtube apply some loudness compression.
Given the post immediately following yours I hope you no longer suspect this.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #5
I'm thinking you just  enjoy higher volume.


Sounds likely.


However, you get different audio streams with different quality settings. AFAIK you can get both MP3, OGG and various AAC streams at – at least sometimes – distinct bitrates. Some exceeding 150, some merely the half of that, and that difference could very well be audible.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #6
Ogg? I assumed everything was MP4 or maybe MP3, muxed in a FLV or MP4 container depending on YouTube’s whim (I haven’t found a consistent pattern).

Anyway, for the purpose of comparison against whichever method the OP is using, the best way to rip audio from YouTube is to acquire highest-quality version of the stream and extract the original audio as-is. I shan’t be going into any detail about how that is done, for reasons that I presume are obvious.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #7
Ogg?


Argh. Vorbis it should be, in WebM: http://www.youtube.com/html5 .


Anyway, for the purpose of comparison against whichever method the OP is using, the best way to rip audio from YouTube is to acquire highest-quality version of the stream and extract the original audio as-is.


The highest-bitrate AAC need not be in the same stream as the highest H264. Not sure if I can reproduce the case though.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #8
However, you get different audio streams with different quality settings. AFAIK you can get both MP3, OGG and various AAC streams at – at least sometimes – distinct bitrates. Some exceeding 150, some merely the half of that, and that difference could very well be audible.

There's a table in Wikipedia article: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #9
However, you get different audio streams with different quality settings. AFAIK you can get both MP3, OGG and various AAC streams at – at least sometimes – distinct bitrates. Some exceeding 150, some merely the half of that, and that difference could very well be audible.

There's a table in Wikipedia article: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs.


Thanks a lot. That one contradicts what I said, so I dug up a couple of suspects and tested.  I did not find any for which audio size and video size were disconcordant, so I may have been wrong about that, but I certainly found a video where the rates are far from the Wikipedia article.

Results, one December 2010 Youtube video (picked by suspicion, not by random!), downloaded in multiple versions (repeated with another downloading utility, bitcompared and verified identical, to ensure utility did not transcode):

FLV-360 and FLV-480 both have AAC@96.  That contradicts the Wikipedia article's claim of AAC@128.
MP4-360 has AAC@111 according to fb2k. That contradicts the Wikipedia article's claim of AAC@96.

As for the video streams, the Wikipedia source states that the 360's should be identical and the FLV-480 sixty to hundred percent above. I reencapsulated the video streams in MP4 containers, and report merely file size-based calculations:

FLV-360: 10398*8 kilobits / 349 seconds = 238 kilobits/second (half of the Wikipedia figure)
FLV-480: 16732*8 kilobits / 349 seconds = 384 kilobits/second (half of the Wikipedia minimum figure)
MP4-360: 19326*8 kilobits / 349 seconds = 443 kilobits/second (somewhat smaller than the Wikipedia figure)



Difference between sound played on YouTube+same song extracted to MP4?

Reply #10
Does this help...
[attachment=7423:freemake.gif]
...different source videos are available in a different range of formats, though as of this morning I only seem to be able to find AAC audio. I'm sure different audio formats have been muxed in, even recently.

It sounds like the OP is just hearing a volume difference, if anything. However, I am not sure why anyone would assume that a flash based player creates a bit-identical result to a stand-alone software media player, especially when video is involved too.

Cheers,
David.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #11
LOL, WebM is showing AAC as audio....

Difference between sound played on YouTube+same song extracted to MP4?

Reply #12
However, I am not sure why anyone would assume that a flash based player creates a bit-identical result to a stand-alone software media player, especially when video is involved too.
It is quite logical to assume that a Flash-based player at 100% will output the same audio – caveat: if the same decoding library is used, otherwise possibly slightly different but still perceptually equivalent audio – from a video as would an OS-native player from the isolated audio of that same video. Surely we’re beyond the time when spurious differences could be excused by the concurrent decoding of the video? It’s not that intensive. Perhaps I’ve misunderstood what you mean.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #13
The downloading tools are just pretending to be Flash/WebM clients like in your browser; YouTube doesn't know the difference, otherwise it wouldn't let you download. So how would YouTube be delivering different audio? The answer is it's not. Whatever differences exist, if any, must be in the playback mechanism.

As others have suggested, you're most likely hearing a volume level difference.

Are you using Windows Vista or newer? If so, you may also be hearing noise from poor sample rate conversion when you play the video in your browser:
Quote
A fault in the MME WaveIn/WaveOut emulation was introduced in Windows Vista: if sample rate conversion is needed, audible noise is sometimes introduced, such as when playing audio in a web browser that uses these APIs. This is because the internal resampler, which is no longer configurable, defaults to linear interpolation, which was the lowest-quality conversion mode that could be set in previous versions of Windows. The resampler can be set to a high-quality mode via a hotfix for Windows 7 and Windows Server 2008 only. [sample rate conversion info]; [bug & hotfix discussion]

The noise from the bad sample rate conversion would be something more akin to "ringing" or "fuzziness", though, not the "higher dynamics" you describe.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #14
However, I am not sure why anyone would assume that a flash based player creates a bit-identical result to a stand-alone software media player, especially when video is involved too.
It is quite logical to assume that a Flash-based player at 100% will output the same audio


... if it is playing the same audio. Since there are multiple versions available, then your browser could choose a different format with a different audio stream to play, than the one you rip to file. (I would even suspect Google to probe your connection speed first and then choose which version to hand to the browser.) So if you are comparing a 64 kilobits stream to a 187 file, the differences could be more than audible, especially if they both were uploaded lossy.


(Hypothetically speaking. In the OP's actual situation, my money is on the volume knob.)

Difference between sound played on YouTube+same song extracted to MP4?

Reply #15
I’m inclined to agree that the perception of increased dynamics is really just a misinterpretation of the overall increased volume*. As well as the tendency for louder signals (to a point) to be interpreted as sounding better in tests of preference, I suppose the dynamics would be increased in absolute terms if the same signal was played back at a louder overall volume, so that might also be relevant psychoacoustically.

Edit: *assuming that was indeed present for some reason when comparing the video playing on YouTube to the same audio played separately

Difference between sound played on YouTube+same song extracted to MP4?

Reply #16
Thank you for your replies and sorry for my late reply - I was a little busy yesterday.

I see that I didn't precise enough several issues, so before I'll reply to your posts I'd like to add some details:

1) My volume YouTube slider is adjusted to 100%. I also have my Windows volume slider and my player slider adjusted to 100%.
2) I'm not using any external software to download video from YT - I'm doing it manually, so I'm 100% sure that it's not transcoded. I'm using FireBug plugin for FF browser for tracking YT requests to the file.
3) I'm 100% sure that I'm comparing two identical files. In YT I'm clicking settings (rack icon) and I'm choosing the best available quality (e.g 720px HD). I'm downloading MP4 file to my hard drive. This is info about the file from Media Info: 1280*720 px (16:9) video, AAC (LC) audio, 149 Kbps, 44,1 KHz, two channels.
4) To avoid transcoding  suspicion, I'm not extracting any audio from MP4 container. I'm playing the sound directly from MP4 container.
5) For comparing I use AIMP3 player for playing downloaded file.

Currently I have four hypothesis about the reason of my problem:
1) It's just an impression or suggestion, because I know which file is which.
2) YT uses kind of sound processing (equalizer, preamplifier - whatever) what can be hear as volume/dynamics increase.
3) Windows 7 uses worse sound interface, than YT (I think about DirectSound vs. WASAPI Exclusive vs. ASIO and sampling delay)
4) As I read here, Adobe Flash Player has changed its sound playing interface last times to Core Audio API to bypass Windows Mixer and ensure the best sound quality by reducing sampling delays in sound card.

I'm posting my short replies to your replies below.

Quote
Firstly, claims about subjective sound quality are not reliable or useful to other people if they do not have the means to test it, or some evidence (e.g. results from an ABX test) that you genuinely hear these differences – in other words, that you are not just getting, as you said, an “impression” that they are different, due to knowing which is which as you compare them.


You are right, but it's impossible to do e.g ABX Foobar test between on-line streamed file and locally stored file (as I know).

Quote
Secondly, I don’t know how the mentioned software works, so this may not be applicable, but it’s possible that it transcodes the original FLV, MP4, etc. file to an MP4 audio track rather than simply extracting it; this would further degrade the quality and could, in theory, explain some of the perceived differences if they are indeed genuine.


I'm absolutely sure that I downloaded not transcoded file. I don't trust external applications or web browser plugins and I extracted download link directly, tracking YT communication with FireBug.

Quote
I was always suspecting that on contrary, youtube apply some loudness compression.
I'm thinking you just enjoy higher volume.


It's one of my theory, but I can't understand how YT can do that? The volume slider in YT is adjusted to 100% and also my Windows and player volume sliders are in he same position... YT would use equalizer or preamplifier as I said before.

Quote
However, you get different audio streams with different quality settings. AFAIK you can get both MP3, OGG and various AAC streams at – at least sometimes – distinct bitrates. Some exceeding 150, some merely the half of that, and that difference could very well be audible.


I know about it and I'm 100% sure that I play two exactly the same files. I was very careful and took my attention to download the file with the same coding parameters as it streamed on-line.

Quote
I am not sure why anyone would assume that a flash based player creates a bit-identical result to a stand-alone software media player, especially when video is involved too.


Quote
Whatever differences exist, if any, must be in the playback mechanism.


IMO it's correct and it's connected with my third theory about the reason.

Quote
Are you using Windows Vista or newer? If so, you may also be hearing noise from poor sample rate conversion when you play the video in your browser


Yes. I'm using Windows 7 Professional 64 bit. I think that it can't be a real reason. In my opinion, the music on YT sounds better, not worse.

Quote
... if it is playing the same audio. Since there are multiple versions available, then your browser could choose a different format with a different audio stream to play, than the one you rip to file. (I would even suspect Google to probe your connection speed first and then choose which version to hand to the browser.) So if you are comparing a 64 kilobits stream to a 187 file, the differences could be more than audible, especially if they both were uploaded lossy.


Yes. I'm 100% sure that I'm playing the same audio with the same bitrate and format and that it's not transcoded.

Quote
I suppose the dynamics would be increased in absolute terms if the same signal was played back at a louder overall volume, so that might also be relevant psychoacoustically.


Interesting conception and sounds good, but how we can measure it objectively?



Difference between sound played on YouTube+same song extracted to MP4?

Reply #17
You are right, but it's impossible to do e.g ABX Foobar test between on-line streamed file and locally stored file (as I know).
Sure, and my point was less that you should provide results here and more that you might well be imagining the difference and cannot say for sure without such testing (even if it is not feasible). Still, it could be arranged if the need/curiousity/whatever were great enough.

You already acknowledged the possibility that your perceptions are altered by expectation bias. As for the other possible factors you mentioned, they’re all very fair. It may be worth doing some more investigation to get clearer answers about those, but it depends how much you’re worried about whether the difference is really there.  I would say that the potential technical reasons are worthiest of most investigation first, or at least, that’s how I would proceed.

Quote
Quote
I suppose the dynamics would be increased in absolute terms if the same signal was played back at a louder overall volume, so that might also be relevant psychoacoustically.
Interesting conception and sounds good, but how we can measure it objectively?
Heh. It’s simple maths! Take one stream, attenuate it to 50%, and the difference between the lowest and highest samples is reduced by 50%. I confess to having no idea of how psychoacoustics plays into it, which is why I said “suppose”; it was just an bit of idle speculation, really, and a simplistic one at that.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #18
I ask my friend for help in doing my ABX test and I was able to distinguish the file downloaded from YT and played on-line with 90% probability... He also hears a difference. Here is the one of our testing video:

https://www.youtube.com/watch?v=Dc2vddPTeoI

And what do you hear? Please take to consideration especially a vocal parts.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #19
ok,
from my hard drive the track "gravity of love" from enigma  has a dynamic range of 8 (according to the dynamic range meter (using foo_dynamic-range).

Now if I  rip the audio from the official vevo video , I  measure a DR  of 9.
This video: http://www.youtube.com/watch?v=aSTV99Uy8hk

Now if If  take audio, from a  a video (containing same  audio track) , uploaded by a user, I  measure a DR  of 7 .
This video: http://www.youtube.com/watch?v=l4PUoHV1PsA

The ultimate test, would to upload your own video, and test the difference, but I  don't have the patience for this.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #20
Thank you for your effort. As I understand, you did your tests for three different files, stored locally (with foobar). In my case, I think about difference between two exactly the same files: one stored locally and one streamed online. Currently I am looking for program, similar to foobar plugin, which can measure track dynamic range direct on sound card output.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #21
Quote
ok,
from my hard drive the track "gravity of love" from enigma has a dynamic range of 8 (according to the dynamic range meter (using foo_dynamic-range).

Now if I rip the audio from the official vevo video , I measure a DR of 9.
This video: http://www.youtube.com/watch?v=aSTV99Uy8hk

Now if If take audio, from a a video (containing same audio track) , uploaded by a user, I measure a DR of 7 .
This video: http://www.youtube.com/watch?v=l4PUoHV1PsA

The ultimate test, would to upload your own video, and test the difference, but I don't have the patience for this.


All from different sources...
So many things can can affect the audio. I can think of:
- Different masterings
- Different lossy codecs used
- Lossy-to-lossy transcoding (And you don't know if the user already has done something stupid like that before uploading it to Youtube...)

Quote
I ask my friend for help in doing my ABX test and I was able to distinguish the file downloaded from YT and played on-line with 90% probability... He also hears a difference. Here is the one of our testing video:

https://www.youtube.com/watch?v=Dc2vddPTeoI

And what do you hear? Please take to consideration especially a vocal parts.

I don't understand. Did you compare the extracted audio stream from the same video? There won't be any difference unless the player does something to the audio before playing it back.

EDIT: You could open up Fiddler2 and watch the video and when it is done Right click the HTTP response in Fiddler that contains the video and click Save -> Response -> Response Body...
That should give you the exact file what you watched on Youtube. There is not way that the audio stream would be different from what you listened to on Youtube.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #22
I don't understand. Did you compare the extracted audio stream from the same video? There won't be any difference unless the player does something to the audio before playing it back.


It's correct. I (and not only me) hear a difference between two exactly same files, played with AIMP3 and on-line (Adobe Flash Player). It's also a little confusing for me, because these files have exactly the same coding parameters. Now I'm trying to discover YT secret - what is the reason of such behavior? And it's also truth (I think) that YT has to use an equalizer during playing the track. It's only supposition  obviously. The main question: how to confirm/refuse it?

From theoretical point of view it will be the best to track samples (one by one), played by the sound card in two cases, but it requires watching at very low level of hardware and maybe hard to do.

EDIT:
Quote
EDIT: You could open up Fiddler2 and watch the video and when it is done Right click the HTTP response in Fiddler that contains the video and click Save -> Response -> Response Body...
That should give you the exact file what you watched on Youtube. There is not way that the audio stream would be different from what you listened to on Youtube.


It is very similar (if not the same), as method used by me (using FireBug web tracking plugin for Firefox), but I'll try to test it off course. Thank you.

Difference between sound played on YouTube+same song extracted to MP4?

Reply #23
Are you sure that AIMP3 plays the file correctly? What version do you use, what setting? playback options?