Live data from Hacker News

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

news.ycombinator.com

81–90 of 133 posts

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

#81

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…

> impact on battery life and CPU

Well, is it higher or lower?

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

#82
post #40

YouTube is pretty shocking in Firefox, even worse with an ad blocker.

The experience suddenly gets mysteriously better if you switch your user agent to Chrome's, though.

That's not my experience at all. Switching off AV1 encoded videos has made a huge difference, though.

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

#83

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…

> impact on battery life and CPU Well, is it higher or lower?

For devices with the hardware decoder it'll be in the same ballpark as before. For devices without the hardware decoder the CPU will use significantly more power to decode the video than a hardware decoder would.

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

#84
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.

Does your PC have hardware-accelerated AV1 video decoding enabled in Firefox? And does your Mac? (you can check in about:support)

My PC plays videos just fine, but it started sucking down 50W more than it used to, and AV1 was the culprit. Now that I've switched YT back to hardware-accelerated h264 playback, everything is back to normal.

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

#85

Earlier quoted context omitted.

I find it fascinating that people think 12 seconds armchair psychology is enough to definitively rule out phenomena that hinge on complex tech and complex human deliberations about policy. That works on campy monster of the week TV shows but it catastrophically underestimates real world complexity. We've got documented cases in the wild of youtube adding 5 second timer, as well as experimenting with 3 video limits fo…

Did you mean to reply to a different comment? Mine didn't say anything about psychology. But you do seem to be strengthening my comment -- when YouTube was implementing a 3 video limit for users blocking ads, they were doing so with a big huge message: "It looks like you may be using an ad blocker. Video playback will be blocked unless YouTube is allowlisted or the ad blocker is disabled." That makes sense as a strat…

Musing on how a message will be subjectively experienced by users to the point of ruling out explanations based on an assumed subjective reaction, and assuming complex software development outcomes are tied to that specific strategy, is in fact about psychology on multiple levels, despite your protestation to the contrary. Specifically it's armchair psychology that underestimates complexity.

Most of my examples cut against your interpretation rather than in favor of. The 5 second delay was discovered rather than announced, and same with Newpipe breaking, and I don't even agree that the video message had anything to do with a broad principle of always tying communications to user experience. If anything the history is the opposite, rotating through various forms of obstruction all of which nudge user behavior in various ways, perfectly agnostic to any principle of how it gets communicated.

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

#86
post #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.

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

The way the browser can still participate in choosing is by e.g. not listing AV1 as supported when there is no hardware decoder on the local system. Both Safari and Edge took (approximately) that style of approach, but it comes with the downside that if the server only has AV1 video then the client gets nothing.

Practically, that downside isn't a big deal until codec support is high enough sites start assuming the codec is just supported and they don't need to host alternative options.

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

#87
Worth checking the browser console. If you use a content blocker (e.g. uBlock Origin) it may block things the site really, really "wants". It then goes into an extreme busy loop and throws exceptions to the console like a berserker on a nightly rampage.

Once you carefully whitelist the resource it wants the CPU usage goes down again. At least that fixed it for me (I was mistakenly checking various codec related settings in Firefox first too to find a solution.)

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

#88

This started happening on one of my older computers recently and I had to actually disable hardware acceleration to get the audio to stop being out of sync. The tradeoff for that has been noticeable frame dropping. I even added an extension to force h264 but there's no difference. It can play video no problem on other sites or in VLC. It's just YouTube and just on that PC...That PC can run Doom Eternal. Video content…

Many youtube videos consist of silent video streams combined with separate audio streams. Youtube-dl can list them. Often, the lower-quality and some medium-quality video stream will also contain audio, but the higher-quality videos are often silent with a second audio stream mixed in.

I can imagine that your older computer might have native support for decoding the high-res h264 video, but not for the high-quality OPUS audio stream, causing them to decode at different speeds.

I don't think there's a solution to that problem that doesn't involve running a dedicated video player such as VLC.

That said, I've also heard a lot of complaints from people still using Adblock Plus. I don't know what rules ABP has implemented, but they seem to affect Youtube performance much worse than uBlock whenever Youtube changes something.

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

#89
post #28

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

I absolutely despise what they did to GitHub's website. It used to be smooth and slick. But now a lot of things like reviewing PRs or just searching through a repo are painfully slow.

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

#90

Earlier quoted context omitted.

They're sabotaging non-Chrome browsers to drive people toward their platform with the strategically weakened extension API.

I don't think that has any connection to the subject under discussion, which is about whether YouTube CPU performance would lead people to turn off adblockers. Not about getting people to switch to Chrome.

I believe their point is that people switching to Chrome _is_ turning off their adblocker.
Post reply on HN