Closed Bug 1807977 Opened 2 years ago Closed 2 years ago

Hardware Acceleration probably not utilized for some videos [vaapi, wayland]

Categories

(Core :: Widget: Gtk, defect)

Firefox 108
Unspecified
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: andreas.mills, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

7.82 KB, text/plain
Details
392.27 KB, text/plain
Details

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

Steps to reproduce:

Since FF 108 some video players having problems decoding the video and only play sound. I also do net get any logs while running 'MOZ_LOG="PlatformDecoderModule:5'.
Example video: https://livestreamfails.com/clip/148163

Youtube videos are running fine and sending logs: https://i.bcow.xyz/MFMqyHS.png

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

You have a typo in the env var. Corrected: $ MOZ_LOG="PlatformDecoderModule:5" flatpak run org.mozilla.firefox
Just run $ sudo intel_gpu_top to see if the "Video" engine is used.

Example video: https://livestreamfails.com/clip/148163

That's H264 for me.

Adding ' " ' doesn't change the outcome for both videos.
intel_gpu_top was the first I checked and youtube uses Video and the other video player only Render/3D.

(In reply to AM from comment #4)

Adding ' " ' doesn't change the outcome for both videos.

But the log should work now. Please play the video for a second and then attach the log of it.

Attached file log.txt

The relevant part is missing. Please attach a media log which also includes the beginning.

Attached file log.txt

It's only a fraction of the whole log and only around 3 sec. of video played.
Is it possible to save a log file automatically?

Thanks!

[RDD 329: MediaPDecoder #1]: D/PlatformDecoderModule FFMPEG: Initialising VA-API FFmpeg decoder
[RDD 329: MediaPDecoder #1]: D/PlatformDecoderModule FFMPEG: We're missing hardware accelerated decoder
[RDD 329: MediaPDecoder #1]: D/PlatformDecoderModule FFMPEG: couldn't find ffmpeg VA-API decoder
[RDD 329: MediaPDecoder #1]: D/PlatformDecoderModule FFMPEG: Initialising FFmpeg decoder
[RDD 329: MediaPDecoder #1]: D/PlatformDecoderModule FFMPEG: codec libopenh264 : OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

It should work with ffmpeg-full:
$ flatpak install org.freedesktop.Platform.ffmpeg-full/x86_64/22.08
(It had to be "21.08" before bug 1790766.)

Omg, it works. I am 99% sure ffmpeg 22.08 was installed at some point.
Doesn't the flatpak firefox requests this ffmpeg version to be installed automatically?

Do you now have both org.freedesktop.Platform.ffmpeg-full/x86_64/21.08 and 22.08 installed?
$ flatpak list

What I remember from testing is that the version/variant of ffmpeg-full must match the version of org.freedesktop.Platform, otherwise it's not used.
So it might well be that every Flatpak user must manually install the corresponding ffmpeg-full version each time Firefox upgrades its org.freedesktop.Platform dependency.

H264 is patented: The one who puts in the last missing piece to make H264 decoding work must pay the patent license fee. Therefore Firefox can't have a hard dependency on ffmpeg-full.
org.freedesktop.Platform contains a reduced ffmpeg with noopenh264 which can utilize org.freedesktop.Platform.openh264 which is directly downloaded from Cisco ($ flatpak remote-info flathub org.freedesktop.Platform.openh264/x86_64/2.2.0 -m) which pays the capped/maximum H264 patent license fee.
But Openh264 is not as performant as ffmpeg-full and has some bugs.
A solution for VAAPI might be to add a hard dependency on ffmpeg-full, but only to use it if openh264 is present and working,
or to make openh264 somehow a proxy/condom for ffmpeg's vaapi_h264.c: https://github.com/cisco/openh264/issues/3581

I had everything installed besides ffmpeg-full 22.08.

Freedesktop Platform org.freedesktop.Platform 22.08.4 22.08 user
Mesa org.freedesktop.Platform.GL.default 21.3.9 21.08 user
Mesa org.freedesktop.Platform.GL.default 22.2.4 22.08 user
Mesa (Extra) org.freedesktop.Platform.GL.default 22.2.4 22.08-extra user
Intel org.freedesktop.Platform.VAAPI.Intel 21.08 user
Intel org.freedesktop.Platform.VAAPI.Intel 22.08 user
ffmpeg-full org.freedesktop.Platform.ffmpeg-full 21.08 user
ffmpeg-full org.freedesktop.Platform.ffmpeg-full 22.08 user
openh264 org.freedesktop.Platform.openh264 2.1.0 2.0 user
openh264 org.freedesktop.Platform.openh264 2.1.0 2.2.0 user
Freedesktop SDK org.freedesktop.Sdk 21.08.17.1 21.08 user

Thanks, that confirms my testing.

I assume we have to close this as CANTFIX.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
OS: Unspecified → Linux
Regressed by: 1790766

Thanks for your help. Have a nice week.

Set release status flags based on info from the regressing bug 1790766

:rmader, since you are the author of the regressor, bug 1790766, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(robert.mader)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX

Yeah, looks like there should be a meta ffmpeg-full package that automatically installs the appropriate version. Not our bug and not a regression.

Status: RESOLVED → REOPENED
Flags: needinfo?(robert.mader)
Resolution: WONTFIX → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → WONTFIX
Duplicate of this bug: 1811671
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: