Closed
Bug 1165174
Opened 11 years ago
Closed 8 years ago
Video playback uses large amounts of CPU in Firefox 38
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: twatson52, Assigned: jya)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150326190726
Steps to reproduce:
Wanted to watch a youtube video ( this one https://www.youtube.com/watch?v=6-ZSXB3KDF0 specifically, at 720p 50fps ) on my MacBook Pro with 2GHz quad-core i7, 8GB of RAM, and OSX 10.9.5. Wondered why CPU usage was suddenly so high.
Actual results:
On Firefox 38, playing that video uses about 140% CPU (100% = one core on OSX, unlike Windows). This causes the laptop to get quite warm, spin up the fans rather annoyingly, consume lots of battery, etc.
Expected results:
On Firefox 37, playing that video uses about 40% CPU combined for Firefox and the Flash plugin process. The 'stats for nerds' window states that accelerated rendering and decoding are being used. I don't expect the new browser to use so much more CPU.
For fun, I installed a plugin that forces the playback engine Youtube uses. On 37 forcing HTML5, I still get around 40% CPU. On 38 forcing Flash, I get around 130% CPU too, and the 'stats for nerds' window states accelerated rendering is being used, but not accelerated decoding.
Flash's information and the CPU usage increase leads me to believe that Firefox 38 is somehow falling back on software video decoding, rather than using hardware video decoding like Firefox 37 did.
| Assignee | ||
Comment 1•11 years ago
|
||
We have no control about what the Flash module is using, in particular if it's using hardware acceleration or not.
Now back to HTML5/DASH where we can control:
If you set media.apple.forcevda to true (you may have to create the preference). Does it improve things for you?
Flags: needinfo?(twatson52)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jyavenard
Updated•11 years ago
|
Component: Untriaged → Video/Audio
Product: Firefox → Core
(In reply to Jean-Yves Avenard [:jya] from comment #1)
> We have no control about what the Flash module is using, in particular if
> it's using hardware acceleration or not.
>
> Now back to HTML5/DASH where we can control:
> If you set media.apple.forcevda to true (you may have to create the
> preference). Does it improve things for you?
Yes, this improves the CPU usage to Firefox 37 levels. Turning it back to false increases CPU usage again. This seems to be an acceptable solution.
Flags: needinfo?(twatson52)
| Assignee | ||
Comment 3•11 years ago
|
||
This is very puzzling. This forces firefox to use VDA (https://developer.apple.com/library/mac/technotes/tn2267/_index.html, which is a pure hardware decoder) rather than the newer Video Toolbox framework.
If you could run a debug version of firefox, I could ask you to start firefox with some logging option and I could tell you what's going on.
Any chance you could try against Firefox Beta or Aurora (developer edition)?
| Assignee | ||
Comment 4•11 years ago
|
||
Talking to Thomas offline, it appears that the issue is resolved in 38.0.5. I can't see any changes in regards to the video decoder between 38.0.1 and 38.0.5.
HW decoding was used in this instance (verified using a debug build).
So Anthony was suggesting it may have been a graphic change. Jeff would you have any ideas if there are changes between 38.0.1 and 38.0.5 that could explain that change in behaviour ?
Flags: needinfo?(jmuizelaar)
Comment 5•11 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #4)
> Talking to Thomas offline, it appears that the issue is resolved in 38.0.5.
> I can't see any changes in regards to the video decoder between 38.0.1 and
> 38.0.5.
> HW decoding was used in this instance (verified using a debug build).
>
> So Anthony was suggesting it may have been a graphic change. Jeff would you
> have any ideas if there are changes between 38.0.1 and 38.0.5 that could
> explain that change in behaviour ?
None, that I can think of.
Flags: needinfo?(jmuizelaar)
Updated•10 years ago
|
Component: Audio/Video → Audio/Video: Playback
Comment 6•10 years ago
|
||
Is this issue fixed?
I've been having issues that seem related to this. I'm using the developer edition (48.0a2 (2016-05-13)) but this has been an issue as long as I have had this laptop (roughly a year). Playing any video (html5) causes very high CPU usage and the CPU temperature rises to over 100˚ causing the fans to go nuts. In chrome I don't have this issue. Setting media.apple.forcevda to true didn't seem to do anything.
Comment 8•10 years ago
|
||
(In reply to liam from comment #7)
> I've been having issues that seem related to this. I'm using the developer
> edition (48.0a2 (2016-05-13)) but this has been an issue as long as I have
> had this laptop (roughly a year). Playing any video (html5) causes very high
> CPU usage and the CPU temperature rises to over 100˚ causing the fans to go
> nuts. In chrome I don't have this issue. Setting media.apple.forcevda to
> true didn't seem to do anything.
Can you post the graphics section of your about:support?
Flags: needinfo?(liam)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)
> (In reply to liam from comment #7)
> > I've been having issues that seem related to this. I'm using the developer
> > edition (48.0a2 (2016-05-13)) but this has been an issue as long as I have
> > had this laptop (roughly a year). Playing any video (html5) causes very high
> > CPU usage and the CPU temperature rises to over 100˚ causing the fans to go
> > nuts. In chrome I don't have this issue. Setting media.apple.forcevda to
> > true didn't seem to do anything.
>
> Can you post the graphics section of your about:support?
Features
Compositing
OpenGL
Asynchronous Pan/Zoom
wheel input enabled
WebGL Renderer
Intel Inc. -- Intel(R) Iris(TM) Graphics 6100
Hardware H264 Decoding
No
GPU #1
Active
Yes
Vendor ID
0x8086
Device ID
0x162b
Diagnostics
AzureCanvasAccelerated
1
AzureCanvasBackend
skia
AzureContentBackend
skia
AzureFallbackCanvasBackend
none
Comment 10•10 years ago
|
||
Just noticed my CPU usage rises even with CSS animation, not just video. It seems anything related to graphics causes large rises. The animations I'm looking at are only animating the opacity and transform properties, so such be hardware accelerated.
Comment 11•10 years ago
|
||
Ok, so, my colleague with the same model of macbook and same firefox has hardware h264 decoding set to yes. Why would mine be set to no?
| Assignee | ||
Comment 12•10 years ago
|
||
Try with Firefox nightly and copy the entire content of about:support thanks.
Comment 13•8 years ago
|
||
Closing based on lack of activity. Thanks for the report, and feel free to re-open if you're having the same issue with current Firefox.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(liam)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•