在 Windows 10 Pro 下使用 ffplay 使用 DirectShow 过滤器预览 USB 网络摄像头时会出现黑屏。
尝试了 CamDiag32 和 CamDiag64,两者都显示缺少 quartz.dll,但当我右键单击并选择修复时,它会弹出“访问被拒绝错误”。CamDiag64 仍然可以预览网络摄像头,但 CamDiag32 会显示黑屏。我尝试在命令提示符下以管理员权限对 System32 和 SysWOW64 中的 quartz 进行 regsvr32,似乎注册成功,但 CamDiagXX 仍然抱怨 quartz.dll 问题。
还尝试了 GraphEdit,将捕获引脚固定到视频渲染器上,也会出现黑屏。
不确定问题的根本原因。
C:\Temp>ffplay.exe -f dshow -i "video=Vimicro USB Camera (Altair)"
ffplay version N-94129-g098ab93257 Copyright (c) 2003-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190621
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 29.100 / 56. 29.100
libavcodec 58. 53.100 / 58. 53.100
libavformat 58. 28.101 / 58. 28.101
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 55.100 / 7. 55.100
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, dshow, from 'video=Vimicro USB Camera (Altair)':B f=0/0
Duration: N/A, start: 2664.043000, bitrate: N/A
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
2734.21 M-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
C:\Temp>ffplay.exe -list_devices true -f dshow -i dummy
ffmpeg version N-94129-g098ab93257 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190621
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 29.100 / 56. 29.100
libavcodec 58. 53.100 / 58. 53.100
libavformat 58. 28.101 / 58. 28.101
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 55.100 / 7. 55.100
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[dshow @ 0000022188bb8a00] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0000022188bb8a00] "Vimicro USB Camera (Altair)"
[dshow @ 0000022188bb8a00] Alternative name "@device_pnp_\\?\usb#vid_0ac8&pid_3450&mi_00#6&22d596c2&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
dummy: Immediate exit requested
C:\Temp>ffplay.exe -f dshow -i "video=Vimicro USB Camera (Altair)" -list_options true
ffplay version N-94129-g098ab93257 Copyright (c) 2003-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190621
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 29.100 / 56. 29.100
libavcodec 58. 53.100 / 58. 53.100
libavformat 58. 28.101 / 58. 28.101
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 55.100 / 7. 55.100
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[dshow @ 000001b0b698ca40] DirectShow video device options (from video devices)
[dshow @ 000001b0b698ca40] Pin "Capture" (alternative pin name "0")
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=640x480 fps=30 max s=640x480 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=640x480 fps=30 max s=640x480 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=352x288 fps=30 max s=352x288 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=352x288 fps=30 max s=352x288 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=320x240 fps=30 max s=320x240 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=320x240 fps=30 max s=320x240 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=176x144 fps=30 max s=176x144 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=176x144 fps=30 max s=176x144 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=160x120 fps=30 max s=160x120 fps=30
[dshow @ 000001b0b698ca40] pixel_format=yuyv422 min s=160x120 fps=30 max s=160x120 fps=30
video=Vimicro USB Camera (Altair): Immediate exit requested f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
答案1
语法错误,以下是更正
ffplay.exe -f dshow -i 视频=“中星微 USB 摄像头 (Altair)“