VOGONS

Common searches


First post, by xjas

User metadata
Rank l33t
Rank
l33t

Lately it seems like most Youtube videos get murdered by bad compression/encoding. I'm not sure when this started happening, but I've really noticed it over the last year or so. Back in 2015-16, I mostly watched at 480p because I have pretty slow internet and thought that was "good enough." 720p encoding looked almost "transparent". These days it seems like 720 looks like 360p used to, and 480p is unwatchably bad.

Here's a good example at 720p. It looks awful. Watch the host's fingers when he moves his hands around or the wrinkles on his shirt, and check out the "less than smooth" color gradients on the shirt & animations.
https://www.youtube.com/watch?v=72cM_E6bsOs

(And let's not even start on what's been happening to the audio quality... Overcompression, brickwall limiting & nasty clipping, wildly-varying volume levels between identically-recorded vids & even audible "breathing" within a vid... that's another topic.)

This really sucks, as my internet isn't fast enough to stream 1080p, and I mainly watch on a 1280x1024 monitor anyway. I'd much rather have better-encoded 720p than over-compressed 1080p.

TBH with the amount of bandwidth they must chew through, I have a hard time understanding how YT is profitable at all. If they weren't owned by Google, I'd be wondering if they were slashing bitrates as a desperation move to stay afloat (see: Soundcloud.) The cost savings must be huge.

Anyone know what they did/when they made the change? Tell me I'm not going mad here.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 2 of 11, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie

Youtube routinely recompresses content with revised codecs, and they're surely dialing down bitrates in tandem with improvements in compression.
Youtube will also try to negotiate the most bandwidth-efficient codec with your browser; currently this is VP9 video and Opus audio (assuming those streams are available).
While these deliver better quality versus h264 and AAC, some people report better video quality with h264.

To see what codec you're using, right click inside the video frame and select 'stats for nerds':

Codecs: vp09.00.51.08.01.01.01.01 (247) / mp4a.40.2 (140)

To force h264, use the h264ify plugin (available for Chrome and Firefox).

Another issues is the source content itself: more people are shooting videos with cell phones which have small sensor planes (despite high pixel counts), and phone developers do lots of tricks in software (such as averaging across the time domain) when they detect higher noise in the pixels. So this can appear as motion blur. For example, you can tell his fingers are likely motion-blurred in the original content.

Regarding audio, youtube at most will apply a peak normalization reported as a gain in dB in the stats for nerds - but won't perform loudness compression or reshaping the audio; this is certainly author-side damaging their content prior to upload.

I've also noticed youtube's cut back in bitrate for a given resolution.. so if you're streaming 720p content, then you really should try watching it at 1:1 resolution at a comfortable distance where those finer details aren't visible. Otherwise yeah, scaling a 720p stream on 1080p or 4k hardware and sitting 18" inches away will reveal those areas where the compressor was forced to drop detail.

Back on the topic of the content-producer causing the problem: you can try to remove this variable by using an extremely high quality source as your datum - something like this: https://www.youtube.com/watch?v=6xLaHg63yK0 It was captured on Red's $54,000 8k camera "MONSTRO" with a gigantic 35.4 Megapixel CMOS sensor measuring 4cm x 2cm; that sucker has no problem soaking up light!

If you sit close and stretch the video full screen, you'll see the detail in the road and ditch are flattened out in the 720p stream but progressively put back in as you step up to the 1080p to 1440p to 2160p streams. Then rewatch the 720p stream but leave it at 1:1 windowed mode (not stretched or zoomed) and sit back about 5 ft.. to me, it's pretty hard to pick out the flaws - and that's a quite a "bargain" for consuming 1/10th the bandwidth versus the 2160p stream. So based on that, I feel youtube has struck the right balance.

To see all the streams available, you can use youtube-dl's -F option. On this video, we see the best content is combing 251 (the 160kbit/s Opus audio) with 313 (the 18Mbit/s VP9 stream). Youtube-dl will by default mux these two into a mkv container.

format code  extension  resolution note
249 webm audio only DASH audio 50k , opus @ 50k, 360.91KiB
250 webm audio only DASH audio 66k , opus @ 70k, 477.08KiB
171 webm audio only DASH audio 127k , vorbis@128k, 924.14KiB
140 m4a audio only DASH audio 127k , m4a_dash container, mp4a.40.2@128k, 950.05KiB
251 webm audio only DASH audio 133k , opus @160k, 971.72KiB
278 webm 256x144 144p 98k , webm container, vp9, 24fps, video only, 638.76KiB
160 mp4 256x144 144p 112k , avc1.4d400c, 24fps, video only, 570.24KiB
242 webm 426x240 240p 228k , vp9, 24fps, video only, 1.37MiB
133 mp4 426x240 240p 240k , avc1.4d4015, 24fps, video only, 1.11MiB
243 webm 640x360 360p 419k , vp9, 24fps, video only, 2.50MiB
134 mp4 640x360 360p 645k , avc1.4d401e, 24fps, video only, 2.95MiB
244 webm 854x480 480p 777k , vp9, 24fps, video only, 4.51MiB
135 mp4 854x480 480p 1187k , avc1.4d401e, 24fps, video only, 5.77MiB
247 webm 1280x720 720p 1544k , vp9, 24fps, video only, 8.92MiB
136 mp4 1280x720 720p 2379k , avc1.4d401f, 24fps, video only, 10.89MiB
248 webm 1920x1080 1080p 2717k , vp9, 24fps, video only, 15.76MiB
137 mp4 1920x1080 1080p 4328k , avc1.640028, 24fps, video only, 19.49MiB
271 webm 2560x1440 1440p 9004k , vp9, 24fps, video only, 45.76MiB
313 webm 3840x2160 2160p 18039k , vp9, 24fps, video only, 107.15MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k, 588.73KiB
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2, 1.63MiB
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k, 4.44MiB
43 webm 640x360 medium , vp8.0, vorbis@128k, 5.80MiB
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
Last edited by krcroft on 2019-01-25, 04:32. Edited 1 time in total.

Reply 3 of 11, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
krcroft wrote:

While these deliver better quality versus h264 and AAC, some people report better video quality with h264.

This is especially the case if they're recompressing vs compressing new material, as the source material isn't lossless to begin with.

All hail the Great Capacitor Brand Finder

Reply 4 of 11, by appiah4

User metadata
Rank l33t++
Rank
l33t++

It's definitely not an issue with source content most of the time, or at least exclusively. I record gameplay and occasionally upload to youtube and my recording settings have not changed, and the quality of the framebuffer is surely not a variable, but the resulting YouTube video is significantly worse at sub-1080p resolutions.

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 5 of 11, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Do they take the H264 material and transcode it (to H264 again, for instance) before storing, then transcoding again at a later time from the already recoded H264 stream, compounding the compression error?

All hail the Great Capacitor Brand Finder

Reply 6 of 11, by WolverineDK

User metadata
Rank Oldbie
Rank
Oldbie

If I remember correctly, then the "free" version of youtube. Then the sound is compressed to 128kbit . Perhaps I am wrong, but it seems to make sense, cause I have also experienced quite a few times, where the sound used to be good in the past. But now it is bad to "okay" in sound quality. Heck I have to listen to some really hard death metal. To not say it sounds very soft in the sound on youtube.

Reply 7 of 11, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie
gdjacobs wrote:

Do they take the H264 material and transcode it (to H264 again, for instance) before storing, then transcoding again at a later time from the already recoded H264 stream, compounding the compression error?

I'm not sure if they keep the uploaded source video in its native form. It would be nice to think so.. but the storage costs would be enormous.

The fewer transcodes the better, so maybe if the uploaded video meets their specs for codec and bitrate, they could just use it straight away, and only transcode for lower resolution streams. (I'm just guessing though).

Reply 8 of 11, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie
appiah4 wrote:

It's definitely not an issue with source content most of the time, or at least exclusively. I record gameplay and occasionally upload to youtube and my recording settings have not changed, and the quality of the framebuffer is surely not a variable, but the resulting YouTube video is significantly worse at sub-1080p resolutions.

Sounds like they dialed down the bitrates specifically for sub-1080p streams; maybe they find they can reach a bigger audience across the world who are on limited bandwidth networks, remote areas, etc..

Do you notice any differences beyween 720p h264 vs vp9? I know in the past some codecs struggled to encode discreet edges, but figured its should be a solved "corner" case 😉 by now.

I'm looking forward to AV1 hardware support, which will improve video compression another 30+%, and if they leave the bitrate tiers as-is then that's all quality upside for us.

Last edited by krcroft on 2019-01-25, 16:41. Edited 1 time in total.

Reply 9 of 11, by krcroft

User metadata
Rank Oldbie
Rank
Oldbie
WolverineDK wrote:

If I remember correctly, then the "free" version of youtube. Then the sound is compressed to 128kbit . Perhaps I am wrong, but it seems to make sense, cause I have also experienced quite a few times, where the sound used to be good in the past. But now it is bad to "okay" in sound quality. Heck I have to listen to some really hard death metal. To not say it sounds very soft in the sound on youtube.

YouTube will only mux the highest bitrate audio streams with commensurate video streams - so (sadly), even if it's just background listening, you need to stream the higher resolution videos to maximize audio quality, which is a huge waste of bandwidth.

My preferred way around this is to use youtube-dl -f 251 (url) to fetch the 160kbit/s opus stream, which has been tested to provide transparency at that bitrate. If this still sounds bad, then the blame is 100% with the uploader; I would mention it to them and ask for a copy of what they uploaded.

I can't find the hydrogen audio discussion, but content producers have been caught uploading lossy mp3 source material to Tidal, which Tidal then reencodes to FLAC for its premium uncompressed service.. which is backwards and so wrong.. (an example of incompetent uploaders and a streaming service that's too gready to enforce fidelity controls on souce content).

Reply 10 of 11, by Standard Def Steve

User metadata
Rank Oldbie
Rank
Oldbie

It looks about the same to me. I can't see much of a difference between the VP9 and AVC streams. And it's definitely better than what passed as "HD"TV in my city a few years ago. My cable provider was still using MPEG-2 @ 1080i until around 2015. If you were sitting even remotely close to the TV you could see some really nasty macroblocking--sometimes even on the still areas of the picture! YouTube at 720p was definitely better.
A few years ago the cable company finally switched to full 1080p with AVC (H.264), and upped the bit rate, which dramatically improved the picture. Can't see the macroblocks unless I'm actively seeking 'em out!

As for YouTube, they do keep the original files--I remember downloading a few of mine.
I'm not sure what "qualifies" a video to get a VP9 encode. All of mine (which are uploaded as H.264 MP4 files) don't even seem to have a VP9 version available.

94 MHz NEC VR4300 | SGI Reality CoPro | 8MB RDRAM | Each game gets its own SSD - nooice!

Reply 11 of 11, by realnc

User metadata
Rank Oldbie
Rank
Oldbie
xjas wrote:

This really sucks, as my internet isn't fast enough to stream 1080p, and I mainly watch on a 1280x1024 monitor anyway. I'd much rather have better-encoded 720p than over-compressed 1080p.

It's the bitrate that counts, not the resolution. If youtube has lowered the bitrates of 1080p and 720p, then you should probably switch to 1080p.

The video you posted uses a variable bitrate between 1mbps and 2mbps in the 1080p VP9 stream. In the 720p VP9 stream, it's between 300kbps and 700kbps.