Live data from Hacker News

Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

news.ycombinator.com

51–60 of 133 posts

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#52
post #28

Also happens with Github and anything that uses ads lately. A 2 core PC dies while trying to render those pages.

I wonder if it’s proof of work bullshit. For those to be effective, they have to slow down whatever machine is running in an LLM farm.

That generally means they have to peg a desktop GPU for long enough to make a dent larger than LLM inference time.

Browsing with a 2 core box is like using a musket to blow a hole in a wall that’s optimized for armor piercing rounds.

Is this dumb? Of course. Your best recourse is probably to work around the anti-LLM blocks by having an agent read and summarize the page for you.

Are there any decent cloud based web renderers yet? Something like vnc or rdp backed by a shared 4090 could solve the problem. For static content, it’d only have to run proof of work once, then serve the result from cache.

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#53
post #42

Earlier quoted context omitted.

That's not plausible. If someone sees, oh YouTube is making my computer hot, the last thing that's going to occur to them is, "wait let me try turning off my adblocker." When corporations try to change people's incentives, they are obvious about it, so people know what to change. In contrast, changing CPU usage on video playback for people who use adblockers and then not telling anyone is... just not a strategy that…

Sure it is. They’ve done crap like make firefox or safari run hot on other Google properties in the past. Is it incompetence or sabotage? Who knows. The first rule of sabotage is to be indistinguishable from incompetence. https://www.gutenberg.org/ebooks/26184

Incompetence is by definition not intentional, and sabotage is the action of a rogue employee, not corporate strategy. A corporation can't intentionally sabotage itself, by definition.

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#55

Earlier quoted context omitted.

Hanlon's Razor: https://en.m.wikipedia.org/wiki/Hanlon%27s_razor

>Hanlon's Razor Sorry, but drive-by philosophy is not applicable here. YouTube developers single out adblocker users and taunt them with an "Experiencing interruptions" toast prompt that locks the video stream for ~5 seconds. Curiously, it contains a link to the YouTube Help Center, to the section fragment "#check_ad_blockers". In other words: "yeah, we know you've got uBlock Origin enabled, enjoy the speedbump". Pla…

I have noticed this but have been unable to explain it until now.

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#56
post #15

If the video is encoded using a codec your hardware doesn't handle, it would be left up to the CPU to decode. Av1 can slow everything down to a crawl over CPU. You'd think the browser would be smart about the stream selection though.

I believe Youtube's player is driving codec selection, not the browser (i.e. the player requests a list of supported codecs and then picks the one most beneficial for Google, not the other way around).

That said, I've solved this problem for myself on macOS and Firefox by setting media.webrtc.codec.video.av1.enabled to false on about:config, as all other codecs used by Youtube are hardware accelerated on my Mac.

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#57
post #31

Earlier quoted context omitted.

I run an extension that allows to automatically request h.264 streams from YouTube even when av1 is also available. Saves a lot of CPU, at the cost of some bandwidth.

It’s funny that this kind of browser extension has recurred over the years. Originally it was to replace the awful CPU hog flash player with an HTML5 h.264 player[1], then it was to sidestep YouTube’s insistence on VP* codecs, and now it’s to sidestep AV1. [1]: https://web.archive.org/web/20110302145602/http://www.vertic...

In a beautiful world, there would be a link to each codec to let the user decide, or the browser itself would override the web site's preference and provide such links. It's sad that we keep having to resort to browser extensions to circumvent terrible web site and browser software.

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#58

If you have an adblocker it might be intentional.

I work for another large streaming site where people like to use adblockers. These adblockers also cause similar performance issues that are entirely caused by awful code in these blockers. I've studied the code for all of these blockers and they do stuff like:

- Constantly hammering the playlist endpoint to try and get something without an ad stitched in

- Constantly tearing down and remaking the player

- During an ad, requesting the playlist for every other quality to see if those do not have any stitched ads

- Proxying all traffic to servers the adblocker people own in countries where ads are not typically served (eg Russia)

- Intercepting playlist requests and simply deleting segments that they believe are ads (oh no why is my stream broken!!! stupid streaming website!!)

Youtube _could_ be doing something here, but there is also a very real chance your adblocker code is simply bad.

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#59
post #31
post #15

If the video is encoded using a codec your hardware doesn't handle, it would be left up to the CPU to decode. Av1 can slow everything down to a crawl over CPU. You'd think the browser would be smart about the stream selection though.

I run an extension that allows to automatically request h.264 streams from YouTube even when av1 is also available. Saves a lot of CPU, at the cost of some bandwidth.

Assuming you have hardware support for VP9 as well, setting media.webrtc.codec.video.av1.enabled to false on about:config achieves the same outcome without an extension.

Re: Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?

#60
post #31

Earlier quoted context omitted.

I run an extension that allows to automatically request h.264 streams from YouTube even when av1 is also available. Saves a lot of CPU, at the cost of some bandwidth.

What's the name of the addon? I recall h264ify but not sure about it

Yep, that's what I use. It took youtube from using 100% cpu, to the point where my little xps13 was thermal throttling, to 50% cpu running 1080p at 2-3x speed.
Post reply on HN