Closed Bug 1755526 Opened 2 years ago Closed 2 years ago

Intel: VA-API FFmpeg is disabled by platform

Categories

(Core :: Graphics, defect)

Firefox 99
defect

Tracking

()

RESOLVED DUPLICATE of bug 1751363

People

(Reporter: nimroot, Unassigned)

Details

Attachments

(2 files)

Attached file about-support

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

Steps to reproduce:

Start the latest Firefox compiled from source with:

MOZ_LOG="PlatformDecoderModule:5" ./mach run

and visit a website that plays a video content e.g. https://www.youtube.com/

vainfo log:

libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.4.3 ()

about:support attached as a file.

Actual results:

The following is logged:

[Child 26496: Main Thread]: D/PlatformDecoderModule FFMPEG: VA-API FFmpeg is disabled by platform

I've also verified with intel_gpu_top that indeed, video acceleration doesn't work.

Expected results:

This seems like a regression, because VA-API integration with Firefox used to work on my system when I compiled it some time ago (I believe it was FF97).

The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Graphics
Product: Firefox → Core

Does it work if you run
$ MOZ_DISABLE_RDD_SANDBOX=1 MOZ_LOG="PlatformDecoderModule:5" ./mach run
? (bug 1751363)

(In reply to Darkspirit from comment #2)

Does it work if you run
$ MOZ_DISABLE_RDD_SANDBOX=1 MOZ_LOG="PlatformDecoderModule:5" ./mach run
? (bug 1751363)

No. I think that for some reason either my hardware or the driver version is blacklisted.

Can you turn on the DMABuf logging and attach the output? From your about:support, I would expect it to be turned on so I am a bit puzzled as to why it is failing.

MOZ_LOG="PlatformDecoderModule:5,Dmabuf:5" ./mach run

Flags: needinfo?(nimroot)

[Child 26496: Main Thread]: D/PlatformDecoderModule FFMPEG: VA-API FFmpeg is disabled by platform

You might just be looking at the wrong line.
VAAPI is not enabled for Parent or Child processes, but it should work in RDD.

If you see

FFMPEG: VA-API Got one frame output with

then it's definitely working.

$ MOZ_DISABLE_RDD_SANDBOX=1 MOZ_LOG="PlatformDecoderModule:5" mozregression --launch 2022-02-15 --pref media.ffmpeg.vaapi.enabled:true -a https://bug1619882.bmoattachments.org/attachment.cgi?id=9149605 -P stdout
 0:30.44 INFO: b'[Parent 45568: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in Chrome process'
 0:30.44 INFO: b'[Parent 45568: Main Thread]: D/PlatformDecoderModule FFMPEG: VA-API FFmpeg is disabled by platform'
 0:30.44 INFO: b'[Parent 45568: Main Thread]: D/PlatformDecoderModule FFMPEG: VA-API FFmpeg is disabled by platform'
 0:30.51 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in Content process'
 0:30.52 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule FFMPEG: VA-API FFmpeg is disabled by platform'
 0:30.52 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule FFMPEG: VA-API FFmpeg is disabled by platform'
 0:30.56 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.56 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.56 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.59 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.60 INFO: b'[Child 45668: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.72 INFO: b'[Child 45668: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.72 INFO: b'[Child 45668: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.72 INFO: b'[Child 45668: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.72 INFO: b'[Child 45668: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type'
 0:30.80 INFO: b'[RDD 45769: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in RDD process'
 0:30.84 INFO: b'[RDD 45769: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type'
 0:30.84 INFO: b'[RDD 45769: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type'
 0:30.84 INFO: b'[RDD 45769: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type'
 0:30.84 INFO: b'[RDD 45769: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type'
 0:30.86 INFO: b'[RDD 45769: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG: Initialising VA-API FFmpeg decoder'
 0:30.86 INFO: b'[RDD 45769: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG:   codec h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10'
 0:30.86 INFO: b'libva info: VA-API version 1.13.0'
 0:30.86 INFO: b'libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so'
 0:30.89 INFO: b'libva info: Found init function __vaDriverInit_1_13'
[...]
 0:30.93 INFO: b'[RDD 45769: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG: VA-API Got one frame output with pts=0dts=40000 duration=40000 opaque=-9223372036854775808'
[...]
Attached file example-run
Flags: needinfo?(nimroot)

(In reply to Andrew Osmond [:aosmond] (he/him) from comment #4)

Can you turn on the DMABuf logging and attach the output? From your about:support, I would expect it to be turned on so I am a bit puzzled as to why it is failing.

MOZ_LOG="PlatformDecoderModule:5,Dmabuf:5" ./mach run

I've attached full log from an example run with a 1080p video at Youtube to the bug.

I think that this part might be especially interesting (failed to create GL context?):

[RDD 35713: MediaPDecoder #2]: D/PlatformDecoderModule Created new VA-API DMABufSurface UID = 1
[RDD 35713: MediaPDecoder #2]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: creating surface UID = 1
[RDD 35713: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::VerifyTextureCreation() UID 1
[RDD 35713: MediaPDecoder #2]: D/Dmabuf   failed to create GL context!
[RDD 35713: MediaPDecoder #2]: D/PlatformDecoderModule   failed to create texture over DMABuf memory!
[RDD 35713: MediaPDecoder #2]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: deleting dmabuf surface UID = 1
[RDD 35713: MediaPDecoder #2]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: VAAPI releasing dmabuf surface UID = 1
[RDD 35713: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseSurface() UID 1
[RDD 35713: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 1
[RDD 35713: MediaPDecoder #2]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 1

MOZ_LOG="PlatformDecoderModule:5,Dmabuf:5" ./mach run

That command would be affected by bug 1751363.
Please attach log of:
$ MOZ_DISABLE_RDD_SANDBOX=1 MOZ_LOG="PlatformDecoderModule:5,Dmabuf:5" ./mach run

(In reply to Darkspirit from comment #8)

MOZ_LOG="PlatformDecoderModule:5,Dmabuf:5" ./mach run

That command would be affected by bug 1751363.
Please attach log of:
$ MOZ_DISABLE_RDD_SANDBOX=1 MOZ_LOG="PlatformDecoderModule:5,Dmabuf:5" ./mach run

Alright, this indeed works. I've got confused before because my hardware doesn't support AV1 and currently Youtube often offers the video content using AV1, which was the case during my testing. If I play the videos with disabled RDD sandbox and disabled AV1 it does work, so I suppose that this issue can be resolved.

I think we can consider it a dupe of bug 1751363 then. Thanks for the help Darkspirit/nimroot! :)

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

Attachment

General

Creator:
Created:
Updated:
Size: