Closed Bug 970308 Opened 10 years ago Closed 8 years ago

high cpu usage when viewing html5 video

Categories

(Core :: Audio/Video: Playback, defect)

28 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox40 --- affected
firefox41 --- affected
firefox42 --- ?
firefox43 --- ?
firefox45 --- ?

People

(Reporter: sammy, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140127194636

Steps to reproduce:

* create clean firefox profile, start firefox
* got to a page containing an embedded html5 video, for example http://camendesign.com/code/video_for_everybody/test.html
* watch firefox process consume 100% cpu
* pause video --> cpu usage goes down as expected
* resume video --> normal cpu usage (less than 100 %)


Actual results:

firefox consumes 100% cpu while playing the video, but stays responsive. pausing & resuming the video reduces the cpu usage to normal


Expected results:

playing back video should not use 100% cpu
Please check if the issue occurs using Firefox in safe mode (with your addons disabled):
http://support.mozilla.com/kb/Safe+Mode

Or on a new, empty profile:
http://support.mozilla.org/en-US/kb/Managing-profiles#w_starting-the-profile-manager
Flags: needinfo?(sammy)
I tried:
- deleting the ${HOME}/.mozilla folder
- start with -safe-mode
all with the same result. 100% cpu usage.

Pause and resume of the video instantly drops cpu usage to less than 20% (intel celeron 867).
Flags: needinfo?(sammy)
Tested on Ubuntu 12.10 x86_x64, with a new profile for each.

I can indeed reproduce this issue with Firefox 27. It doesn't reproduce with Firefox 28, 29 or 30 though. On all of these versions, I get the increased CPU usage for about 1 second when the video is loaded, but it drops immediately back to normal without the user doing anything.

Sammy, can you please try and see if you can reproduce this issue on Firefox 28 on your system?
http://www.mozilla.org/en-US/firefox/beta/

Firefox 28 should be released March 18th, so I don't think Firefox 27 will get any more fixes either way.
Flags: needinfo?(sammy)
Firefox 28 (beta) seems to work fine. Didn't even see the 1 second cpu spike.
Flags: needinfo?(sammy)
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Just tried the 28.0 release, and unfortunately it still eats > 100% cpu. I also tried the latest 28.0b9 , which was fine at around 25% cpu.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Version: 27 Branch → 28 Branch
I tested this again, but this time I gave it even more tries (several new profiles, new windows, new tabs). From what I see, the bug is in Firefox 28, both beta and release, but it's intermittent.

At this point, I can reproduce it by:
1. loading the video in a tab,
2. opening a new tab,
3. closing the first tab,
4. loading the video in the remaining tab.

This didn't work last time, so I suppose there are some race conditions involved here.

All the testing was done on Ubuntu 12.10 x86_x64.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: General → Video/Audio
Product: Firefox → Core
Same problem here with Firefox 29 (x86_64) on a Fedora 20.
I have the same bug here:

Ubuntu 14.10 - Mozilla Firefox 29.0 from repositories
CPU - Intel Core i5 520M
GPU - nvidia GeForce GT330M, with nvidia closed source drivers 331.38

I open any HTML5 video (youtube, or http://camendesign.com/code/video_for_everybody/test.html), I play it and the CPU usage goes wild. If then I pause the video and resume it afterwards, CPU usage return to normal values.
(In reply to Moki_X from comment #8)

> I open any HTML5 video (youtube, or
> http://camendesign.com/code/video_for_everybody/test.html), I play it and
> the CPU usage goes wild.

Do you get the WebM or MP4 version of the video?
(In reply to Ralph Giles (:rillian) from comment #9)
> (In reply to Moki_X from comment #8)
> 
> > I open any HTML5 video (youtube, or
> > http://camendesign.com/code/video_for_everybody/test.html), I play it and
> > the CPU usage goes wild.
> 
> Do you get the WebM or MP4 version of the video?

"Second button mouse click -> copy video address" gives me a .mp4 file.
Does the video also say "H.264 HTML5" in the corner? It's helpful to know which file you're getting and if it's using the flash fallback or not.
Yes, video say H.264 HTML5
Ok, thanks for confirming. Do you see high cpu usage if you play back the video url with other gstreamer-based player, like Totem, or just Firefox?
-> executing "totem http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" never makes the CPU going crazy
-> refreshing "http://camendesign.com/code/video_for_everybody/test.html" doesn't always triggers the bug. However, ~80% of the page loads will reproduce the bug.
-> Youtube's videos always triggers the bug.
Opening a mp4-file from a harddisk does trigger this bug too.

I can reproduce this on a PC with intel core i5, Radeon HD 6850M (using open source radeon driver)
and on a PC with core i5, GeForce GTX 770 (using propritary driver). On both i have a Fedora 20 and Firefox 29 (64-bit).
I can reproduce with many youtube html5 videos and with this link of comment 14: http://clips.vorwaerts-gmbh.de/VfE_html5.mp4. 

Firefox use over than 120% of cpu, and it easily heats cpu from 50 to 80ºC (!). Using the concurrent browser (i.e. chrome), it uses less than 40% of cpu and temperature is about 57ºC (only 5~7 degree).

Could you guys pay attention with this issue? Firefox is great, but for see videos it's getting hard since Adobe stopped Flash development in Linux and it is crashing often in Firefox, and HTML5 alternative heats up CPU (complicated when you use laptops).

Asus R751JB
Core i7-4700HQ CPU @ 2.40GHz
VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)

Ubuntu 13.10
Kernel 3.11.0-20-generic
Firefox 29.0
(In reply to sergio-br2 from comment #16)
> I can reproduce with many youtube html5 videos and with this link of comment
> 14: http://clips.vorwaerts-gmbh.de/VfE_html5.mp4. 

I would guess it's a problem with whatever H.264 or AAC decoders GStreamer is choosing to use on your system, since an i7-4700HQ should clearly be able to play such a video.

Either that, or Chrome is using VAAPI or somesuch. We do not use hardware accelerated video decoding on Linux yet.
I'm testing in Ubuntu 14.04, Firefox 29.0. Cpu usage is about only 25% in html5 youtube. Tried to play the mp4 link, and it ask to open with other program, then i taked a look in youtube.com/html5 and it seems that H.264 is not enabled in firefox (i can use only HTMLVideoElement and WebM VP8). Maybe Gstreamer 1.0 used in ubuntu 14.04 is incompatible with firefox? The funny is that it is enabled in ubuntu 13.10.

So the problem is with H.264 in gstreamer?
Yeah, it'd seems that is this H.264 + GStreamer that is causing high cpu usage. I installed gstreamer0.10-ffmpeg by a PPA (ppa:mc3man/trusty-media), and now i'm seeing the same issue.

Obs: Firefox 30 using gst-libav (gstreamer1.0-libav) has the same issue?
The bug is NOT PRESENT in the currenet nightly build.

Ubuntu 14.04, i5 520M, nVidia GT330M under privative drivers

build: 32.0a1 (2014-05-23)
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
This repros for me on youtube & the Bing homepage

More Repro steps:
launch Firefox
Open task manager
set affinity to 1 core for firefox
open resource manager
not the usage of that core
start playing a 720p video on youtube in firefox

Expected: No major perf issues

Actual: CPU usage spikes 20-50% pending your core's processing speed. this translates to what looks like a marginal cpu jump on 4-8 core machines but greatly degrades the user experience on 2 core machines. 

This does not repro on Chrome or IE
I have installed the nightly 36.0a1 (2014-11-20) and it repros
I set affinity to the same core for plugin-container.exe
I also see a HUGE increase in CPU usage with full screen rendering

Again FULL SCREEN makes a large negative impact to CPU usage
Can confirm the issue, had one page with two background videos--I wasn't even viewing them-- instead of gifs, and cpu usage filled two cores.
Hit this issue with firefox 36.0.1.
It seems like that it is always present.
With a clean profile, it exists.
When I open the test page, it says h264 html5, and the cpu usage is somewhere like 110~130%. Usually, when soft decoding such h264, cpu usage is ~15%.
Then I disabled OpenH264 in about:config, and it still exists.
I have gstreamer1-vaapi installed, and when opening the page, I see libva info on the console. When I remove gstreamer1-vaapi, the info disappears. So the video is loaded through gstreamer. The problem still exists.
When I disable gstreamer in about:config, the page defaults to webm instead of h264, and firefox can't play h264 anymore. The cpu usable is stable between 111~115%, so the problem still exists.
It looks like that there is a thread in a busy loop, because if you remove 100% from the number, it looks like the correct cpu usage.
Blocks: 1101649
Somehow glad to find this thread. My notebook experienced sudden shutdowns twice due to CPU overheating (> 80 °C) after a few minutes of looking at websites with html video in header or background. 
On the other hand I can have a Chrome window with HD (swf / animal watching) streams open all day which isn't causing any problems at all while watching the same streams in FF begins to strain the fan at some point.
That's all I know at the moment. Didn't have time yet to check any data load figures etc.
I've also experienced a similar issue on Nightly 42.0a1 (2015-07-09) after becoming aware by a reddit user's comment - https://www.reddit.com/r/linux/comments/3c9zds/whats_new_with_firefox_390/csufsgp  

Video - https://www.youtube.com/watch?v=p7ejnkc-rPk

On 720p60fps on Linux (Fedora 22) the CPU Usage spikes very very high and keeps fluctuating.
I looked into the process list and Web Content was causing this.
Also if it might be of any help Web Content was related to this command - "/home/USER/firefoxN/plugin-container -greomni /home/USER/firefoxN/omni.ja -appomni /home/USER/firefoxN/browser/omni.ja -appdir /home/USER/firefoxN/browser"  

For me on YouTube except webM everything else is enabled.  
System has a dual-graphics(Intel+GeForce GT 525M - Optimus tech running Bumblebee)  
But Firefox only runs via Intel

Graphics: 
Adapter Description - Intel Open Source Technology Center -- Mesa DRI Intel(R) Sandybridge Mobile
Asynchronous Pan/Zoom - none
Device ID - Mesa DRI Intel(R) Sandybridge Mobile
Driver Version - 3.0 Mesa 10.6.0 (git-5d327b3)
GPU Accelerated Windows - 0/1 Basic (OMTC)
Supports Hardware H264 Decoding - false
Vendor ID - Intel Open Source Technology Center
WebGL Renderer - Intel Open Source Technology Center -- Mesa DRI Intel(R) Sandybridge Mobile
windowLayerManagerRemote - true
AzureCanvasBackend - cairo
AzureContentBackend - cairo
AzureFallbackCanvasBackend - none
AzureSkiaAccelerated - 0
Using Firefox 39.0.0 ~ 39.0.3, YouTube videos played using the HTML5 player (Flash not installed) would work fine for a while (eating CPU in the background) until eventually, videos fail to start playing and all open Firefox windows become unresponsive for periods of about 30 seconds with responsive intervals of maybe 10 seconds. RAM usage at this point also shoots through the roof with Firefox eating anywhere from 1.8GB to 2.3GB.

This issue was not present in Firefox 37 which I downgraded to until this gets resolved.
The same issue is also happening with Firefox 41 Beta 1 FYI.
I'm on 40.0.2. Firefox is using the HTML5 youtube player.

The more of the screen the video covers, the more CPU is used. Fullscreen @ 2560x1440 uses ~60% on all eight cores (4 real cores). CPU usage only high when the video is actually playing.
Component: Audio/Video → Audio/Video: Playback
It seems the issue has been fixed for me...

I noticed that Direct2D and DirectWrite were both disabled yesterday (driver was apparently blacklisted). Forcing them enabled caused Firefox to not display anything (black screen).

Today Direct2D and DirectWrite are both enabled (without needing to force it). CPU usage has gone back down to normal levels while viewing HTML5 videos on Youtube.

I'm not sure why it works now. I haven't updated my drivers between yesterday and today.
Wilson, can you still reproduce this bug on Firefox Nightly 43?

https://nightly.mozilla.org/
Holy moly!

Nightly 43a1 uses so little ram! It's so beautiful~ (;*△*;)

The CPU and ram issues seem to have cleared up. Mind you this test has only been running for 8 minutes. I will begin using YouTube as I used to and report again.
After a day of testing it appears that the ram usage shifted from the Firefox executable to the plugin-container executable.

Firefox with 2 windows and 32 tabs open using about 400MB of ram.
Plugin Container running two YouTube tabs eating up a whopping 1.3GB of ram.

Now the plugin container executable is presenting the same erratic CPU behaviour that Firefox used to. CPU usage spikes to 100% (of one core) at random. On first start, it's really fast and responsive with fluid playback to 1080p 60 video. After an hour (as ram usage goes way up) it begins hiccuping during video startup and pause/play but playback itself is still smooth.

Overall it's quite a bit better than Firefox 39/40, but still needs a lot of work.
Firefox 40.0.3
3.19.0-26-generic kernel
GPU: AMD Radeon HD 7900 Series
4.4.13374 Compatibility Profile Context 15.20.1013

Html5 video is still unplayable. Only workaround for youtube is forcing Flash instead. 

Same applies for beta 43.0a1
I played the example video in the OP and my CPU utilization was 1%.  I'm running the latest inbound at http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-inbound-win64-pgo/

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:43.0) Gecko/20100101 Firefox/43.0

Graphics
--------

Adapter Description: AMD Radeon R9 200 / HD 7900 Series
Adapter Drivers: aticfx64 aticfx64 aticfx64 amdxc64 aticfx32 aticfx32 aticfx32 amdxc32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64
Adapter RAM: 3072
Asynchronous Pan/Zoom: wheel input enabled
ClearType Parameters: D [ Gamma: 2200 Pixel Structure: R ClearType Level: 100 Enhanced Contrast: 300 ] D [ Gamma: 2200 Pixel Structure: B ClearType Level: 0 Enhanced Contrast: 50 ]
Device ID: 0x6798
Direct2D Enabled: true
DirectWrite Enabled: true (10.0.10240.16430)
Driver Date: 8-21-2015
Driver Version: 15.201.1151.0
GPU #2 Active: false
GPU Accelerated Windows: 1/1 Direct3D 11 (OMTC)
Subsys ID: 00000000
Supports Hardware H264 Decoding: Yes
Vendor ID: 0x1002
WebGL Renderer: Google Inc. -- ANGLE (AMD Radeon R9 200 / HD 7900 Series Direct3D11 vs_5_0 ps_5_0)
windowLayerManagerRemote: true
AzureCanvasBackend: direct2d 1.1
AzureContentBackend: direct2d 1.1
AzureFallbackCanvasBackend: cairo
AzureSkiaAccelerated: 0
Tried some YouTube HTML5 videos and they also used very little CPU.  When a video starts it uses about 10% or so then settles down to 3% to 4%.
Sorry Gary, how can I install that build you mention to test if the big is gone in newest builds?
I've discovered that, in some systems, FF41 sets media.hardware-video-decoding.failed to true instead of false, leading to slowdowns and high CPU usage while playing HTML5 videos.

I suppose this happens because they have blacklisted (?) some GPU's because they dont support DXVA 2.0, the problem is that GPU's like mine support it and can decode this kind of stuff (locally and over the web), leading to this weird behaviour.

My specs just in case:
CPU: AMD Athlon X2 QL-65 @ 2.1 Ghz (Dual Core)
RAM: 4 GB (3.75 usable)
GPU: ATI Radeon HD 3200 (256 MB, ATI Avivo supported including DVXA 2.0, 2012 drivers v8.961.0.0)
HDD: Seagate Momentus 7200.2 (7200 RPM, 500 GB SATA II)
Resolution: 1366 x 768 px (32 bit)
OS: Windows 7 Home Premium x64

I've tested downloading the same video it's impossible to see without setting media.hardware-video-decoding.failed to false and playing locally, 1280 x 720 x 60 fps, runs smoothly in Windows Media Player, and VLC with OpenGL and DXVA 2.0 enabled. So no, not a card or driver problem...

I notice that also, there is a bug, in which, if flash tries to load on Youtube and you want to play a 60fps video, lags and problems occur, also, Firefox doesn't use the GPU for playing the video, instead it tries to rely entirely on the CPU, causing massive slowdowns.

I hope this info helps...
So, I've installed Nightly 440a1 to test, this version is hella faster than FF41!!!!. The bug with flash loading on Youtube and HTML5 videos is solved.
BUT... Why my damn GPU is blacklisted in the setting media.hardware-video-decoding.failed? I use 2012 drivers (v8.961.0.0) and it clearly supports DXVA 2.0 and Hardware h264 decoding, I've tested with local videos with the same codec, and they run smoothly...

Can I ask being removed from this blacklist? I can clearly play this videos in Nightly 440a1 and even FF41 if I set media.hardware-video-decoding.failed to false with no issues... My specs are in my former post...

Great work by now Mozilla team, Nightly 440a1 feels a lot more solid than FF41!!
Upgraded to the latest ATI drivers possible for my card (2013 v8.970.100.1100)... still blacklisted... media.hardware-video-decoding.failed still sets to true in new installs and profiles...

I wonder why I'm blacklisted since video playback goes incredibly fine if I set that to false, no glitches, no artfifacts, no nothing...
(In reply to ferline2000mx from comment #39)
Please open another bug for this problem. This bug is not related to your problem:
* This bug is not caused by firefox not using hardware decoding. Even if firefox is using software decoding the CPU usage would not be this high (>100%).
* It seems like that this bug only appears on Linux
(In reply to Henry Hu from comment #40)
> (In reply to ferline2000mx from comment #39)
> Please open another bug for this problem. This bug is not related to your
> problem:
> * This bug is not caused by firefox not using hardware decoding. Even if
> firefox is using software decoding the CPU usage would not be this high
> (>100%).
> * It seems like that this bug only appears on Linux

Oh... sorry XD
Using the open source AMD Radeon Drivers on Ubuntu 14.04 and updating Firefox to 41.0.1 seems to solve the issue.
Only problem is I can't set the youtube video resolution (only option is 'auto-360p') and used an "add-on" as a workaround.
Running firefox 41.0.1 on FreeBSD CURRENT with open source intel drivers.
I observed that just playing an ogg file (audio only) would cause high CPU usage.
Then I configured alsa to use pulse instead of OSS, and, the CPU usage is low as expected.
Somehow firefox is issuing frequent 1-byte writes when using alsa with OSS backend.
You may try an ogg file. If it also causes high CPU usage, then we know that it's some problem with the audio part.
Mac Firefox 39-41 extremely high CPU usage while playing HTML5 video (regardless of site/player)
Tried safe mode
Tried new installation (new profile)
CPU usage: 140%-165% on a 2.3 GHz Intel Core i7 MBP. (On safari uses 1/5 CPU)


Downgraded to ver 37. CPU usage is at least 1/4 now!!! This is a deal breaker guys.
Jean-Yves, do you think this high CPU usage when playing HTML5 video on Linux is related to GStreamer? Firefox 39–41 are affected, but 37 is not. Did something Linux-specific change in 38 or 39?
Flags: needinfo?(jyavenard)
Probably worth trying 42 RC2... 

Otherwise, 43 and later don't use gstreamer by default and CPU usage will be *much* better there and so will performance.

To get higher resolution in YouTube you'll need to use 43. But that's thanks you YouTube who've decided to not serve high resolution video without MediaSource.
Flags: needinfo?(jyavenard)
(In reply to paul from comment #44)
> Mac Firefox 39-41 extremely high CPU usage while playing HTML5 video
> (regardless of site/player)
> Tried safe mode
> Tried new installation (new profile)
> CPU usage: 140%-165% on a 2.3 GHz Intel Core i7 MBP. (On safari uses 1/5 CPU)
> 
> 
> Downgraded to ver 37. CPU usage is at least 1/4 now!!! This is a deal
> breaker guys.

if you're experiencing issue on mac, open a bug. this is about Linux/FreeBSD and gstreamer ; nothing to do with mac.
Ubuntu 15.10
4.2.0-22-generic #27-Ubuntu SMP Thu Dec 17 22:57:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Intel® Core™ i7-3537U CPU @ 2.00GHz × 4 
Firefox 43.

a 720p video fro youtube brings Firefox 110-160% and up to over 200% CPU while the same video, same resolution on VLC is always between 25-40%. 

Something is horribly wrong here :) 
What can I do to help?
Updating to kubuntu 15.10 ,using propriety AMD drivers and firefox is stressing cpu even scrolling a page.
I don't know if it's html related or hardware accelerated issue but on 

https://developer.mozilla.org/media/uploads/demos/p/a/paulrouget/8bfba7f0b6c62d877a2b82dd5e10931e/hacksmozillaorg-achi_1334270447_demo_package/HWACCEL/

I can't get above 12fps. Tried the nightly build also.
Switched to chromium unfortunately...
(In reply to Daniele Dellafiore from comment #48)
> Ubuntu 15.10
> 4.2.0-22-generic #27-Ubuntu SMP Thu Dec 17 22:57:08 UTC 2015 x86_64 x86_64
> x86_64 GNU/Linux
> Intel® Core™ i7-3537U CPU @ 2.00GHz × 4 
> Firefox 43.
> 
> a 720p video fro youtube brings Firefox 110-160% and up to over 200% CPU
> while the same video, same resolution on VLC is always between 25-40%. 
> 
> Something is horribly wrong here :) 
> What can I do to help?

VLC can use hardware acceleration, we don't. So cpu usage will almost always be higher.
(In reply to Jean-Yves Avenard [:jya] from comment #50)
> (In reply to Daniele Dellafiore from comment #48)
> > Ubuntu 15.10
> > 4.2.0-22-generic #27-Ubuntu SMP Thu Dec 17 22:57:08 UTC 2015 x86_64 x86_64
> > x86_64 GNU/Linux
> > Intel® Core™ i7-3537U CPU @ 2.00GHz × 4 
> > Firefox 43.
> > 
> > a 720p video fro youtube brings Firefox 110-160% and up to over 200% CPU
> > while the same video, same resolution on VLC is always between 25-40%. 
> > 
> > Something is horribly wrong here :) 
> > What can I do to help?
> 
> VLC can use hardware acceleration, we don't. So cpu usage will almost always
> be higher.

Thanks for clear answer. If I can use your knowledge some more.. After some search I stille have poor information on where hw acceleration is used. Eg: this https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration is confusing and incomplete. I did think that fixing this https://bugzilla.mozilla.org/show_bug.cgi?id=1207429 would have allowed hw acceleration but it seem is not the case. So my question is: 

From your statement, it looks like there are some architectural constraint that you'll never be able to overcome. Is this only in linux? Why? I guess windows and OSX have hw acceleration, or have they? 

I will be glad to read some tech docs, I just cannot find anything detailed. 

Thanks for your time.
Ok, I have saerched more. First off, there is a LOT of confusion over the Web. People talk about Hardware acceleration confusing Video and Compositing. 
Video Acceleration seem not possible on linux / gstreamer / ffmpeg... maybe someone can help me understand why. 
Compositing acceleration (OMTC) was supposed to be anabled by default as per: https://bugzilla.mozilla.org/show_bug.cgi?id=722012 back in September, but the two key properties: 

layers.offmainthreadcomposition.enabled
layers.acceleration.force-enabled 

were false with default settings on my Firefox 43 (stable) on Linux. 

I've enabled both of them and the same Youtube video that yesterday was 110-160% CPU today is 75-85%. Impressie. More difficoult to say if everything else has been speed-up.
Ok, I've fount this: https://bugzilla.mozilla.org/show_bug.cgi?id=563206
I'll follow progress there, thanks :)
See Also: → 1163327
(In reply to Sammy Atmadja from comment #0)
> firefox consumes 100% cpu while playing the video, but stays responsive.
> pausing & resuming the video reduces the cpu usage to normal

Video decoding uses a lot of CPU on Linux because we don't support hardware decoding but it shouldn't be using 100% CPU. Is there still an issue with using 100% CPU?
Are you still seeing 100% CPU usage in Firefox 44?
Flags: needinfo?(sammy)
No, haven't seen the bug for a while now. Probably fixed since the libgstreamer update. I'll mark it WORKSFORME. Thanks all.
Status: NEW → RESOLVED
Closed: 10 years ago8 years ago
Flags: needinfo?(sammy)
Resolution: --- → WORKSFORME
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #55)
> Are you still seeing 100% CPU usage in Firefox 44?

Yes, It had happened in FF 42 but disappeared in 43. Now the problem returns in version 44 .
I am also having this issue

Firefox 43
Firefox Nightly (43)
Intel Core i7 2600K @ 3.40GHz
AMD R290
16GB

VIDEO EXAMPLE: http://clips.vorwaerts-gmbh.de/VfE_html5.mp4
ALSO: Youtube, Youtube using H264ify addon

Happens regardless of Hardware Acceleration being on/off

DOES NOT happen when downloading video and running locally.

I don't actually see CPU usage or working/commit RAM on firefox.exe (using procexp) shoot up. I do however hear hardware fans go into lawnmower mode.

If sustained long enough, my entire system will hard crash.

This DOES NOT happen in Chrome or Chromium.
Also have this problem for flash AND mp4/H264 HTML5 playback on youtube and basicly all other websites that include ANY video-content.

I am on Ubuntu 15.10 with firefox 44 and firefox 45 64bit (both identical horrible performance) with this hardware:

4x Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
Nvidia M960 2GB DDR5 @ Driver 361.18 (from ppa:graphics-drivers/ppa)
Intel HD 4600 integrated graphics
16 GB 1600 MHz Ram

Hardwareacceleration is turned ON in firefox, it doesn't show any effect. When I watch a video with 1080p on youtube I easily have 70-80 % cpu load and the fans are spinning quite loudly. Cpu heats up over 70 °C. When I download the video and play it by VLC it's hard to reach 10 % load.
I changed these parameters in about:config, EVERYTHING had NO effect (all changes together and isolated)

gl.require-hardware; false AND true
layers.acceleration.force-enabled;true
layers.acceleration.disabled;false
webgl.msaa-force;true
webgl.force-enabled;true
media.mediasource.webm.enabled;true
media.mediasource.webm.audio.enabled;true
media.mediasource.mp4.enabled;true
media.mediasource.enabled;true
gfx.direct2d.disabled;false

Please fix this! It's terrible to have such bad performance with very recent hardware!
[Tracking Requested - why for this release]:
(In reply to trcp6mrxos from comment #59)

> Please fix this! It's terrible to have such bad performance with very recent
> hardware!

There is no hardware acceleration on Linux at this stage. See bug 1210726.

(and fwiw, at this stage no web browsers provide hardware accelerated video decoding).

70% CPU to decode 1080p VP9 on a 2.6GHz quad-core seems reasonable to me.
(In reply to Jean-Yves Avenard [:jya] from comment #61)

> There is no hardware acceleration on Linux at this stage. See bug 1210726.
Why?

> (and fwiw, at this stage no web browsers provide hardware accelerated video
On Windows I don't get a 70+ °C CPU.

> 70% CPU to decode 1080p VP9 on a 2.6GHz quad-core seems reasonable to me.
No, this is new in more recent firefox versions. And bbased on my experience limited on linux for now.

Does anyone else confirm that on windows the playback of 1080p is less cpu-consuming for 44 und 45?
Windows 7 x64
Intel Core i7 2600K @ 3.40GHz
AMD R290
16GB

It turns out that the GPU temperature is shooting up which is probably what is causing issues for me.

http://imgur.com/a/lcXSh

This does NOT happen during Chrome, does NOT happen during local playback via MPC.

Should I open a different bug as this one references CPU?
(In reply to trcp6mrxos from comment #62)
> (In reply to Jean-Yves Avenard [:jya] from comment #61)
> 
> > There is no hardware acceleration on Linux at this stage. See bug 1210726.
> Why?
> 
> > (and fwiw, at this stage no web browsers provide hardware accelerated video
> On Windows I don't get a 70+ °C CPU.
> 
> > 70% CPU to decode 1080p VP9 on a 2.6GHz quad-core seems reasonable to me.
> No, this is new in more recent firefox versions. And bbased on my experience
> limited on linux for now.
> 
> Does anyone else confirm that on windows the playback of 1080p is less
> cpu-consuming for 44 und 45?

And also comment #61  

Drivers issues mostly cause them   
Try getting updates via gpu manufacturer's site.  

On Linux - if its a hybrid(Dual GPU Tech) like Optimus or so. Bumblebee and similar other tech should handle the cooling part.
(In reply to trcp6mrxos from comment #62)
> (In reply to Jean-Yves Avenard [:jya] from comment #61)
> 
> > There is no hardware acceleration on Linux at this stage. See bug 1210726.
> Why?

Because 

> 
> > (and fwiw, at this stage no web browsers provide hardware accelerated video
> On Windows I don't get a 70+ °C CPU.
> 

Not Linux.

My answer was in reference to Linux not having hardware acceleration at this stage
I also have extraordinarily high CPU usage when viewing HTML5 video in YouTube. I'm on Ubuntu 12.04.5 (vanilla). I just upgraded my video card (Nvidia GeForce GTX 750 Ti), and watching a video, CPU usage sits around 70% to 90% in Firefox. Under the old card, it was more like 150% to 200%. When I pause the video, CPU usage goes down to normal levels (8% or so). The bigger I enlarge the video, the more CPU usage it eats up. I tried restarting Firefox in Safe Mode, but get the same results. I'm on Firefox 46.0.1.
You need to log in before you can comment on or make changes to this bug.