Closed Bug 1588344 Opened 5 years ago Closed 5 years ago

mp4 not playing, high CPU usage, tab crash

Categories

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

70 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1368063

People

(Reporter: tallguyyo, Unassigned)

Details

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

Steps to reproduce:

these links

Actual results:

mp4 not working, high cpu usage

on these two links as examples:

.mp4 plays in chrome or downloaded files got no issue. but in firefox (regardless of post or pre v57), they don't play. I have even tried brand new fresh profile and safe mode, just no luck.

other examples:

the first link plays only audio, where as 2nd one just creates 100% load on all 8 cores of my cpu load till it crashes the tab this confirmed issue.

note: chrome also has similar issue until I turn off hardware acceleration then it start working. but for freshly installed firefox pre/post 56 (total of 5-6 browsers I tried) all got this problem with or without hardware acceleration.

please help.

Expected results:

mp4 playing just like it does in chrome.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

any help pls?

kinetik, could you triage this?

Flags: needinfo?(kinetik)

(In reply to tallyo from comment #0)

This is an MP4 containing High 4:4:4 Predictive (yuv444p), which is not supported by Firefox (because the OS decoders don't offer support, therefore we have no way to handle them). An error is reported to the developer console and the media element to this effect.

Firefox can support yuv444p in VP9, but it's not supported when using hardware decoding (due to the codec limitations), so it'll only work for the subset of Firefox uses using software decoding.

Same underlying media link as above, same issue.

Both Main (420p). These play fine for me.

Note for anyone else: the above links are NSFW.

the first link plays only audio

The first link is 1404x2304 at 60fps, so likely hitting a performance issue and entering video frame skipping. Can you please attach a copy of your about:support page so we can get an idea of your system specs?

where as 2nd one just creates 100% load on all 8 cores of my cpu load till it crashes the tab this confirmed issue.

This link is 466x700 at 33⅓fps, so that CPU use is obviously unusual. Can you please provide a link to the crash report produced when the crash occurs? It should be available in about:crashes.

Flags: needinfo?(tallguyyo)
Flags: needinfo?(kinetik)

(In reply to Matthew Gregan [:kinetik] from comment #4)

(In reply to tallyo from comment #0)

This is an MP4 containing High 4:4:4 Predictive (yuv444p), which is not supported by Firefox (because the OS decoders don't offer support, therefore we have no way to handle them). An error is reported to the developer console and the media element to this effect.

but it works on my window video player Potplayer and I downloaded codecs for my windows, so shouldnt it be working? can firefox not use the codec on my computer to play it same as the video player?

Firefox can support yuv444p in VP9, but it's not supported when using hardware decoding (due to the codec limitations), so it'll only work for the subset of Firefox uses using software decoding.

could you elaborate more on it by only work for subset of firefox using software decoding (disable hw acceleration?). cause I turned off hardware acceleration and still no good.

Both Main (420p). These play fine for me.

the first link plays only audio

The first link is 1404x2304 at 60fps, so likely hitting a performance issue and entering video frame skipping. Can you please attach a copy of your about:support page so we can get an idea of your system specs?

both video played for you? how can I get it to work?
my system is 8700k or 8086k which is intel 8th gen cpu 6 cores 12 threads with nvidia gtx 1070, hardware is of last 1-2 yrs there should be no problem with hardware but it just doesn't play video, only audio for first link.

heres my about:support in pastebin: https://pastebin.com/tvwA3pA0 (my new installed waterfox, same issue as my firefox too).

where as 2nd one just creates 100% load on all 8 cores of my cpu load till it crashes the tab this confirmed issue.

This link is 466x700 at 33⅓fps, so that CPU use is obviously unusual. Can you please provide a link to the crash report produced when the crash occurs? It should be available in about:crashes.

i find it that if i turn off and uncheck loop, cpu usage goes down, but still nothing playing. it no longer crashes just stay on 100% cpu usage when loop is checked for very long like 30 mins.. havent waited longer than 30 mins.

Flags: needinfo?(tallguyyo)

Thanks for the information so far.

(In reply to tallyo from comment #5)

but it works on my window video player Potplayer and I downloaded codecs for my windows, so shouldnt it be working? can firefox not use the codec on my computer to play it same as the video player?

It's a limitation of the OS APIs Firefox uses. Other players may have different functionality based on technical, security, and legal constraints.

could you elaborate more on it by only work for subset of firefox using software decoding (disable hw acceleration?). cause I turned off hardware acceleration and still no good.

None of the media you linked to in your initial report is VP9. I only mention VP9 capabilities for completeness. Sorry for any confusion.

both video played for you? how can I get it to work?
my system is 8700k or 8086k which is intel 8th gen cpu 6 cores 12 threads with nvidia gtx 1070, hardware is of last 1-2 yrs there should be no problem with hardware but it just doesn't play video, only audio for first link.

I'm testing on a very similar spec system. One difference is that your NVIDIA drivers are quite old (388.71, late 2017). Are you able to test with recent drivers?

heres my about:support in pastebin: https://pastebin.com/tvwA3pA0 (my new installed waterfox, same issue as my firefox too).

We're not able to offer support for Waterfox, sorry. Any testing/debugging to solve this issue will need to be done with a recent stable release of Firefox.

i find it that if i turn off and uncheck loop, cpu usage goes down, but still nothing playing. it no longer crashes just stay on 100% cpu usage when loop is checked for very long like 30 mins.. havent waited longer than 30 mins.

Per my earlier request, can you please provide a link to a crash report for the crashing tab issue?

Flags: needinfo?(tallguyyo)

(In reply to Matthew Gregan [:kinetik] from comment #6)

It's a limitation of the OS APIs Firefox uses. Other players may have different functionality based on technical, security, and legal constraints.

is this the reason why chrome works due to legal stuff? I had same problem on chrome until i turn off hardware acceleration then it start working which is kind of weird, my GPU is working fine so using GPU (assuming thats hw accel) should work.

None of the media you linked to in your initial report is VP9. I only mention VP9 capabilities for completeness. Sorry for any confusion.

oh ok.

I'm testing on a very similar spec system. One difference is that your NVIDIA drivers are quite old (388.71, late 2017). Are you able to test with recent drivers?

yes I did test with latest driver. it caused more problem for my system like games or video recording etc so I had to revert back eventually but thats one of the thing I've tried. because I made image back up/restore I tried many things such as latest GPU driver, various versions of firefox/waterfox and clean window OS installation so that gives maybe like 15-20 combination? tried all of them and none of them work, all show same symptoms.

We're not able to offer support for Waterfox, sorry. Any testing/debugging to solve this issue will need to be done with a recent stable release of Firefox.

here is a new one for fire fox: https://pastebin.com/XCdqvStY
I used firefox update to latest and created a pastebin, theres almost no preference change except few things in options such as hardware accel off (on/off dont matter tested it). with 1 addon ublock origin that's it. same issue cannot play with older version of firefox as well.

Per my earlier request, can you please provide a link to a crash report for the crashing tab issue?

I am now unable to duplicate the tab crash, that may have been an misunderstanding on my part where I closed one of the process in task manager causing tab to crash.

Flags: needinfo?(tallguyyo)

also found someone saying this:
"Disabling hardware acceleration in Firefox seems to have no effect in Firefox indeed. However, when trying it in Chrome, it seems to do the trick."

if that is what's really happening then disable HW accel would not help my case. How can I check if I have HW accel off (assuming options -> disable HW accel does not work). and if it's on how do I force it off via about:config. please help.

Rolling through on triage. Not clear that we have an actionable issue here yet, so leaving as is and answering questions that I can.

is this the reason why chrome works due to legal stuff? I had same problem on chrome until i turn off hardware acceleration then it start working which is kind of weird, my GPU is working fine so using GPU (assuming thats hw accel) should work.

I large part, yes. Chrome ships 3rd party software that allows for decoding of certain codec profiles that platforms such as Windows do not support. Firefox does not use the same software due to licensing limitations, rather than technical ones, given my understanding. This is why certain hardware supported decoding pipelines may not work on Windows under chrome, but falling back to software does.


It sounds to me like there are multiple problems here:

  • Some video does not play: because of the limitations discussed above, we will be unable to play these. We would like to, but it is in the hands of the platforms we run on.
  • Videos play, but with poor performance: my understanding is that this is what we're still trying to track down. Hardware acceleration may indeed help with performance in these cases.

Based on comment 7 it appears you have hardware acceleration turned off for some features: layers.acceleration.disabled is set to true in your preferences. Could you navigate to Options -> General Tab -> Scroll to near the bottom and check if "Use recommended performance settings" is checked?


As above, NSFW warning for the following links

https://chan.sankakucomplex.com/post/show/13923641
https://chan.sankakucomplex.com/post/show/16790609

The first of these is buggy for me on Windows. Playback stalls, or if I open the video directly it just skips to the end of the file. That page in general appears buggy under private browsing in the the page throws up "no video with supported format and mimetype found" -- but that's an issue for another bug.

Flags: needinfo?(tallguyyo)

(In reply to Bryce Seager van Dyk (:bryce) from comment #9)

Rolling through on triage. Not clear that we have an actionable issue here yet, so leaving as is and answering questions that I can.

please action if possible in near future, this is very important of keeping 1 browser work for everything. human nature is to be lazy so we design things to better everything, tools, process etc and if we can have 1 browser for everything it is easy and efficient. firefox would able to get much more chrome share and not push user towards chrome imho.

I large part, yes. Chrome ships 3rd party software that allows for decoding of certain codec profiles that platforms such as Windows do not support. Firefox does not use the same software due to licensing limitations, rather than technical ones, given my understanding. This is why certain hardware supported decoding pipelines may not work on Windows under chrome, but falling back to software does.

I understand if firefox can't use samething as chrome due to licensing but firefox should be able to implement a feature for us to use video player codec or something like k-lite mega codec? we users can download these codec free of charge, and our video players such as KMP, POT and VLC plays fine if we download mp4 files. if the player use these codec then firefox can too maybe setup a setting where we can browse and use codec for decrypting some of these mp4/gif files while browsing.

It sounds to me like there are multiple problems here:

  • Some video does not play: because of the limitations discussed above, we will be unable to play these. We would like to, but it is in the hands of the platforms we run on.
  • Videos play, but with poor performance: my understanding is that this is what we're still trying to track down. Hardware acceleration may indeed help with performance in these cases.

Based on comment 7 it appears you have hardware acceleration turned off for some features: layers.acceleration.disabled is set to false in your preferences. Could you navigate to Options -> General Tab -> Scroll to near the bottom and check if "Use recommended performance settings" is checked?

yes I have revert to using recommended performance several times with different combination of firefox, waterfox, GPU drivers and no luck, all exist the same problem. at this point I really thinking it is windows, which is what you mentioned above that chrome shipped with with their own codec.

I have seen people comment on that windows 10 user do not have this issue with twitter gif or mp4 and if upgrading to windows 10 really is the option and firefox can't implement such a fix I mentioned above, then theres really no point using Firefox anymore simply because in future if windows update again, we will be forced each time to upgrade and we can't have that.

a lot of my software that releases fixes/update to support latest content and workaround, the ones that do not work/updated gets replaced with something new that can. firefox already is very similar to chrome with the whole web extension thing and losing a ton of easy to access customization, please do not lose the capability of convenience browsing as well.

As above, NSFW warning for the following links

https://chan.sankakucomplex.com/post/show/13923641
https://chan.sankakucomplex.com/post/show/16790609

The first of these is buggy for me on Windows. Playback stalls, or if I open the video directly it just skips to the end of the file. That page in general appears buggy under private browsing in the the page throws up "no video with supported format and mimetype found" -- but that's an issue for another bug.

windows 8.1 shows MIME type not found, windows 8 shows gray but at least plays the audio, windows 10 probably play just fine. this suggest to me that firefox uses windows's own decode/codec to work the video. implement a fix by allowing user to choose different codec/decode they can use just like the video players can. for such a capable development team I honestly don't think this is a hard issue to implement.

Flags: needinfo?(tallguyyo)

(In reply to Bryce Seager van Dyk (:bryce) from comment #9)

Rolling through on triage. Not clear that we have an actionable issue here yet, so leaving as is and answering questions that I can.

is this the reason why chrome works due to legal stuff? I had same problem on chrome until i turn off hardware acceleration then it start working which is kind of weird, my GPU is working fine so using GPU (assuming thats hw accel) should work.

I large part, yes. Chrome ships 3rd party software that allows for decoding of certain codec profiles that platforms such as Windows do not support. Firefox does not use the same software due to licensing limitations, rather than technical ones, given my understanding. This is why certain hardware supported decoding pipelines may not work on Windows under chrome, but falling back to software does.

Is there a bug tracking this? Do we know enough to mark this bug as blocked by that bug, or even a duplicate?

Flags: needinfo?(bvandyk)

Bug 1368063 is what I'd mark this as a dupe of for the 444 issue in h264. There are a few issues going on here, more below.


I think there's some mixing the two issues here. One of the issues is supporting certain kinds of media, which covers the videos in the initial bug that do not play at all. Changing Windows versions may help with playing these because we rely on Windows to give us the functionality to play certain kinds of Windows.

Firefox cannot ship codec packs to allow decoding. We know how to this technically, this is not a technical issue, it is one around licensing. Licensing these codecs is typically very complex and can be very expensive. I understand that codec packs exist, as do desktop players that ship with broad codec support, but my understanding is that those things operate largely from a grey area in terms of licensing, one which Firefox cannot operate in.


The other issue is that the videos that do play are not playing as nicely as you'd like. This is something we can potentially help with, but it's not clear what the issue is here. In this context, hardware acceleration may be something that can help, by lightening the load on your CPU.

If the check box mentioned in comment 9 is check you could also try navigating to about:config and resetting the layers.acceleration.disabled to false (I initially misidentified this as already being set to false in my prior comment, which I corrected). That pref is currently set to true based on the information provided, which may cause performance issues.

Flags: needinfo?(bvandyk) → needinfo?(tallguyyo)

(In reply to Bryce Seager van Dyk (:bryce) from comment #12)

Bug 1368063 is what I'd mark this as a dupe of for the 444 issue in h264. There are a few issues going on here, more below.


I think there's some mixing the two issues here. One of the issues is supporting certain kinds of media, which covers the videos in the initial bug that do not play at all. Changing Windows versions may help with playing these because we rely on Windows to give us the functionality to play certain kinds of Windows.

Firefox cannot ship codec packs to allow decoding. We know how to this technically, this is not a technical issue, it is one around licensing. Licensing these codecs is typically very complex and can be very expensive. I understand that codec packs exist, as do desktop players that ship with broad codec support, but my understanding is that those things operate largely from a grey area in terms of licensing, one which Firefox cannot operate in.


The other issue is that the videos that do play are not playing as nicely as you'd like. This is something we can potentially help with, but it's not clear what the issue is here. In this context, hardware acceleration may be something that can help, by lightening the load on your CPU.

If the check box mentioned in comment 9 is check you could also try navigating to about:config and resetting the layers.acceleration.disabled to false (I initially misidentified this as already being set to false in my prior comment, which I corrected). That pref is currently set to true based on the information provided, which may cause performance issues.

thank you on further elaborate this. I understand firefox cannot come with it's own codec like those video players, that is not what I'm asking though. what I am looking for is, if firefox has a feature allow it's user to browse and choose type of codec of user's own choice to browse its web on any media (this shouldnt be a licensing issue anymore would it?)

for example, firefox by default can't play these files but allow users to choose a codec pack downloaded from the internet to decode some media as they browse. user can choose between window media codec pack, or switch to klite mega codec pack, or ffmpeg codec pack etc etc. this should be fine as firefox on it's own does not ship with it, only allows user to do what they want with browser.

Flags: needinfo?(tallguyyo)

The licensing issues around codecs and their use are complex, and I lack a suitable background to give a definitive answer as to if the approach you're suggesting would avoid issue.

On the technical side it remains a complex issue. There is not a standardized way to expose codecs to a browser. Historically there have been systems such as Direct Show on Windows which allowed for some standardization, but in this case Microsoft are moving away from such an approach. So there is not an easy way for the browser to just pick up and use something.

There are other technical issues, such as compatibility and ensuring the codecs work well.

Beyond that there are privacy and security concerns around loading what can amount to arbitrary code from a users local machine. Even if the codecs themselves were not malicious, this is an area where a poorly implemented codec could expose users to significant risk.

Because of these details this is not something we're considering at this point.

Closing this bug, as it seems the primary issue of being unable to play certain videos has been addressed.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

(In reply to Bryce Seager van Dyk (:bryce) from comment #14)

The licensing issues around codecs and their use are complex, and I lack a suitable background to give a definitive answer as to if the approach you're suggesting would avoid issue.

On the technical side it remains a complex issue. There is not a standardized way to expose codecs to a browser. Historically there have been systems such as Direct Show on Windows which allowed for some standardization, but in this case Microsoft are moving away from such an approach. So there is not an easy way for the browser to just pick up and use something.

There are other technical issues, such as compatibility and ensuring the codecs work well.

Beyond that there are privacy and security concerns around loading what can amount to arbitrary code from a users local machine. Even if the codecs themselves were not malicious, this is an area where a poorly implemented codec could expose users to significant risk.

Because of these details this is not something we're considering at this point.

Closing this bug, as it seems the primary issue of being unable to play certain videos has been addressed.

*** This bug has been marked as a duplicate of bug 1368063 ***

its regrettable that firefox has really fallen behind in terms of ease of use and conveniences. we obviously will not upgrade window each time and platform will target mainstream chrome users so for them if it works they have no need to change. its time I drop firefox and move onto chrome.

You need to log in before you can comment on or make changes to this bug.