8000 feat: Add a toggle in the settings for video hardware acceleration by AngelCMHxD · Pull Request #1117 · Vencord/Vesktop · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add a toggle in the settings for video hardware acceleration #1117

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AngelCMHxD
Copy link
@AngelCMHxD AngelCMHxD commented Mar 1, 2025

Enables functionality for the toggle found on Voice & Video settings for video hardware acceleration, while letting you keep overall hardware acceleration turned on, since video hardware acceleration may cause screen-share issues in some systems.

Would add a workaround to issues like #1107, #1004, #851 and #797

@Covkie
Copy link
Collaborator
Covkie commented Mar 1, 2025

does voice & video > hardware acceleration not already do this..?

@Covkie
Copy link
Collaborator
Covkie commented Mar 1, 2025

ok just tested. seemingly does nothing.. I guess discord just didnt desktop gate that switch 💀..

Instead of adding a new switch to vesktop settings you might want to get the state of that switch and go from there. (look at the streamer mode patch for a similar thingy)

@AngelCMHxD
Copy link
Author

Oh, that does seem like a better way to do it, I'll take a look. Thanks!

@AngelCMHxD
Copy link
Author
AngelCMHxD commented Mar 2, 2025

After some long trial and error (while also discovering the Patch Helper thing in setting kinda late .-.) I did the patch thingy! It was fun to do, however I really couldn't think of a better way to apply the change other than saving the value in the Settings.store object whenever it is toggled and then check the value on the startup over at src/main/index.ts like before. If you can think of one you can tell me and I'll check it out. :P

@twixcider
Copy link

After some long trial and error (while also discovering the Patch Helper thing in setting kinda late .-.) I did the patch thingy! It was fun to do, however I really couldn't think of a better way to apply the change other than saving the value in the Settings.store object whenever it is toggled and then check the value on the startup over at src/main/index.ts like before. If you can think of one you can tell me and I'll check it out. :P

The switch doesn't seems to do anything, even I turned the hardware acceleration switch off the screen artifact still appear

@AngelCMHxD
Copy link
Author

The switch doesn't seems to do anything, even I turned the hardware acceleration switch off the screen artifact still appear

If disabling Hardware Acceleration under Vesktop Settings doesn't fix the artifacts, then this PR won't do so too. For some people the cause of artifacts when screen sharing is video hardware acceleration, this PR is made so those people can disable only video hardware acceleration while not disabling all hardware acceleration.

However video hardware acceleration isn't always the cause, and after browsing the issues posted here about artifacts I don't know what else could it be. In some setups it just works, in others it's hardware acceleration what causes it, in others the cause is unknown. This PR is just to add a workaround (better than disabling all hardware acceleration) that may work for some people, but it still isn't a fix. :/

(If disabling Hardware Acceleration under Vesktop Settings did fix it but the toggle under Voice & Video doesn't while using this PR then hit me up)

@twixcider
Copy link
twixcider commented Apr 21, 2025

The switch doesn't seems to do anything, even I turned the hardware acceleration switch off the screen artifact still appear

If disabling Hardware Acceleration under Vesktop Settings doesn't fix the artifacts, then this PR won't do so too. For some people the cause of artifacts when screen sharing is video hardware acceleration, this PR is made so those people can disable only video hardware acceleration while not disabling all hardware acceleration.

However video hardware acceleration isn't always the cause, and after browsing the issues posted here about artifacts I don't know what else could it be. In some setups it just works, in others it's hardware acceleration what causes it, in others the cause is unknown. This PR is just to add a workaround (better than disabling all hardware acceleration) that may work for some people, but it still isn't a fix. :/

(If disabling Hardware Acceleration under Vesktop Settings did fix it but the toggle under Voice & Video doesn't while using this PR then hit me up)

Yeah I meant it that way, btw I don't know how github work does the pr you mention push in to the official repo? I am using the official repo while commenting. switching off hardware acceleration under vesktop setting does fix the artifact, however under video section the switch doesn't fix the artifact. so my workaround right no is to disable hardware acceleration under vesktop setting which make my whole vesktop laggy.

@AngelCMHxD
Copy link
Author
AngelCMHxD commented Apr 21, 2025

Yeah I meant it that way, btw I don't know how github work does the pr you mention push in to the official repo? I am using the official repo while commenting. switching off hardware acceleration under vesktop setting does fix the artifact, however under video section the switch doesn't fix the artifact. so my workaround right no is to disable hardware acceleration under vesktop setting which make my whole vesktop laggy.

In a pull request the code isn't on the main branch or repo and will only be pushed once (or if) it's accepted, in order to use it right now you would need to clone my fork and compile it yourself. An easier alternative to compiling it yourself is to launch the normal Vesktop with this launch argument from a terminal or a shortcut: --disable-features=AcceleratedVideoEncoder and it should only disable video encoding hardware acceleration and keep the rest working.

@twixcider
Copy link

--disable-features=AcceleratedVideoEncoder

thank you I will try the argument

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

Successfully merging this pull request may close these issues.

3 participants
0