Very high number of frame drops in videos with hardware acceleration enabled in linux
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
People
(Reporter: sk.griffinix, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0
Steps to reproduce:
- Enable hardware acceleration for video playback
- Open a video on youtube or any other video hosting website (preferably 1080p or higher)
- Play the video
Actual results:
Lot many frame drops during initial few seconds, not expected with the hardware (regression introduced in final week of February).
Video quality also drops in youtube from 1080p to 480p or lower.
If video is played from middle (such as after pausing, closing and reopening youtube video), The player often crashes (image attached)
Expected results:
Video should play without dropping multiple frames and automatically lowering quality.
I can only test for h.264 (which i force through h.264ify) since my GPU can not accelerate vp9
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Thanks for the report. Could you gather a profile with the Firefox profiler of the issue taking place, using the 'Media' preset then upload/share the profile and put the link on this bug? It sounds like this used to work, but regressed recently? You could also try using mozregression to find the specific range this regressed in, which would be much appreciated.
Here is the profiler data. This one is for website with multiple videos https://share.firefox.dev/3sFFIAg
Here is for youtube https://share.firefox.dev/3Cc6XWv
I am having some trouble setting up mozregression-gui (its spewing errors like segmentation fault) so may not be able to test it for a while
Updated•3 years ago
|
Btw, can no one else reproduce it? Its still unconfirmed
Comment 7•3 years ago
|
||
I guess I can reproduce this. VA-API has been broken for me for the past two weeks or so, most videos fail to play or fall back to a lower resolution. It might be related to the RDD sandbox, though it was working before.
FWIW, I've checked this out on my side and was unable to reproduce.
After testing with new profiles, only setting media.ffmpeg.vaapi.enabled to true causes initial frame drops, and crashing of video player in various situations. Setting it to false resolves the issue
Reporter | ||
Comment 10•3 years ago
|
||
I couldn't run mozregression as it continues to show me 'segmentation fault' error. However, this issue began in the last week of February
Reporter | ||
Comment 11•3 years ago
|
||
I did not mess with rdd sandbox as mentioned in comment #7. If someone can tell me what preference i need to switch there, I will try and report them too
Reporter | ||
Comment 12•3 years ago
|
||
Setting media.rdd-process.enabled to false resolves the issue even with media.ffmpeg.vaapi.enabled set to true
Reporter | ||
Comment 13•3 years ago
|
||
(In reply to az [:az] from comment #8)
FWIW, I've checked this out on my side and was unable to reproduce.
I am able to reproduce it in every nightly install with media.ffmpeg.vaapi.enabled set to true and media.rdd-process.enabled not set to false, both in x11 and wayland, and in gnome and kde. What is your config? Could it be due to difference in graphics driver? I have amd r5 260x with amdgpu garaphics
Comment 14•3 years ago
|
||
(In reply to Leo_sk from comment #13)
I am able to reproduce it in every nightly install with media.ffmpeg.vaapi.enabled set to true and media.rdd-process.enabled not set to false, both in x11 and wayland, and in gnome and kde. What is your config? Could it be due to difference in graphics driver? I have amd r5 260x with amdgpu garaphics
I'm using X11, Intel graphics with the modesetting driver, media.ffmpeg.vaapi.enabled set to true, and media.rdd-process.enabled set to true. With the RDD sandbox enabled Firefox is using software rendering for me, though I'm not running into any stuttering until I begin to really stress my CPU with 4K video and I haven't experienced any crashes. AFAIK there are currently some RDD sandbox issues, as Laurențiu mentioned. For now, disabling the sandbox by running the command "MOZ_DISABLE_RDD_SANDBOX=1 firefox" in a terminal without the quotes provides hardware acceleration on my side. Does running vainfo produce any interesting output? Have you had any success enabling / using VA-API in other apps, such as mpv, and verifying that GPU hardware acceleration is enabled with an external program? I've been checking my GPU decode activity using intel_gpu_top, though I'm not sure what the equivalent would be for AMD.
Reporter | ||
Comment 15•3 years ago
|
||
(In reply to az [:az] from comment #14)
I'm using X11, Intel graphics with the modesetting driver, media.ffmpeg.vaapi.enabled set to true, and media.rdd-process.enabled set to true. With the RDD sandbox enabled Firefox is using software rendering for me, though I'm not running into any stuttering until I begin to really stress my CPU with 4K video and I haven't experienced any crashes. AFAIK there are currently some RDD sandbox issues, as Laurențiu mentioned. For now, disabling the sandbox by running the command "MOZ_DISABLE_RDD_SANDBOX=1 firefox" in a terminal without the quotes provides hardware acceleration on my side. Does running vainfo produce any interesting output? Have you had any success enabling / using VA-API in other apps, such as mpv, and verifying that GPU hardware acceleration is enabled with an external program? I've been checking my GPU decode activity using intel_gpu_top, though I'm not sure what the equivalent would be for AMD.
I looked further into it, and I find behaviour on your side strange. According to bug 1743647, VAAPI will only work in rdd process, so setting media.rdd-process.enabled to false should have disabled VAAPI as well, which might explain why I stop experiencing the bug. There is radeontop for amd gpus, but I am using plasma's system monitor to monitor it. With avc1 I do get reduced cpu usage compared to av1, with almost equivalent GPU usage, so I guess any change I observed could just be due to efficiency of codecs in software decoder
Comment 16•3 years ago
|
||
(In reply to Leo_sk from comment #6)
Btw, can no one else reproduce it? Its still unconfirmed
I'm also experiencing this problem. Also X11, hitting it in Plasma as well as in awesome wm with FF98. I do not only have high frame drops, but also difficulties getting a video started at the first place.
Setting media.rdd-process.enabled to false does help getting the browser back to a usable state. I will try "MOZ_DISABLE_RDD_SANDBOX=1 firefox" next.
Comment 17•3 years ago
|
||
With "MOZ_DISABLE_RDD_SANDBOX=1 firefox" it is indeed possible to set media.rdd-process.enabled to true again and hardware-decoding is available. I tested it and the result was a about 30% reduced CPU-utilization on my old low-end processor.
Reporter | ||
Comment 19•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #18)
Do you still see this issue?
Thanks.
Yes, unless MOZ_DISABLE_RDD_SANDBOX=1 is used
Comment 20•3 years ago
|
||
If MOZ_DISABLE_RDD_SANDBOX=1 works for you it's a dupe of Bug 1751363.
Updated•3 years ago
|
Description
•