Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazzite does not install required packages for functional GStreamer VA-API video encoding for OBS #1125

Open
AstralPhnx opened this issue May 14, 2024 · 7 comments

Comments

@AstralPhnx
Copy link

AstralPhnx commented May 14, 2024

Describe the bug

When installing Bazzite, you are given the option to install OBS, however using this open doesn't install all the required packages to enable GStreamer backed VA-API hardware accelerated video encoding for OBS. The only available options are software H264 and ffmpeg based VA-API which suffers from poor performance.

If the "GStreamer Encoder H264" option is selected in OBS after being installed via Yafti, then the "Encoder Type" box is completely blank with no option to select anything, rendering the encoder non functional.

What did you expect to happen?

When the "GStreamer Encoder H264" encoder option is selected in OBS Studio after installing Bazzite and OBS from Yafti, the VA-API option should be selectable from the "Encoder Type" drop down box, see image.

image

Output of rpm-ostree status

No response

Hardware

See FastFetch output below
image

Extra information or context

Simple fix. Installing the flatpak "org.freedesktop.Platform.GStreamer.gstreamer-vaapi//23.08" resolves this issue allowing for GStreamer backed VA-API to be selected.

Installing the GStreamer Plugin from GNOME Software does NOT fix this issue as that seems to install "com.obsproject.Studio.Plugin.Gstreamer" and not the required freedesktop GStreamer runtime package.

It's worth noting that this isn't entirely a yafti issue, installing OBS flatpak manually after setting up Bazzite results in the same issue.

Easiest fix would just be adding the above mentioned package to the automatically installed runtimes for Bazzite.

@EPOCHvoyager
Copy link

EPOCHvoyager commented May 15, 2024

Did a little research on this, it seems that the obs-gstreamer version of these VA-API encoders(the ones listed as 'GStreamer Encoder H.26X') was just a feasibility test - fzwoch/obs-vaapi#22 (comment).

The author recommends usage of the modern obs-vaapi encoders instead - fzwoch/obs-vaapi#11 (comment) - which are packaged in 'com.obsproject.Studio.Plugin.GStreamerVaapi' and are listed as 'VA-API H.26X on {GPU}', with no issues regarding the lack of this runtime; only requiring it for use of its legacy encoders - fzwoch/obs-vaapi#19.

That is still broken functionality of a plugin by default, however, and a lack of functionality for another. Something of note is that on uninstallation, there are quite a few flatpak packages that can make use of it.

@AstralPhnx
Copy link
Author

Yeah that checks out. I know OBS includes VA-API encoding too but apparently it doesn't work as well as the gstreamer one? Info on this is all over the damn place sadly. I'll need to double check some things on my end to clarify

@EPOCHvoyager
Copy link

@AstralPhnx
Copy link
Author

The ones included in OBS are the ffmpeg ones.

Aight so we don't want those at all lmao those run really badly, we want the VA-API stuff.

It does look like however for ideal functionality you DO still need the freedesktop dependency as seen on the flathub repo here https://github.com/flathub/com.obsproject.Studio.Plugin.GStreamerVaapi

@AstralPhnx
Copy link
Author

Ok, done some poking about.

The bare minimum you need for the correct VA-API plugin to work is the following flatpaks.

com.obsproject.Studio.Plugin.GStreamerVaapi
org.freedesktop.Platform.GStreamer.gstreamer-vaapi//23.08

The package above in bold is seemingly entirely missing from Bazzite's install process from a cursory look through the code at flatpaks. I'm only seeing reference to the first plugin (which is correct) but no references to the freedesktop runtime which is required for functionality which lines up with what I mentioned in my original post.

It's worth noting that this plugin is just the VA-API GStreamer part that has been yoinked out of the larger GStreamer plugin which is no longer maintained, it's very similar code though.

Upon correct installation the following encoder should show up in OBS, format of "VAAPI H.264 on Device xyz" see screenshot below.
Screenshot from 2024-05-16 13-22-05

So, to recap, bazzite is currently shipping with the correct VA-API plugin (this is good) but it is missing the required runtime out of the box seemingly to properly make use of this plugin seamlessly (not good). All that would need to be done to rectify is adding org.freedesktop.Platform.GStreamer.gstreamer-vaapi//23.08 in as a runtime dependency and then you'd be golden.

Also worth noting is the legacy option, it's obviously not being developed anymore but may be of some use to some people, to enable that you need the 22.08 version of org.freedesktop.Platform.GStreamer.gstreamer-vaapi. This would be optional for the most part though.

@EPOCHvoyager
Copy link

EPOCHvoyager commented May 16, 2024

I'm getting the legacy option from the 23.08 runtime, but that could be because I'm on Navi10. From my testing, I only need 'com.obsproject.Studio.Plugin.GStreamerVaapi' for the new VA-API to show up and work correctly.

@AstralPhnx
Copy link
Author

I'm getting the legacy option from the 23.08 runtime, but that could be because I'm on Navi10. From my testing, I only need 'com.obsproject.Studio.Plugin.GStreamerVaapi' for the new VA-API to show up and work correctly.

Weird. So either the documentation is jank and we don't need any extra api's or you do need the api for something but god knows.

don't you just love wonky documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants