Live data from Hacker News

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

news.ycombinator.com

101–110 of 133 posts

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

#101

On the few occasions I visit I noticed excessive CPU usage with their crappy "ambient" mode.

Also had some funky stuff with ambient mode. The whole page renders, video and audio plays, but nothing is interactive. Can't push buttons, can't select text etc etc. Like it renders the page to a png and shows it.

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

#102
post #99

Earlier quoted context omitted.

Run the profiler in the browser’s developer tools and you get a flame graph.

I think the issue is/was that the profiler in chrome never ends. I'll just leave it like this (480s of samples..?): https://imgur.com/a/IgaHOdX and come back in a few hours.

You have to manually stop it before it collects too much data.

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

#103

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…

So that's what it is! I've never seen the toast message, but I had a suspicion it was intentional on YouTube's side considering it doesn't occur in Chrome. Sadly I don't see a work-around in that reddit thread. I wonder if someone has a violentmonkey script for it.

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

#104
post #95

Youtube has been turning on AV1 for 1080p content for me. My phone is the only device with an AV1 hardware decoder. The impact on battery life and CPU usage has been extreme. You can tell Youtube to prefer AV1 only for low-quality videos ( https://www.youtube.com/account_playback ) or you can install an extension that will force h264 playback where supported. Other playback features such as ambient mode and volume eq…

> You can tell Youtube to prefer AV1 only for low-quality videos ( https://www.youtube.com/account_playback ) What option are you referring to here? I don’t see anything that seems related to that.

There is an "AV1 settings" below "Subtitles and Closed Captions" for me. If you don't see it perhaps it's not available for you yet.

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

#105
post #95

Youtube has been turning on AV1 for 1080p content for me. My phone is the only device with an AV1 hardware decoder. The impact on battery life and CPU usage has been extreme. You can tell Youtube to prefer AV1 only for low-quality videos ( https://www.youtube.com/account_playback ) or you can install an extension that will force h264 playback where supported. Other playback features such as ambient mode and volume eq…

> You can tell Youtube to prefer AV1 only for low-quality videos ( https://www.youtube.com/account_playback ) What option are you referring to here? I don’t see anything that seems related to that.

What it looks like if it's available (AV1 settings section): https://i.imgur.com/rp6Cvkd.png

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

#107

Youtube has been turning on AV1 for 1080p content for me. My phone is the only device with an AV1 hardware decoder. The impact on battery life and CPU usage has been extreme. You can tell Youtube to prefer AV1 only for low-quality videos ( https://www.youtube.com/account_playback ) or you can install an extension that will force h264 playback where supported. Other playback features such as ambient mode and volume eq…

How much power does hardware accelerated AV1 consume vs. hardware accelerated H.264? I would think they'd be relatively similar.

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

#108
post #45
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.

That's intentional on YouTubes end, they aim to serve more bitrate-efficient codecs wherever possible, even if it's a high burden on the client due to a lack of hardware acceleration. They'll only fall back to older codecs if the client is completely incapable of handling the modern ones. It's annoying but at their scale it no doubt saves them a shitload of bandwidth.

It also encourages users to upgrade to newer hardware since older devices are known to get slower as they age due to software increasing complexity and hardware mitigations (yes, they are also for phones). Most users will just blame the device.

Not saying that is the cause of this slow down, but since the mpeg4 patents don't expire till 2027(?) (and one of those patents prevents hardware decode on Linux) we as a society have given Google every incentive to do this and I welcome them to make mpeg4 irrelevant.

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

#109

Edge has been freezing on me for months with over 100% CPU usage. I finally figured out it was a youtube downloader extension. I disabled it and the problem went away.

Firefox just began doing this to me recently.

Might be YT, all along.

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

#110
post #26

Have only noticed this on my Windows machine, not any of my Macs. The windows machine has enough horsepower to use most of it's 2000w power supply, so I don't think it's a hardware issue. Using firefox engine & an adblocker fwiw.

"Uses a lot of power" is not a very exact proxy for "has all the tools".
Post reply on HN