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

Get screen sharing to work #20

Closed
konteal opened this issue May 4, 2020 · 8 comments
Closed

Get screen sharing to work #20

konteal opened this issue May 4, 2020 · 8 comments

Comments

@konteal
Copy link

konteal commented May 4, 2020

Momentarily, screen sharing doesn’t work. It shows a black screen for other participants. This is probably a good default setting – I imagine it fails because Zoom cannot access what’s on your screen. It still would be nice to get it to work since it’s an essential feature for Zoom.

@konteal
Copy link
Author

konteal commented May 4, 2020

As a workaround, one can load the v4l2loopack kernel module (which is a out-of-tree module), creating a dummy video device, and feed the output for an X display via ffmpeg to it, see the questions superuser/411897 and unix.stackexchange/528400. Then, the screen will be available as a video stream for Zoom. Caveat. You have to load the kernel module first, then start Zoom via the wrapper. Else, the dummy video device will not be made available to Zoom in its container.

However, Zoom does lowers image quality for video streams and frame rate for sharing screens on bad connections. The latter being the smarter option for sharing screens, this workaround is of limited value. Also, annotations and other features are not available this way.

@mdouchement
Copy link
Owner

Yes I used v4l2loopback + ffmpeg as fake webcam to dev on this project lately, it works but it's not the best experience.

I don't how zoom and other software do the screen sharing.

@KevOrr
Copy link

KevOrr commented May 4, 2020

Odd, you would think if it has access to the X server, then it would just work. It works just fine for me in Gnome (wayland). Maybe check your xhost settings? Mine is set to SI:localuser:$USER, where $USER is my username, so you could try xhost +SI:localuser:"$USER".

If allowing just your user doesn't work, then you could try xhost +local:

@konteal
Copy link
Author

konteal commented May 4, 2020

Odd, you would think if it has access to the X server, then it would just work. It works just fine for me in Gnome (wayland). Maybe check your xhost settings? Mine is set to SI:localuser:$USER, where $USER is my username, so you could try xhost +SI:localuser:"$USER".

If allowing just your user doesn't work, then you could try xhost +local:

Huh. You’re right. xhost +SI:localuser:"$USER" did it for me. Simple as that. Thank you very much! I’m closing this issue.

Note: I had an issue with the screen not refreshing for the participants until the window shared has lost focus. This was “fixed” by deactivating the “Limit frame rate” option in Zoom.

Also, desktop sharing still does not work. Only sharing specific windows works. But that’s good enough for me for now. Not even sure that this is an issue with Zoom in docker now …

@chemmi
Copy link

chemmi commented May 13, 2021

Note: I had an issue with the screen not refreshing for the participants until the window shared has lost focus. This was “fixed” by deactivating the “Limit frame rate” option in Zoom.

I ran into the same side-issue, that my shared window was not refreshed until that very window lost focus. Deactivating the frame rate did not fix this (it was deactivated by default in my setting).

However, activating "Share selected app window only" magically fixed this issue in my case.

@faxm0dem
Copy link

I have the same issue, and the xhost workaround doesn't work for me

@gzqx
Copy link

gzqx commented Nov 26, 2021

Got same issue and xhost don't work as well.
Update: only don't work for desktop sharing, work for specific windows, same as konteal

@faxm0dem
Copy link

faxm0dem commented Nov 30, 2021

I ended up using v4l2 as a workaround.
Maybe this can help others so posting it here for debian:

sudo apt install v4l2loopback-dkms v4l2loopback-utils ffmpeg
sudo modprobe v4l2loopback devices=1 exclusive_caps=1 video_nr=10
# adjust the correct video size
ffmpeg -video_size 1920x1080 -f x11grab -framerate 24 -i :0 -vcodec rawvideo -pix_fmt yuv420p -f v4l2 /dev/video10

Then I just switch camera during the conference. Works with jitsi too of course

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

6 participants