Closed Bug 1902771 Opened 1 year ago Closed 1 year ago

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)

Firefox 127
x86_64
Linux
defect

Tracking

()

RESOLVED WORKSFORME

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.

My GPU is a AMD Radeon RX 6600 and I am on Linux. Other Youtube videos work fine.

The issue is reproducable and always happens for me even if I restart Firefox or the OS.

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

I am on Xubuntu 24.04 with Mesa 24.0.5.

Thanks for the report! Please open about:support, click on "Copy text to clipboard" and paste it here.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Attached file about support.txt

Same AMD bug as bug 1902227 ?

(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+.

Does the problem still occur after setting media.ffmpeg.vaapi.force-surface-zero-copy to 0 on about:config and restarting Firefox?

Summary: Hardware decode fails for specific Youtube video → VAAPI/Radeon RX 6600/Mesa 24.0.5.0/xfce x11/Ubuntu24.04: Hardware decode fails for specific 4K Youtube video

@Darkspirit: Yes, at least when decoding in AV1 4K. Sometimes the video switches to VP9 for some reason.

See Also: → 1902781
Attached file log.txt

Log output of this command:
MOZ_LOG="FFmpegVideo:5" firefox https://www.youtube.com/watch?v=xeBykwZFwck > log.txt 2>&1

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.

Worth a try at least, even if we believe this to not be on an affected version.

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)

Looks like AV1 version of the video is no longer available, YT gives me VP9 only for 4K.

But yes, AMD is known to be buggy in 4K AV1 decoding. That's we did the HW -> SW decode switch for slow decode.

(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.

(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?

Flags: needinfo?(jmathies)

The issue is no longer there with Firefox 130. Maybe bug 1902227 actually solved it.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: