Closed Bug 1763673 Opened 3 years ago Closed 3 years ago

AVC (h264) videos has no hardware acceleration since ff99

Categories

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

Firefox 99
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: rehcnt, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0

Steps to reproduce:

Environment: Manjaro Linux, UHD 620, iHD driver. Looks like another PC with AMD Renoir has this issue, but I haven't tools to diagnose AMD GPU.

  1. MOZ_DISABLE_RDD_SANDBOX=1 as enviroment.
  2. media.ffmpeg.vaapi.enabled=true in about:config.
  3. Start any twitch stream/video (it uses h264 codec).

Actual results:

HW acceleration is not working, as we see in intel_gpu_top (screenshot). This is not about source: avc is not hw accelerated in youtube as well.

Expected results:

HW acceleration working as it works for VP9 (screenshot).

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

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

Thanks for the report! To confirm, this was working in Fx 98, and has stopped since 99? Could you check using mozregression for a specific regression range where this started?

Severity: -- → S3
Flags: needinfo?(rehcnt)
Priority: -- → P3

Please run with MOZ_LOG="PlatformDecoderModule:5" env variable, try to play h264 content and attach the log here.
Thanks.

(In reply to Bryce Seager van Dyk [:bryce] (he/him) from comment #3)

Thanks for the report! To confirm, this was working in Fx 98, and has stopped since 99? Could you check using mozregression for a specific regression range where this started?
yes, I confirm, mozregression's ff98 don't have this issue.

Flags: needinfo?(rehcnt)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #4)

Please run with MOZ_LOG="PlatformDecoderModule:5" env variable, try to play h264 content and attach the log here.
Thanks.

done in attachments!

Could you help me try the latest Nightly? This might be caused by bug 1752493 & bug 1750760, but we have fixed that issue already.
Thank you.

Flags: needinfo?(rehcnt)

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

Could you help me try the latest Nightly? This might be caused by bug 1752493 & bug 1750760, but we have fixed that issue already.
Thank you.

oh, that is correct, build 20220406 works fine, vaapi is there. :)

Flags: needinfo?(rehcnt)

Per comment9, close this bug.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Does this fix only apply to X11? Still broken for me on Wayland (Fedora 36 beta), below are the media logs:

[AVHWDeviceContext @ 0x7f93d405bbc0] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ().
[AVHWDeviceContext @ 0x7f93d405bbc0] Driver not found in known nonstandard list, using standard behaviour.
[RDD 98935: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   VA-API FFmpeg init successful
[Child 98804: MediaSupervisor #3]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 98804: MediaSupervisor #3]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp9'
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp9'
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule FFVPX: FFmpegVideoDecoder::FFmpegVideoDecoder MIME video/vp9 Codec ID 167
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule FFVPX: VAAPI is disabled by parent decoder module.
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/opus'
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/opus'
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/opus'
[RDD 98935: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/opus'
[RDD 98935: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising FFmpeg decoder
[RDD 98935: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   codec vp9 : Google VP9
[RDD 98935: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Set get_buffer2 for customized buffer allocation
[vp9 @ 0x7f93ccad8300] Requested frame threading with a custom get_buffer2() implementation which is not marked as thread safe. This is not supported anymore, make your callback thread-safe.

(In reply to Irxil from comment #11)

Does this fix only apply to X11?

I tried last Nightly on Wayland, vaapi is working.

(In reply to Irxil from comment #11)

Does this fix only apply to X11? Still broken for me on Wayland (Fedora 36 beta), below are the media logs:

It's both Wayland and X11. Please try latest nighly and if it's broken run with MOZ_LOG="MediaFormatReader:5, PlatformDecoderModule:5" env variables and attach the log here.
Thanks.

Flags: needinfo?(irxil)
Flags: needinfo?(irxil)

I've just uploaded the logs when opening a blank tab in Firefox Nightly, doing ctrl-O, and opening an MP4 directly with Firefox.

This is something different - 'failed to create texture over DMABuf memory!'. Do you run with MOZ_DISABLE_RDD_SANDBOX=1 env variable to disable RDD sandbox?

Flags: needinfo?(irxil)

I see, yes it works with the sandbox disabled. I was under the impression that the sandbox disable was no longer required, thank you.

Flags: needinfo?(irxil)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: