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

Webcam is greyed out, even when v4l2loopback device is present. #1596

Closed
totaam opened this issue Jul 22, 2017 · 5 comments
Closed

Webcam is greyed out, even when v4l2loopback device is present. #1596

totaam opened this issue Jul 22, 2017 · 5 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 22, 2017

Issue migrated from trac ticket # 1596

component: client | priority: major | resolution: fixed

2017-07-22 10:46:12: kundanvp created the issue


The webcam field in the Xpra Client is greyed out, even when we create a v4l2loopback device by modprobe v4l2loopback devices=1 on Ubuntu 16.04.
I checked the device. The virtual device was present.
The command, I used to start xpra and attach it.

xpra start :10 --bind-tcp=192.168.0.20:10000 -d webcam --webcam=/dev/video1 &
xpra attach tcp:192.168.0.20:10000
@totaam
Copy link
Collaborator Author

totaam commented Jul 22, 2017

2017-07-22 11:30:34: kundanvp commented


It seems the reason for this is that, the v4loloopback devices created on Ubuntu 16.04 (Installed through sudo apt) has exclusive_caps set to 1 by default. It means, it won't expose the VIDEO_CAPTURE capabilities until we write anything to it. But, it seems, here in Xpra we are checking for the device capabilities much earlier, which doesn't report VIDEO_CAPTURE capability since nothing was written to it, at that point of time. This leads to webcam support being disabled or greyed out.

After, creating Video devices through,

sudo modprobe v4l2loopback devices=1 exclusive_caps=0

It works.

@totaam
Copy link
Collaborator Author

totaam commented Jul 22, 2017

2017-07-22 11:41:02: kundanvp uploaded file xpra_webcam_without.log (5.4 KiB)

xpra log without any exclusive_caps option while loading v4l2loopback device, The command is sudo modprobe v4l2loopback devices=1, seems to be equivalent to adding option exclusive_caps=1

@totaam
Copy link
Collaborator Author

totaam commented Jul 22, 2017

2017-07-22 11:42:43: kundanvp uploaded file xpra_webcam_with.log (5.6 KiB)

The xpra log after starting the server, when the v4loopback device was created by adding exclusive_caps=0.

@totaam
Copy link
Collaborator Author

totaam commented Jul 24, 2017

Good catch, does r16480 fix things? (disables the check on Debian and Ubuntu only)

@totaam
Copy link
Collaborator Author

totaam commented Jul 24, 2017

2017-07-24 19:28:05: kundanvp commented


Yes, Antoine,
Now, webcam option is enabled on Ubuntu 16.04 and working properly.

Thanks a lot.

@totaam totaam closed this as completed Jul 26, 2017
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

1 participant