VAAPI/Radeon RX 6600/Mesa 24.0.5.0/xfce x11/Ubuntu24.04: Hardware decode fails for specific 4K Youtube video
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
People
(Reporter: abspack, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0
Steps to reproduce:
Go to this page https://www.youtube.com/watch?v=xeBykwZFwck and watch the video in 4K.
Actual results:
The video stutters because CPU goes brrrr with 100 % usage with 8 threads. At the beginning of the video there is not much movement happening so decoding work is easy but at 2:12 the video goes brrr with lots of motion which is also visible in 100 % CPU usage.
Expected results:
The CPU should have an easy day with usage of maybe 20 % and hardware decoding happening on the GPU.
| Reporter | ||
Comment 1•1 year ago
|
||
My GPU is a AMD Radeon RX 6600 and I am on Linux. Other Youtube videos work fine.
| Reporter | ||
Comment 2•1 year ago
|
||
The issue is reproducable and always happens for me even if I restart Firefox or the OS.
Updated•1 year ago
|
| Reporter | ||
Comment 3•1 year ago
|
||
I am on Xubuntu 24.04 with Mesa 24.0.5.
Comment 4•1 year ago
|
||
Thanks for the report! Please open about:support, click on "Copy text to clipboard" and paste it here.
| Reporter | ||
Comment 5•1 year ago
|
||
Comment 6•1 year ago
|
||
Same AMD bug as bug 1902227 ?
| Reporter | ||
Comment 7•1 year ago
|
||
(In reply to Paul Adenot (:padenot) from comment #6)
Same AMD bug as bug 1902227 ?
As I've written I am on Mesa 24.0.5 so this is not Mesa 24.0.7+.
Comment 8•1 year ago
|
||
Does the problem still occur after setting media.ffmpeg.vaapi.force-surface-zero-copy to 0 on about:config and restarting Firefox?
| Reporter | ||
Comment 9•1 year ago
|
||
@Darkspirit: Yes, at least when decoding in AV1 4K. Sometimes the video switches to VP9 for some reason.
| Reporter | ||
Comment 10•1 year ago
|
||
Log output of this command:
MOZ_LOG="FFmpegVideo:5" firefox https://www.youtube.com/watch?v=xeBykwZFwck > log.txt 2>&1
Comment 11•1 year ago
|
||
It works for a while, then we see:
[RDD 12861: MediaPDecoder #2]: D/FFmpegVideo FFVPX: HW decoding is slow, switch back to SW decode
and indeed, there's a lot of slowness happening when looking (search for decode: failed to decode in time). After 15 videos frames are widely over budget (i.e. it took longer to decode them, and the decoder is late consistently), we switch to software decoding. Because this is AMD, it makes me think of the other problem that we can fix by patching our ffmpeg copy (bug 1902227).
We see that indeed the software decoder is more consistent with decode time. I intend to patch our copy of ffmpeg soon-ish, you can follow this bug to know when, and test in Nightly with this GPU.
Comment 12•1 year ago
|
||
Worth a try at least, even if we believe this to not be on an affected version.
Comment 13•1 year ago
|
||
The severity field is not set for this bug.
:jimm, could you have a look please?
For more information, please visit BugBot documentation.
Comment 14•1 year ago
|
||
Looks like AV1 version of the video is no longer available, YT gives me VP9 only for 4K.
Comment 15•1 year ago
|
||
But yes, AMD is known to be buggy in 4K AV1 decoding. That's we did the HW -> SW decode switch for slow decode.
| Reporter | ||
Comment 16•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #14)
Looks like AV1 version of the video is no longer available, YT gives me VP9 only for 4K.
This is strange, I still can access 4K AV1.
| Reporter | ||
Comment 17•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #14)
Looks like AV1 version of the video is no longer available, YT gives me VP9 only for 4K.
@Martin Stránský: I believe I know what's the issue. Can you please login into Youtube and on the left side go to settings -> Play and Performance and set "always prefer AV1". Would you mind to test again with this enabled?
Updated•1 year ago
|
| Reporter | ||
Comment 18•1 year ago
|
||
The issue is no longer there with Firefox 130. Maybe bug 1902227 actually solved it.
Description
•