Open Bug 1884529 Opened 11 months ago Updated 7 months ago

[AMD Radeon RX 6700 XT] 4K AV1 video on YouTube freezes while playback

Categories

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

Firefox 123
x86_64
Windows 10
defect

Tracking

()

UNCONFIRMED

People

(Reporter: biolan93, Unassigned)

References

Details

Attachments

(1 file)

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

Steps to reproduce:

To have Windows 10 installed with the AV1 Video Extension from the Microsoft Store and the latest Adrenaline 24.2.1 driver for the AMD Radeon RX 6700 XT, which supports AV1 Hardware Decoding, according to Tech Specs.
In Firefox 123, open any 4K video with the AV1 codec (check in Stats for Nerds) in standard, theater or full screen mode. (e.g. https://www.youtube.com/watch?v=UC-0AJ6AwVM )
This problem can be reproduced in the latest Nightly build 20240309090041.

Actual results:

Choppy playback with freezes, stutters dropped frames, and GPU load up to 50%.

Expected results:

Smooth playback without any issues with GPU load at 5-15%, as in Google Chrome.

Hello, would you mind to follow this instruction to collect a profiled result for us?

Thank you.

Flags: needinfo?(biolan93)

(In reply to Alastor Wu [:alwu] from comment #1)

Hello, would you mind to follow this instruction to collect a profiled result for us?

Thank you.

Sure. Here it is https://share.firefox.dev/3TCDvU2

Flags: needinfo?(biolan93)

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)

Can confirm this issue in Windows. Not happening with the Linux Version, if that helps to isolate the problem.

Can also confirm this has been a long-standing problem, and can easily be replicated on Windows using any Youtube 4K video with any 6000-series AMD RX card afaik.

This bug has been a headache for multiple years now, and is likely causing users of said cards to use an alternative browser instead (or buy NVIDIA next time). It's a bad look for both Mozilla & AMD, severely degrading end-user experience now that 1440p (barely works) and 4K (doesn't work) has gotten more common.

We've begged AMD for a fix @ AMD Community/6900-xt-stuttering-with-youtube-4k60-videos to no avail.

I've been using the following workaround:
media.wmf.zero-copy-nv12-textures-force-enabled -> true
gfx.direct3d11.reuse-decoder-device-force-enabled -> true

Which does work (no more dropped frames or slowness, only skipping is a tad slow) ... but an official fix would be appreciated.

Performance is considerably better if I watch a 4K video in Firefox inside WSL2 (Arch+Wayland+HW acceleration) compared to Win without the workaround above. Imagine that.

Attached video video.mp4

I had same issue until someone recommended me to Disable "media.wmf.dxva.d3d11.enabled" in about:config, which fixed the problem.

Added video comparing the AV1 with "media.wmf.dxva.d3d11.enabled" enabled. Video playback was 4k30fps. Youtube Video source.

  • Same GPU - AMD RX 6700 XT (overclock disabled).
  • AMD Driver ver. 24.1.1.
  • Firefox ver. 125.0.2.
  • Windows 11 23H2 22631.3447.
  • AV1 Video Extension installed from Microsoft store.
  • About:support shows AV1 supported.
  • Adblocker disabled.

I noticed after disabling "media.wmf.dxva.d3d11.enabled" youtube now prefers VP9 automatically.
Had to force AV1 for videos in https://www.youtube.com/account_playback by setting "Always prefer AV1".
No stutters or lag appeared after forcing AV1 again so disabled "media.wmf.dxva.d3d11.enabled" preference still worked as before.

Flags: needinfo?(jmathies)
Severity: -- → S3
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

:jimm Even if a workaround does exist, the vast majority of users affected is never gonna figure out it exists.

As the performance of 4K material is affected that users are likely to abandon Firefox as a browser due to it, I suggest upgrading Severity to S2.

Flags: needinfo?(jmathies)
Blocks: gfx-triage
Flags: needinfo?(jmathies)

Sotaro, could you have a look here and see if you might have any insights?

Flags: needinfo?(sotaro.ikeda.g)

There are some posts about this on AMD forum too. Firefox is not able to play 1440p 4k youtube video on RX videocards without massive fps loss(under 40 fps at 4k).
media.wmf.zero-copy-nv12-textures-force-enabled -> true
gfx.direct3d11.reuse-decoder-device-force-enabled -> true
those raise fps up to 50. Still not a fix. (RX6650XT)

The problem seemed to happen by heavy GPU tasks. pref media.wmf.dxva.d3d11.enabled = false means software video decoding.

The followings could reduce GPU tasks.

  • [1] reuse decoder device
  • [2] zero copy hardware decoded video frame
  • [3] use overlay for video rendering.
  • [4] WebRender use one frame buffer with overlay like chromium.

For [1], with AMD GPUs, reuse decoder device is always enabled since Bug 1313883 fix.
[2] is enabled until early beta by Bug 1899450 recently.
[3] is enabled until release by Bug 1851630.
[4] is not supported by gecko. On Windows, WebRender with native compositor uses many DirectComposition Surfaces, it seemed to add GPU tasks at DWM. One framebuffer with one Surface seemes to reduce GPU tasks at DWM. Chromium uses this combination. See Bug 1901693.

Flags: needinfo?(sotaro.ikeda.g)
See Also: → 1901693
No longer blocks: gfx-triage
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: