集成网络摄像头不工作(联想 Thinkpad)。灯亮,但屏幕是黑的(Skype zoom 什么的)。
lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 0bda:c123 Realtek Semiconductor Corp. Bluetooth Radio
Bus 003 Device 003: ID 27c6:55a2 Shenzhen Goodix Technology Co.,Ltd. Goodix FingerPrint Device
Bus 003 Device 002: ID 1a2c:99f4 China Resource Semico Co., Ltd USB Gaming Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 5986:2137 Acer, Inc Integrated Camera
和
lsmod | grep video
uvcvideo 106496 0
videobuf2_vmalloc 20480 1 uvcvideo
videobuf2_memops 20480 1 videobuf2_vmalloc
videobuf2_v4l2 32768 1 uvcvideo
videobuf2_common 61440 4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
videodev 249856 3 videobuf2_v4l2,uvcvideo,videobuf2_common
mc 57344 4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
video 53248 1 ideapad_laptop
我尝试了类似的 SO 问题解决方案
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -frames 1 out2.jpg
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1364.570108, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x55def64ba100] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'out2.jpg':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: mjpeg, yuvj422p(pc), 1280x720, q=2-31, 200 kb/s, 10 fps, 10 tbn, 10 tbc
Metadata:
encoder : Lavc58.54.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 1 fps=0.0 q=1.8 Lsize=N/A time=00:00:00.10 bitrate=N/A speed=11.6x
video:17kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
如何检查并找到根本原因?