xpra icon
Bug tracker and wiki

Opened 4 weeks ago

Closed 3 weeks ago

#1596 closed defect (fixed)

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

Reported by: Kundan Owned by: Kundan
Priority: major Milestone: 2.1
Component: client Version: trunk
Keywords: Cc:

Description

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

Attachments (2)

xpra_webcam_without.log (5.4 KB) - added by Kundan 4 weeks ago.
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
xpra_webcam_with.log (5.6 KB) - added by Kundan 4 weeks ago.
The xpra log after starting the server, when the v4loopback device was created by adding exclusive_caps=0.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 weeks ago by Kundan

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.

Changed 4 weeks ago by Kundan

Attachment: xpra_webcam_without.log added

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

Changed 4 weeks ago by Kundan

Attachment: xpra_webcam_with.log added

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

comment:2 Changed 4 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to Kundan

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

comment:3 Changed 3 weeks ago by Kundan

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

Thanks a lot.

comment:4 Changed 3 weeks ago by Antoine Martin

Milestone: 2.22.1
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.