discord-screenaudio
discord-screenaudio copied to clipboard
Not being able to share individual application window or different screen on X11
When you start screen share, it always share the whole desktop, and that isn't something everybody wants to.
This also applies to screens, the first one is always used and you can't change that. That is a limitation of QtWebEngine (afaik). I have tried and will continue to try to find a hack to implement this but it isn't trivial.
Didn't know that was a limitation of QtWebEngine, do you have any links to Qt Bugtracker for this bug?
This isn't documented really well and I only found it out by digging though the QtWebEngine source code (so I could also be wrong). But here are some relevant bugs:
https://bugreports.qt.io/browse/QTBUG-80054
https://bugreports.qt.io/browse/QTBUG-70077
After researching a bit further, this could maybe be achieved using the org.freedesktop.portal.ScreenCast D-Bus API. I currently have no idea how that works, but it may be worth looking into that.
Using screencast also should? make this wayland compatible.
Using screencast also should? make this wayland compatible.
It should, but the problem right now is QtWebEngine itself can't capture anything else than the first screen (I tried screensharing with QuteBrowser and it had the same problem as this project)
Fyi selecting a screen/window should now be possible on Wayland, still not on X11.
Fyi selecting a screen/window should now be possible on Wayland, still not on X11.
On what version exactly? I tried AUR package right now, and people could only see black screen and no audio when streaming a game. I am on GNOME Wayland, Arch
To test it you would have to build manually on the master branch. Or you wait a few days until I release the changes.
Ah I see, that version just hasn't been released yet. All clear now, thanks.
To test it you would have to build manually on the master branch. Or you wait a few days until I release the changes.
I've built it manually now, but sadly people still see black screen, and no audio. What are the needed steps to uninstall everything now?
To uninstall, run sudo xargs rm -f <build/install_manifest.txt
. But before doing that, can you try running QTWEBENGINE_CHROMIUM_FLAGS=--enable-features=WebRTCPipeWireCapturer ./build/discord-screenaudio
and see if that works? Also, do you have xdg-desktop-portal-gtk
installed?
To uninstall, run
sudo xargs rm -f <build/install_manifest.txt
. But before doing that, can you try runningQTWEBENGINE_CHROMIUM_FLAGS=--enable-features=WebRTCPipeWireCapturer ./build/discord-screenaudio
and see if that works? Also, do you havexdg-desktop-portal-gtk
installed?
Thanks for the answer.
I have ran the command QTWEBENGINE_CHROMIUM_FLAGS=--enable-features=WebRTCPipeWireCapturer ./build/discord-screenaudio
and it opened discord-screenaudio without issues, but game or audio were still not viisible when screen sharing.
I am on Arch Linux, so I have found a package in the AUR (https://aur.archlinux.org/packages/xdg-desktop-portal-gtk-git) for xdg-desktop-portal-gtk
, but sadly it won't install because it has apparently syntax error in some file.
Just install it from the official repositories: https://archlinux.org/packages/extra/x86_64/xdg-desktop-portal-gtk/
Didn't know there was a package from official repo. It turns out I have it installed already.
I've got screensharing to work with Wayland on latest master, however audio sharing seems to not work...
discord-screenaudio-virtmic
is selected as an input device, but my friend with whom I tested it reports only hearing my microphone, no desktop audio.
Damn, how come it works for you, but not for me? Could I have been doing something wrong?
I've build it form source, selected the game from the list of open apps to stream, selected 720p 30fps quality, and started streaming. Does the game have to be in windowed/borderless mode? All games that I tested were in Fullscreen mode.
@BulletBlaster see https://github.com/maltejur/discord-screenaudio/issues/28#issue-1323409245
@Smoukus I'll see if I can find another fix
@Smoukus I didn't stream any game, I've selected the entire desktop, I also think my issue was different - the screen/application sharing window didn't show up at all, but I fixed it by i think installing xdg-desktop-portal-gtk
I'm also using KDE Plasma on Arch, maybe check if it works on it, does screensharing on Qutebrowser work? (It uses the same engine as this application)
@maltejur I got it to work by following the steps in this comment, maybe add it to the README?
@Smoukus I didn't stream any game, I've selected the entire desktop, I also think my issue was different - the screen/application sharing window didn't show up at all, but I fixed it by i think installing
xdg-desktop-portal-gtk
I'm also using KDE Plasma on Arch, maybe check if it works on it, does screensharing on Qutebrowser work? (It uses the same engine as this application)
Would you mind posting a screenshot of the window that lets you choose to select entire dekstop? I could only select specific apps, didn't see desktop anywhere.
xdg-desktop-portal-gtk
is already installed though.
@Smoukus Are you using KDE Plasma? That window had a KDE icon, so I think it's not a part of the xdg-desktop-portal-gtk
package, here's how the screen sharing window looks like for me (it says Konsole because I launched discord-screenaudio from the terminal):
@BulletBlaster damn, I don't have that option :(
I am on GNOME however.
This is how it looks for me:
In my case I selected NieR Replicant, and pressed on Start Stream.
@Smoukus Just tested with a single window, works perfectly fine too, doesn't seem to matter whether I run it with QTWEBENGINE_CHROMIUM_FLAGS=--enable-features=WebRTCPipeWireCapturer
or not, I'll also install GNOME to see if it works there too, in the meantime could you check if it's working on KDE Plasma?
@Smoukus Just tested with a single window, works perfectly fine too, doesn't seem to matter whether I run it with
QTWEBENGINE_CHROMIUM_FLAGS=--enable-features=WebRTCPipeWireCapturer
or not, I'll also install GNOME to see if it works there too, in the meantime could you check if it's working on KDE Plasma?
I don't know how can I check with KDE Plasma because I am very new to Linux, and am afraid of messing things up. I've read that it isn't really good to have 2 DE's installed. I am glad that it works for you on KDE at least.
@Smoukus Also the window you're showing is for sharing sound, after it a screen sharing window should apppear
Just installed GNOME and I seem to be having the same issue as you, I'll check in the Arch Wiki to see if something is misconfigured
You're new to Linux and using Arch? How did you install it? Nothing should break if you have 2 DE's installed, you might see some errors but they're mostly meaningless, to install Plasma run sudo pacman -S plasma-meta plasma-wayland-session
in a terminal, then log out and when logging in before typing your password (but after selecting your account) click on the gear and select "Plasma (Wayland)".
Unfortunately that is the only window that I get. As soon as I choose the game in that window, stream starts, and I can't choose anything else. The only available option is to "end stream".
I am on EndeavourOS, and that is basically Arch with an installer.
Can confirm that this works on gnome wayland. I am just using the flatpak release and manually setting that variable.
@Smoukus Please don't say in the future that you are using Arch, while Endeavour is based on it it's not the same distribution
I also got screen sharing to work on GNOME, you need to install the xdg-desktop-portal-gnome
package and then run systemctl --user restart xdg-desktop-portal
, didn't test sound sharing on GNOME but I don't see why it wouldn't work
@Smoukus Please don't say in the future that you are using Arch, while Endeavour is based on it it's not the same distribution
I also got screen sharing to work on GNOME, you need to install the
xdg-desktop-portal-gnome
package and then runsystemctl --user restart xdg-desktop-portal
, didn't test sound sharing on GNOME but I don't see why it wouldn't work
Okay, will test it out with xdg-desktop-portal-gnome
package. Will post results.
How is Endeavour different than Arch though? (I am genuinely curious)
EDIT: xdg-desktop-portal-gnome
was the solution. It is exactly as you said @BulletBlaster . First window is sound, and then comes another window for window/screen.
Thanks a lot!
EDIT2: can confirm that also the AUR Version works on Gnome Wayland with audio and screen.
Oh damn, didn't realize there was a difference between xdg-desktop-portal-gtk
and xdg-desktop-portal-gnome
. Thanks a lot @BulletBlaster and @luke876 for helping here.
I can confirm that sharing a screen or application windows now work for me with v1.2.0
on KDE Plasma Wayland with xdg-desktop-portal-kde