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 forwarding broken in fedora 28 #1833

Closed
totaam opened this issue May 8, 2018 · 2 comments
Closed

webcam forwarding broken in fedora 28 #1833

totaam opened this issue May 8, 2018 · 2 comments

Comments

@totaam
Copy link
Collaborator

totaam commented May 8, 2018

Issue migrated from trac ticket # 1833

component: server | priority: major | resolution: fixed

2018-05-08 14:51:38: antoine created the issue


Could be an update to the kernel, or the v4l2loopback driver

See also Webcam.

The error:

$ XPRA_ALL_DEBUG=1 python2 ./unittests/unit/server/source_mixins_test.py 
2018-05-08 20:51:02,990 av-sync support is disabled, setting it to 0
2018-05-08 20:51:02,990 av-sync: server=False, client=True, total=0
2018-05-08 20:51:02,990 av-sync support is disabled, setting it to 0
2018-05-08 20:51:02,990 av-sync: server=False, client=False, total=0
2018-05-08 20:51:02,990 av-sync set to 170ms (from client queue latency=150, encoder latency=20, delta=0)
2018-05-08 20:51:02,990 av-sync: server=True, client=True, total=170
2018-05-08 20:51:02,990 av-sync set to 20ms (from client queue latency=0, encoder latency=20, delta=0)
2018-05-08 20:51:02,990 av-sync: server=True, client=False, total=20
.2018-05-08 20:51:02,991 client screen sizes: []
.2018-05-08 20:51:02,991 client uuid None
.2018-05-08 20:51:03,026 get_virtual_video_devices(True) CHECK_VIRTUAL_CAPTURE=True
2018-05-08 20:51:03,028 v4l2.pusher init
2018-05-08 20:51:03,029 * COLORSPACE_STR
2018-05-08 20:51:03,029   - 1                             : SMPTE170M
2018-05-08 20:51:03,029   - 2                             : SMPTE240M
2018-05-08 20:51:03,029   - 3                             : REC709
2018-05-08 20:51:03,029   - 5                             : 470_SYSTEM_M
2018-05-08 20:51:03,029   - 6                             : 470_SYSTEM_BG
2018-05-08 20:51:03,029   - 8                             : SRGB
2018-05-08 20:51:03,029 * FIELD_STR
2018-05-08 20:51:03,029   - 1                             : None
2018-05-08 20:51:03,029   - 2                             : Top
2018-05-08 20:51:03,029   - 3                             : Bottom
2018-05-08 20:51:03,029   - 4                             : Interlaced
2018-05-08 20:51:03,029   - 5                             : SEQ TB
2018-05-08 20:51:03,029   - 6                             : SEQ BT
2018-05-08 20:51:03,029   - 7                             : ALTERNATE
2018-05-08 20:51:03,029 * FORMAT_STR
2018-05-08 20:51:03,029   - 0x3132564e                    : NV21
2018-05-08 20:51:03,029   - 0x3231564e                    : NV12
2018-05-08 20:51:03,029   - 0x3447504d                    : MPEG4
2018-05-08 20:51:03,029   - 0x32315559                    : YUV420P
2018-05-08 20:51:03,030   - 0x32315659                    : YVU420P
2018-05-08 20:51:03,030   - 0x33424752                    : RGB
2018-05-08 20:51:03,030   - 0x33524742                    : BGR
2018-05-08 20:51:03,030   - 0x34363248                    : H264
2018-05-08 20:51:03,030   - 0x34424752                    : RGBX
2018-05-08 20:51:03,030   - 0x34524742                    : BGRX
2018-05-08 20:51:03,030   - 0x39565559                    : YUV410P
2018-05-08 20:51:03,030   - 0x50313134                    : YUV411P
2018-05-08 20:51:03,030   - 0x50323234                    : YUV422P
2018-05-08 20:51:03,030   - 0x56595559                    : YUYV
2018-05-08 20:51:03,030   - 0x59455247                    : GREY
2018-05-08 20:51:03,030   - 0x59565955                    : UYVY
2018-05-08 20:51:03,030 v4l2 using device /dev/video2
2018-05-08 20:51:03,030 ioctl(/dev/video2, VIDIOC_QUERYCAP, 0x7ffd158582a0)=0
2018-05-08 20:51:03,030 devices: {2: {'card': 'Dummy video device (0x0000)', 'version': 266245, 'device_caps': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'device': '/dev/video2', 'driver': 'v4l2 loopback', 'capabilities': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'bus_info': 'platform:v4l2loopback-000'}}
2018-05-08 20:51:03,030 found 1 virtual video device
2018-05-08 20:51:03,030 start_virtual_webcam(0, 640, 480)
2018-05-08 20:51:03,030 get_virtual_video_devices(True) CHECK_VIRTUAL_CAPTURE=True
2018-05-08 20:51:03,030 v4l2 using device /dev/video2
2018-05-08 20:51:03,030 ioctl(/dev/video2, VIDIOC_QUERYCAP, 0x7ffd15857fd0)=0
2018-05-08 20:51:03,031 devices: {2: {'card': 'Dummy video device (0x0000)', 'version': 266245, 'device_caps': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'device': '/dev/video2', 'driver': 'v4l2 loopback', 'capabilities': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'bus_info': 'platform:v4l2loopback-000'}}
2018-05-08 20:51:03,031 found 1 virtual video device
2018-05-08 20:51:03,031 trying device 2: {'card': 'Dummy video device (0x0000)', 'version': 266245, 'device_caps': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'device': '/dev/video2', 'driver': 'v4l2 loopback', 'capabilities': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'bus_info': 'platform:v4l2loopback-000'}
2018-05-08 20:51:03,031 v4l2 using device /dev/video2
2018-05-08 20:51:03,031 ioctl(/dev/video2, VIDIOC_QUERYCAP, 0x7ffd15858280)=0
2018-05-08 20:51:03,031 ioctl(/dev/video2, VIDIOC_G_FMT, 0x7ffd158582f0)=-1
2018-05-08 20:51:03,031 ioctl(/dev/video2, VIDIOC_S_FMT, 0x7ffd158582f0)=-1
2018-05-08 20:51:03,031 start_virtual_webcam(0, 640, 480) error on device 2: {'card': 'Dummy video device (0x0000)', 'version': 266245, 'device_caps': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'device': '/dev/video2', 'driver': 'v4l2 loopback', 'capabilities': ['VIDEO_CAPTURE', 'VIDEO_OUTPUT', 'DEVICE_CAPS', 'READWRITE', 'VIDEO_M2M_MPLANE', 'STREAMING', 'EXT_PIX_FORMAT'], 'bus_info': 'platform:v4l2loopback-000'}
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/source/webcam_mixin.py", line 100, in start_virtual_webcam
    p.init_context(w, h, w, src_format, device_str)
  File "xpra/codecs/v4l2/pusher.pyx", line 280, in xpra.codecs.v4l2.pusher.Pusher.init_context
    self.init_device(device)
  File "xpra/codecs/v4l2/pusher.pyx", line 317, in xpra.codecs.v4l2.pusher.Pusher.init_device
    assert r>=0, "VIDIOC_S_FMT ioctl failed on %s" % self.device_name
AssertionError: VIDIOC_S_FMT ioctl failed on /dev/video2
2018-05-08 20:51:03,031 Error: cannot start webcam forwarding
2018-05-08 20:51:03,031  all devices failed
2018-05-08 20:51:03,031  /dev/video2 : VIDIOC_S_FMT ioctl failed on /dev/video2
2018-05-08 20:51:03,031 stop_all_virtual_webcams() stopping: {}

API docs:

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2018

2018-05-13 18:22:22: antoine commented


This is an upstream bug: Invalid IOCTL call in 4.16

@totaam
Copy link
Collaborator Author

totaam commented Jun 5, 2018

2018-06-05 17:30:27: antoine commented


The fix has been merged upstream: Use kernel-version to determine whether we should set vfl_dir

@totaam totaam closed this as completed Jun 5, 2018
@totaam totaam added the v2.2.x label Jan 22, 2021
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