You are not logged in.

#1 2022-03-16 04:38:52

laichiaheng
Member
Registered: 2017-02-12
Posts: 194

VAAPI doesn't work on Firefox recently.

When I try to play YouTube videos on Firefox, it often doesn't play the video, or I need to wait for a long time.
Here is my Firefox settings:

media.ffmpeg.vaapi.enabled=true
media.ffvpx.enabled=true
media.navigator.mediadatadecoder_vpx_enabled=true
media.rdd-vpx.enabled=false

Offline

#2 2022-03-16 04:55:08

progandy
Member
Registered: 2012-05-17
Posts: 5,195

Re: VAAPI doesn't work on Firefox recently.

As of firefox 98, vaapi is only allowed in the rdd-process, so set all media.rdd-* options to true. Currently there are sandboxing bugs, you'll have to start firefox with the rdd sandbox disabled: MOZ_DISABLE_RDD_SANDBOX=1.
https://wiki.archlinux.org/title/Firefo … celeration

Last edited by progandy (2022-03-16 04:58:11)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#3 2022-03-16 05:35:59

laichiaheng
Member
Registered: 2017-02-12
Posts: 194

Re: VAAPI doesn't work on Firefox recently.

progandy wrote:

As of firefox 98, vaapi is only allowed in the rdd-process, so set all media.rdd-* options to true. Currently there are sandboxing bugs, you'll have to start firefox with the rdd sandbox disabled: MOZ_DISABLE_RDD_SANDBOX=1.
https://wiki.archlinux.org/title/Firefo … celeration

So the only thing that we can do is to wait for Firefox fix the bug?

Offline

#4 2022-03-16 14:46:31

progandy
Member
Registered: 2012-05-17
Posts: 5,195

Re: VAAPI doesn't work on Firefox recently.

laichiaheng wrote:
progandy wrote:

As of firefox 98, vaapi is only allowed in the rdd-process, so set all media.rdd-* options to true. Currently there are sandboxing bugs, you'll have to start firefox with the rdd sandbox disabled: MOZ_DISABLE_RDD_SANDBOX=1.
https://wiki.archlinux.org/title/Firefo … celeration

So the only thing that we can do is to wait for Firefox fix the bug?

No. Set up firefox to run vaapi decoding in the rdd process, and disable the sandbox for that process (disabling the sandbox does not disable the process itself).


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#5 2022-03-16 21:54:42

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: VAAPI doesn't work on Firefox recently.

Disabling the RDD-Sandbox is not using VA-API at all here. The settings are all according to the wiki; this his been worked until version 97.

Firefox 98, RDD-Sandbox enabled (the video freezes):

[...]
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
[...]
[Child 6186, MediaDecoderStateMachine #1] WARNING: Decoder=7fd644bb8000 Decode error: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImageVAAPI(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &): VAAPI dmabuf allocation error: file /build/firefox/src/firefox-98.0.1/dom/media/MediaDecoderStateMachine.cpp:3568
[repeats]
[...]

With disabled RDD-Sandbox there is no libva entry in the log and no error; the video plays, however, without acceleration some hint about VA-API. So it seems we have to wait...

Edit: After a closer look with disabled RDD-Sandbox and a more verbose log, I found:

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

Again, the setting is enabled in about:config. Some hints?

Edit2: After an even closer look, I found:

[...]
[Child 18320: Main Thread]: D/PlatformDecoderModule FFMPEG: VA-API FFmpeg is disabled by platform
[...]
[RDD 18493: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG: Initialising VA-API FFmpeg decoder
[RDD 18493: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG:   Format h264 is accelerated
[...]
[RDD 18493: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG:   VA-API FFmpeg init successful
[...]

This is... well... wierd. Sorry for the noise.

Last edited by Tarqi (2022-03-16 23:05:01)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

Board footer

Powered by FluxBB