-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Change VaapiVideoEncoder
to AcceleratedVideoEncoder
#1007
base: main
Are you sure you want to change the base?
Conversation
I got this flags from https://bbs.archlinux.org/viewtopic.php?pid=2209507#p2209507 |
I want to also specify that I wasn't able to make |
The 'Vaapi' -> 'Accelerated' flag change is for a later version of chromium than electron33 currently runs. This change will need to be made when we bump to 34 or later. |
Although the See: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/gpu/vaapi.md#vaapi-on-linux |
Electron 34 is out with the chromium version that has these new flags |
I would appreciate fixing AMD VA-API encoding even before Electron 34 is used, so adding PlatformHEVCDecoderSupport,VaapiVideoDecoder,VaapiVideoEncoder,VaapiIgnoreDriverChecks, there is no way to override these flags without building whole Vesktop manually |
this is just not true. you can pass them via command line flag |
ok, I missed the part where Vesktop reads passed enable-features and merges them now I see it. without it, Chrome doesn't merge enable-featuers and would pick the first one or last one or something |
Unfortunately, this segfaults with no stacktrace or useful logs after which Vencord restarts with disabled hardware acceleration. I'll try again later with Electron 34.
|
after bumping electron 34 it seems to work correctly without segfault with this set of flags:
|
We definitely should not add likely unstable flags like |
This flag is nothing else than a whitelist of vendors being just "Intel". This combination of flags is known to be fully stable in recent Chromium versions with AMD. |
that piece of code explicitly states it is broken on Novideo though. Does that mean it will possibly crash on NVIDIA GPUs? If yes, that would be unacceptable. Perhaps it should only be enabled if not using Novideo |
This does nothing on Nvidia because Nvidia does not ship any VA-API backends. There's a community driver but it doesnt support encoding so not useful for streaming https://github.com/elFarto/nvidia-vaapi-driver |
Co-authored-by: Cookie <[email protected]>
From what I see this argument is only needed if Vulkan is used, I'm not sure if electron or vesktop even come with vulkan enabled |
you can verify if it works by opening just launch a new window with that as url to test |
I added a Button to the Vesktop settings to open this page via |
That UI lies sometimes. Try streaming and use nvtop and watch the encode bar Vaapi on amd is only fully supported with vulkan so you might need to enable that. https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration (Encode seems to work fine with GL for me so ymmv) Nvidia drivers do not support vaapi so anyone on pure nvidia is out of luck there. Anyway beyond these generic flags we can't really do more as that may break other setups. Youll have to find flags that work for you. |
you need quite a few more flags for full vulkan support. follow the archwiki entry |
Do you mean these flags? I'm running vesktop from this PR branch like this:
I still get a ton of datamoshing/black frames. |
I would probably use the ones mentioned in here https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/gpu/vaapi.md#vaapi-on-linux-with-vulkan |
mine works correctly, confirmed by nvtop. have you all guys bumped package.json to electron 34 first before testing like I did? |
I wouldn't bet on Vulkan too much. First Chromium build to support AMD VA-API few months back required Vulkan, but lately they added missing OpenGL support and balanced that out by breaking Vulkan-Wayland integration again symbolized by that ugly warning
but if I force Vulkan, everything continues to work after this warning and chrome://gpu shows Vulkan as enabled, so idk |
From what I checked
VaapiVideoEncoder
doesn't seem to work when checking chrome://gpu, it keeps sayingVideo Encode: Software only. Hardware acceleration disabled
. But if you useAcceleratedVideoEncoder
it does sayVideo Encode: Hardware accelerated
.I tried verifying if this actually does something, and when using
nvtop
it does show activity on the ENC section when usingAcceleratedVideoEncoder
but it doesn't when usingVaapiVideoEncoder
.For debugging purposes I leave my output of vainfo: