7 ms·
Ask HN: Does anyone else notice YouTube causing 100% CPU usage and stattering?
Pretty much becomes unusable
- bArray 1y agoI have noticed Google sites showing what looks like some form of memory leak. Typically it's only Microsoft websites doing this.
- burgerrito 1y agoThis memory leak happens very often to me in GitHub, not sure why, and not sure if it's Microsoft's fault, or Firefox's. I actually have no idea at all on how to debug this...
- snickerdoodle14 1y agoFirefox Console > Memory > Enable record call stacks, reload the page, take a snapshot, wait until you notice memory grows, take another snapshot. Then compare the two: https://firefox-source-docs.mozilla.org/devtools-user/memory/basic_operations/index.html#memory-basic-operations-comparing-snapshots https://firefox-source-docs.mozilla.org/devtools-user/memory.... You can also try a performance recording. But you probably won't be able to make much sense of the results without a lot of effort because of all the minimization/obfuscation.
- deleted 1y ago[deleted]
- busterarm 1y agoThis 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 shouldn't be a problem.
- Forgeties79 1y agoGiven their actions the last two years or so unfortunately the default assumption is (reasonably) “probably something intentional to get people to stop doing something they don’t want, like using ad blockers.”
- imcritic 1y agoSometimes it's just browser<>GPU driver issues.
- busterarm 1y agoExcept it's still a problem with hardware acceleration disabled.
- Forgeties79 1y agoVery well could be. But with companies like Google I immediately start from a place of light-cynicism until I see evidence to the contrary at this point. I haven't given them the benefit of the doubt in probably a decade, and generally it's a fair way to go about things.
- imcritic 1y agoWell, in my case the browser is Google as well, so...
- jeroenhd 1y agoMany 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.
- jjallen 1y agoI have not and don’t run an adblocker fwiw.
- PlotCitizen 1y agoAnd do you notice high CPU usage or stuttering?
- bak3y 1y agoJust out here raw-dogging the internet...
- IAmBroom 1y agoTry new and improved Bongo Buddy(tm)!
- RisingFusion 1y agoIf you have an adblocker it might be intentional.
- mwkaufma 1y agoHanlon's Razor: https://en.m.wikipedia.org/wiki/Hanlon%27s_razor https://en.m.wikipedia.org/wiki/Hanlon%27s_razor
- ses1984 1y agoI’m sorry but big tech doesn’t get the benefit of the doubt.
- mwkaufma 1y agoThe benefit of the doubt... that corps _don't_ write clunky, slow software?
- jamesnorden 1y agoWhen the supposed to bug happens to conveniently cause issues for adblocker users, yeah.
- mwkaufma 1y agoPossible, but still just an assumption.
- jitix 1y agoGoogle does - Google search and maps have gotten objectively worse over the past 2 years. At least in Canada. I have 38 locations in my (huge) city saved in Google maps and it breaks when I ask it to find a way from point A to point B. Works fine when logged out. Maps also put traffic signals where there are none, and while finding shortest path it stopped putting weights to traffic signals. So you could have it route you via a city's main street instead of the freeway because it's 2km shorter but it ignores the 9 traffic signals that wastes 15 mins. Apple maps works fine. Google search on web has adopted bad UX, and clicking a map or a shopping item has a noticeable delay between. Also right click "Open in new tab" options are gone. Are you saying all these "enshittification" changes are deliberate?
- Aldipower 1y agoWhen I open the "My Videos" tab, then I get this problem, otherwise it works.
- sjw987 1y agoSorry to hijack, but... I have weird issues with YouTube on my home PC. If I have a Chrome window with a YouTube video running to the side of my monitor, it always inevitably ends up freezing up the whole display. Ctrl+Alt+Delete and cancelling back in makes it go away briefly, however sometimes it can just keep freezing the monitor up constantly. The weird thing is, the PC (running Windows 11) has a powerful graphics card which can handle AAA games (as of earlier this year at least), graphics drivers are all up to date, and YouTube works fine in fullscreen across the whole ultra-wide monitor. I just can't work out what's causing it. It makes running YouTube side-by-side with other programs a real pain in the ass. It's been like this for months now. Checked browser HWA settings, and they're all as they should be.
- okwhateverdude 1y agoDo you have an iGPU+dGPU combo like in a gaming laptop? For my 2019 gaming laptop with a i915+RTX2060, if I leave the switchable option on in the hardware settings (meaning the OS can choose which GPU to use ie. iGPU for low power), I end up with similar behavior in Linux/Win10. The external port actually uses the dGPU so rendering must go through it but it will struggle with the switchable option and I end up with freezing or stutters. In Linux, I explicitly configure Xorg to only use the iGPU and reserve the dGPU for model inference which fixes the stuttering issue. When booting into Win10, I explicitly disable the iGPU and turn off the external monitor so my VR playing doesn't stutter or youtube doesn't freeze or stutter.
- ChocoStarQuest9 1y agoMultimonitor??
- zarzavat 1y agoThought it was just me! This started happening just today.
- Am4TIfIsER0ppos 1y agoOn the few occasions I visit I noticed excessive CPU usage with their crappy "ambient" mode.
- magackame 1y agoAlso 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.
- deleted 1y ago[deleted]
- camhart 1y agoIf 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.
- nine_k 1y agoI 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.
- yonatan8070 1y agoWhat's the name of the addon? I recall h264ify but not sure about it
- wing-_-nuts 1y agoYep, 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.
- yonatan8070 1y agoOut of curiousity, what CPU do you have in that XPS 13?
- wing-_-nuts 1y agoIt's pretty old, like from 2016 so it's only got an i5 7200U (2 core 4 threads) @ 2.5ghz. Mostly fast enough for what I use it for (content consumption, web browsing, light gaming and coding). It's mainly limited by it's 8gb of ram which isn't upgradable.
- nine_k 1y agoWhat I run is https://github.com/alextrv/enhanced-h264ify https://github.com/alextrv/enhanced-h264ify I looked now and noticed that I actually reject VP8 and VP9 and accept AV1. I run Linux on a Ryzen 4750U, for the record. It did not have trouble chewing through VP8 / VP9 without skipping frames, but it ran unpleasantly hot.
- snickerdoodle14 1y agoIf you have an adblocker and it happens at the start of a video then this is intentional
- SigmundA 1y agoI keep getting the video restarting after a few seconds randomly, very annoying even more so when it's the ad that restarts from the beginning, which almost seems intentional. Like a bug that nobody is in a hurry to fix.
- paol 1y agoI've had something similar happen starting maybe a year ago, and varying in intensity from "no problem" up to "pegged CPU in the youtube tab and UI actions can lag up to several seconds". It doesn't affect video playback though. This behavior comes and goes over time, for example it's been fine for several weeks in a row now. I assume it's punishment for running an ad-blocker.
- liquidise 1y agoDisabling “Ambient Mode” in the settings helps cpu usage a lot on my intel MBA.
- WASDx 1y agoSame. I recall the "stable volume" setting also eating cpu.
- jjbinx007 1y agoYouTube is pretty shocking in Firefox, even worse with an ad blocker.
- WD-42 1y agoI like imagine the stuttering and jagged reflows are the result of uBlock origin violently battling the page and destroying all the ads.
- shakna 1y agoThe experience suddenly gets mysteriously better if you switch your user agent to Chrome's, though.
- cosmic_cheese 1y agoSounds like an unnecessary polyfill.
- jeroenhd 1y agoThat's not my experience at all. Switching off AV1 encoded videos has made a huge difference, though.
- orsev 1y agoHave 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.
- jeroenhd 1y agoDoes 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.
- IAmBroom 1y ago"Uses a lot of power" is not a very exact proxy for "has all the tools".
- gatane 1y agoAlso happens with Github and anything that uses ads lately. A 2 core PC dies while trying to render those pages.
- gatane 1y agoHell, I have to use my phone instead if I want to go to any of those pages nowadays. And even my phone now gets a random crash from chrome or the page itself.
- hedora 1y agoI 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.
- ndriscoll 1y agoThat makes no sense. You require PoW before providing the information, not when the page is already sent. For a large code repository like GitHub for LLM training, it's also trivial to just git fetch to scrape. The simpler explanation is that modern web devs are frequently incompetent and can't get static text to appear on an idle page without pegging cores, can't get subsecond server page generation for simple CRUD, etc. This was the trend before LLMs were ever a thing.
- asimovDev 1y agoI 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.
- DrNosferatu 1y agoA great (free and O.S.) Android client with ad blocker is https://github.com/polymorphicshade/Tubular https://github.com/polymorphicshade/Tubular it also integrates SponsorBlock!
- buckle8017 1y agoDisable ambient mode. It can use a ridiculous amount of CPU. It seems hardware accelerated only on windows chrome.
- _k2vp 1y agoTried [Invidious](https://github.com/iv-org/invidious https://github.com/iv-org/invidious)? It's really lightweight. I host my own instance: https://iv.duti.dev https://iv.duti.dev and it works wonders (Librewolf with strictest fingerprint resist)
- SoftTalker 1y agoI pretty much only watch YouTube via the app on my phone, rarely in a browser. I also pay for Premium. Have not noticed any recent/new issues.
- ChocoStarQuest9 1y agoHow do I downvote comments here?
- barrenko 1y agoI have like 4 simple tabs and my Chrome is hogging 1.8GBs of RAM.
- iLemming 1y agoSomewhat relevant: can somebody share good mpv defaults (or some other interesting technique) for playing YT videos? I have managed to get it to work, but it still pauses a lot for bufferring. I wonder if there's maybe some yt-dlp, ffmpeg, etc. trick to pre-cache some segments or something like that. The reason to play it in mpv is not to avoid commercials (I have a paid account), but because I can then play it from my editor while fully controlling the playback - it works great for watching lectures and taking notes.
- namibj 1y agoEither download ahead, or turn down the bitrate via ytdl format expressions; see the latter's docs for how to express your desires.
- 2OEH8eoCRo0 1y agoIt's probably the special Google hardware obsoleting sauce called AV1. Without hardware acceleration your computer will struggle to decode their videos.
- mamcx 1y agoAlso: Recently my videos "goes full black" for few milliseconds (not matter which way to see them, but yt is where I noted it more). I'm on M3, and can't pin point a reason.
- malakai521 1y agoIt happens when you use adblocker
- deleted 1y ago[deleted]
- mamcx 1y agommm, is possible to workaround?
- jeroenhd 1y agoYoutube 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 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 equalisation can also impact performance, though that kind of depends on how fast your web browser is at executing Javascript, and to a much smaller extent. The substantial bandwidth savings are here to stay, though, so in time I think Youtube will move to AV1 more often.
- tantalor 1y ago> impact on battery life and CPU Well, is it higher or lower?
- zamadatix 1y agoFor 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.
- jccc 1y ago> You can tell Youtube to prefer AV1 only for low-quality videos (https://www.youtube.com/account_playback https://www.youtube.com/account_playback) What option are you referring to here? I don’t see anything that seems related to that.
- binaryturtle 1y agoWorth 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.)
- dijit 1y agoTangially related; imgur uses (and used) 100% CPU for me; I was never quite sure how or why. The reason I bring it up is because I tried to actually profile it a handful of times, but my C++/Rust/Python knowledge was completely useless in the face of a browser development toolchain. Did I miss something, or is it not possible to easily see what functions take the meat of javascript execution time? (it feels really absurd if it's not easy, given that people can essentially serve whatever arbitrary script they want and my computer pretty much has to deal with it if I want to use whatever site)
- cluckindan 1y agoRun the profiler in the browser’s developer tools and you get a flame graph.
- dijit 1y agoI 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 https://imgur.com/a/IgaHOdX and come back in a few hours.
- cluckindan 1y agoYou have to manually stop it before it collects too much data.
- dijit 1y agoI collected about 400s of data and stopped it. It's been stuck on this page for 18hours now. No increased CPU usage (more than the page spinning at least) and no crazy memory consumption. https://imgur.com/a/aXNtvQ5 https://imgur.com/a/aXNtvQ5 What am I doing wrong?
- cluckindan 1y agoTry with 30s
- cpncrunch 1y agoAs others have noted, if you don't have hardware decoding for the codec being used, it will suck up a huge amount of cpu. Last year I got a new Macbook Pro with M3 Pro cpu, and it's amazing how little cpu it uses for video playback. After watching an hour of Youtube, the battery is down only about 5 or 10%.
- cosmotic 1y agoEdge 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.
- IAmBroom 1y agoFirefox just began doing this to me recently. Might be YT, all along.
- kmfrk 1y agoLivechats are particularly bad. For desktop, the extension HyperChat was made to address whatever programming is leading the livechat system to blowing up your CPU. https://livetl.app/hyperchat https://livetl.app/hyperchat
- Gud 1y agoYes, happens to me in the last few days. I thought it was Firefox going bananas after some update, but I’m glad to find out it’s just another user hostile ploy from the owning class
- geor9e 1y agoNo other context, huh? Not even browser and OS? If youtube itself was stuttering, 100M daily users would flip out. So narrow it down. For example if you add the word Edge to your search you might find settings like Video SuperResolution that can tax your CPU https://www.reddit.com/r/LinusTechTips/comments/1bcmmdo/microsoft_edges_enhance_videos_feature_can_fry/ https://www.reddit.com/r/LinusTechTips/comments/1bcmmdo/micr...
- ChiliPie 1y ago[dead]
- queenkjuul 1y agoHappens after I've had YouTube open in Firefox for many hours (which is like every day on the Ubuntu box plugged into my TV). I don't think it's codec related, i should have av1 hw decoding, and videos play fine all day, until they don't
- ChocoStarQuest9 1y agoAV1: The Future is Now, old man