Closed Bug 1163327 Opened 9 years ago Closed 2 years ago
Youtube HTML5 high CPU load
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0 Build ID: 20150415140819 Steps to reproduce: Went to youtube.com, played a video. Actual results: When I play a HTML5 video on youtube the CPU load goes up to 60-70% and when I pause or exit the video it goes back down to normal load. Expected results: CPU shouldn't have loaded more than 15%
I second that. It happens when playing videos in 720p or 1080p in 60fps. To reproduce just play a video in 720p or 1080p and monitor the CPU. Then pause it and watch the CPU usage go down.
I can confirm that I am also experiencing this bug as well, tested using a laptop with a pentium dual core @ 2.16ghz. I use a somewhat old computer for my online browsing activities. I use Firefox 38.0.5. While watching a YouTube video on the HTML5 player at the 480p setting, which is the setting that I normally use on YouTube, the CPU usage would just behave strange. The CPU usage would just skyrocket immediately to 50%-60% and then it would eventually just stay at 100% CPU usage until I pause the video that I am currently watching with the YouTube HTML5 player. Taking a look at the Windows Task Manager while this is happening, Firefox's process, firefox.exe, is just hogging up the CPU as I mentioned what was happening above. I do realize however that native YouTube HTML5 support in Mozilla Firefox is in an early stage, as I would like to call it that way, as it was released as of Firefox 37. Hopefully this bug problem can be resolved in someway or another. Hopefully.
ust for the record, I found this thread in a forum that talks about h264 (that I assume, Firefox is using for Youtube content) and VP9 (Which is not enabled by default) https://forums.comodo.com/general-discussion-off-topic-anything-and-everything/open-h264-video-codec-and-firefox-t107855.0.html It's old, but they talk about an old library (libvpx.dll) for the VP9 support, they say FF uses 1.3.0 version, while Chrome goes for a newer and faster version... Can this explan somehow why the FF is slow with HD/60 content and why the about:support page says that h264 decoding is not supported by my VGA, while I can play that kind of videos locally with Windows Media Player and VLC with no issues? Funny and interestring... My desktop with a ATI Radeon HD 4350 with 2010 drivers doesn't exhibit this issue... Seems you got either old libraries bloating FF or just a bug with ths particular version or FF...
Ok, I discovered what the hell happened here... by some unknown reason, Firefox 41 disabled hardware accelerated h264 decodinf for me, while my VGA clearly supports it... so if you know your VGA supports DXVA 2.0 (required for this to work) just change this setting on FF41: media.hardware-video-decoding.failed If this little fella says true, change it to false then your video playback will be normal with h264, including HD/60 fps and Full HD/60 fps I've checked with my desktop, and this setting says false, why is my laptop's VGA "blacklisted" while the desktop's one, that got older drivers, is not?
I have the same problem so I will not create a new bug. On Linux platform. With Seamonkey 2.38 (the first version viewing youtube videos in html5 by default ?). With Firefox 41.0.2. It works but with a so high CPU usage... It's worse than flash !
windows 8.1 64x, firefox 42 I double that. The bug is real. Also, for me, it affects ONLY Youtube. Other html5 videos, at least the ones I've seen, played on no more than 15% CPU load. Load of my intel 2500k can be up to 80% on 1080 60fps youtube video. I've tried Safe Mode, it didn't help. I tried the older version of Firefox (38) and it works like a charm. So, apparently, development team broke something along the way. Please fix.
Windows 7 x64, Firefox 42 Same problem here. In fact, it's probably worse! I just can't load http://www.youtube.com/feed/subscriptions without having 10-15% CPU usage on my Core i7 950 CPU, 6GB of RAM, etc. 10-15% is equivalent to a whole CPU Core of 8 (4 core * 2 threads). Just watching a video in 720 and 1080p is fine but if you pause and start to go and use anything flash or HTML5 based such as Twitch, everything will stutter. Closing the or all Youtube tabs IMMEDIATELY fix the problem and CPU usage goes back to 0-3% for Firefox. Did not have this issue before upgrading to version 42.
Linux Mint 17.3 64 bit, Firefox 43 Same problem here! My CPU is AMD Athlon 2 X4 630 - 4 cores @ 2800Mhz. When I begin to watch some youtube video my computer becomes unstable and laggy. In fullscreen becomes even worse. I don't have this problem with the HTML5 player in chrome.
Verified on Windows 7 x64, Firefox 43 and on Nightly 46 and could not reproduce. Update component to Audio/Video Playback. Also, please see Bug 970308, that could be related.
Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
See Also: → 970308
Confirm on FreeBSD 10.3 with FF 44.0.2 (Intel opensource, I7-3630QM) . Cpu hits beyond 100% with playback of any HD video content on websites including youtube. It's very unusual to have such high cpu load even when software decoding used. For an instance, mpv rarely hits beyond 10% when playing HD content with forced software decoding and bare x11 output. http://www.quirksmode.org/html5/tests/video.html
It happens to me, only in 60fps HD video with FF 44. I am currently using v43.0.4 and it works well. My specs: GTX 650, AMD Athlon 64 X2 Dual-Core, 4gb RAM.
This occurs for me, using any resolution or framerate, on FreeBSD 10.2 with FF 44.0.2. I often see over 130% cpu usage. Using a media player like VLC uses only a few percent CPU usage. I am using an AMD Radeon HD 8000 series GPU.
FreeBSD users may check the bug report below.That fixed my problem. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203732
Andy - are you still seeing this issue? If so then can you paste in the graphics section from about:support and let me know what CPU you have.
I'm getting the same thing here, Apple MBA 2012 (Intel HD 4000). VLC plays full screen h264 at 15-20%, FF 45.0.2 plays a 240p youtube video at 160% CPU. Asynchronous Pan/Zoom none Device ID 0x0166 GPU Accelerated Windows 0/1 Basic (OMTC) Supports Hardware H264 Decoding No; Vendor ID 0x8086 windowLayerManagerRemote true AzureCanvasBackend skia AzureContentBackend quartz AzureFallbackCanvasBackend none AzureSkiaAccelerated 1 (#0) Error GLContext is disabled due to a previous crash. (#5) Error GLContext is disabled due to a previous crash. (#6) Error GLContext is disabled due to a previous crash. (#7) Error GLContext is disabled due to a previous crash. (#8) Error GLContext is disabled due to a previous crash. (#9) Error GLContext is disabled due to a previous crash.
(In reply to johan.sten from comment #16) > I'm getting the same thing here, Apple MBA 2012 (Intel HD 4000). > VLC plays full screen h264 at 15-20%, FF 45.0.2 plays a 240p youtube video > at 160% CPU. You should file a separate bug for Mac and include the OS version.
OS: Unspecified → Windows 7
(In reply to Smith from comment #9) > Same problem here! My CPU is AMD Athlon 2 X4 630 - 4 cores @ 2800Mhz. > When I begin to watch some youtube video my computer becomes unstable and > laggy. In fullscreen becomes even worse. I don't have this problem with the > HTML5 player in chrome. Linux currently uses basic layers for composition and performance is being improved in bug 1253062. There is also some work toward getting GL layers working which includes moving to GTK3.
7 years ago
platform-rel: ? → ---
1445470 - [tracking] video playback performance <https://bugzilla.mozilla.org/show_bug.cgi?id=1445470>
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
No longer blocks: video-perf
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.