我正在努力让我的笔记本电脑的网络摄像头在奶酪上工作,但我得到了这样的输出:
mohab@DESKTOP-VUD35O1:~$ cheese
** Message: 17:24:15.307: cheese-application.vala:214: Error during camera setup: No device found
(cheese:6699): cheese-CRITICAL **: 17:24:15.512: cheese_camera_device_get_name: assertion 'CHEESE_IS_CAMERA_DEVICE (device)' failed
(cheese:6699): GLib-CRITICAL **: 17:24:15.512: g_variant_new_string: assertion 'string != NULL' failed
(cheese:6699): GLib-CRITICAL **: 17:24:15.512: g_variant_ref_sink: assertion 'value != NULL' failed
(cheese:6699): GLib-GIO-CRITICAL **: 17:24:15.512: g_settings_schema_key_type_check: assertion 'value != NULL' failed
(cheese:6699): GLib-CRITICAL **: 17:24:15.512: g_variant_get_type_string: assertion 'value != NULL' failed
(cheese:6699): GLib-GIO-CRITICAL **: 17:24:15.512: g_settings_set_value: key 'camera' in 'org.gnome.Cheese' expects type 's', but a GVariant of type '(null)' was given
(cheese:6699): GLib-CRITICAL **: 17:24:15.512: g_variant_unref: assertion 'value != NULL' failed
** (cheese:6699): CRITICAL **: 17:24:15.513: cheese_preferences_dialog_setup_resolutions_for_device: assertion 'device != NULL' failed奶酪不能探测到摄像机,也什么也不做。这只是一个空白的屏幕。也没有/dev/video。
我把摄像头和USBIP连接成这样:
PS C:\Users\mohab> usbipd wsl list
BUSID VID:PID DEVICE STATE
3-4 2232:1029 WebCam SC-13HDL11939N Not attached
4-3 8086:0189 Generic Bluetooth Adapter Not attached
PS C:\Users\mohab> USBIPD WSL attach -b 3-4
PS C:\Users\mohab> usbipd wsl list
BUSID VID:PID DEVICE STATE
3-4 2232:1029 WebCam SC-13HDL11939N Attached - Ubuntu
4-3 8086:0189 Generic Bluetooth Adapter Not attached如何在Windows10Home的WSL2中使用我的相机?
发布于 2022-11-19 19:33:20
要在WSL2中启用相机支持,您需要编译内核来包含它,因为默认的WSL2内核不包括支持它所需的模块,使用这个指南编译内核来包含这些必需的模块之后,您就可以在WSL2中通过附加它来使用摄像头了,在Windows端有PowerShell的USBIP。
注意:您需要在WSL2中获得USB支持,如果您还没有对它的支持,请使用此指南。
像这样
PS C:\Users\mohab> usbipd wsl list
BUSID VID:PID DEVICE STATE
3-4 2232:1029 WebCam SC-13HDL11939N Not attached
4-3 8086:0189 Generic Bluetooth Adapter Not attached
PS C:\Users\mohab> USBIPD WSL attach -b 3-4
PS C:\Users\mohab> usbipd wsl list
BUSID VID:PID DEVICE STATE
3-4 2232:1029 WebCam SC-13HDL11939N Attached - Ubuntu
4-3 8086:0189 Generic Bluetooth Adapter Not attached注意:当连接到WSL2时,您可能无法使用windows侧的摄像头,如果要再次在windows侧使用相机,则可以在Windows侧使用PowerShell将其与Windows侧的PowerShell分离。像这样的
PS C:\Users\mohab> usbipd wsl detach -b 3-4
或者将您的相机从主机(WSL2 )流到来宾( cam2web Ubuntu),但您必须每次都获得IP地址,但它不能与Cheese一起工作,内核编译将适用于每个程序,而这种方式只适用于支持http流(VLC、FFmpeg、Webbrowsers)的程序,而不适用于只支持像Cheese这样的物理相机的程序,这些程序需要/dev/video0或任何物理连接的摄像机,而不是IP摄像机。
https://askubuntu.com/questions/1413377
复制相似问题