Could not enumerate video devices (or none found).解决办法

简介: Could not enumerate video devices (or none found).解决办法

初次接触ffmpeg时,在macOS上没问题,在Ubuntu上也没问题,但是在Windows上就出现了:

错误:

[dshow @ 00000238d5075880] DirectShow video devices (some may be both video and audio devices)
[dshow @ 00000238d5075880] Could not enumerate video devices (or none found).
[dshow @ 00000238d5075880] DirectShow audio devices
[dshow @ 00000238d5075880] Could not enumerate audio only devices (or none found).
E:\ffmpeg学习>ffmpeg -list_devices true -f dshow -i dummy
ffmpeg version n4.4-80-gbf87bdd3f6-20210828 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20210408
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20210828
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[dshow @ 00000238d5075880] DirectShow video devices (some may be both video and audio devices)
[dshow @ 00000238d5075880] Could not enumerate video devices (or none found).
[dshow @ 00000238d5075880] DirectShow audio devices
[dshow @ 00000238d5075880] Could not enumerate audio only devices (or none found).
dummy: Immediate exit requested

解决办法

在官方下载screen capture recorder:

screen capture recorder官方下载:

https://github.com/rdp/screen-capture-recorder-to-video-windows-free/releases

Windows下安装exe时直接默认安装即可。

再次查看,可以看到已经出现了

E:\ffmpeg学习>ffmpeg -list_devices true -f dshow -i dummy
ffmpeg version n4.4-80-gbf87bdd3f6-20210828 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20210408
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20210828
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[dshow @ 000001575d485880] DirectShow video devices (some may be both video and audio devices)
[dshow @ 000001575d485880]  "screen-capture-recorder"
[dshow @ 000001575d485880]     Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{4EA69364-2C8A-4AE6-A561-56E4B5044439}"
[dshow @ 000001575d485880] DirectShow audio devices
[dshow @ 000001575d485880]  "virtual-audio-capturer"
[dshow @ 000001575d485880]     Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927E935}"
dummy: Immediate exit requested
E:\ffmpeg学习>

然后就可以自由自在的玩耍了:

#录制
ffmpeg -f dshow -i video="screen-capture-recorder" -r 30 out.yuv
#播放
ffplay -pix_fmt bgr0 -s 2194x1234 out.yuv
目录
相关文章
|
IDE PyTorch 网络安全
|
并行计算 Linux PyTorch
RuntimeError: CUDA error: device-side assert triggered
我在运行PyG和transformers代码时两次遇到了这一问题,在此加以记录。
|
2天前
MTK在编译10A的target时报错:make: *** [mmi_feature_check]
MTK在编译10A的target时报错:make: *** [mmi_feature_check]
|
12月前
|
机器学习/深度学习 PyTorch 算法框架/工具
解决RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cp
对应两种保存模型的方式,pytorch也有两种加载模型的方式。对应第一种保存方式,加载模型时通过torch.load(‘.pth’)直接初始化新的神经网络对象;对应第二种保存方式,需要首先导入对应的网络,再通过net.load_state_dict(torch.load(‘.pth’))完成模型参数的加载。
852 0
FFmpeg Invalid data found when processing input
FFmpeg Invalid data found when processing input
399 0
成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)
成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)
299 0
|
TensorFlow 算法框架/工具 Python
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
|
编解码 定位技术
Google Earth Engine——Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid type的错误解决
Google Earth Engine——Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid type的错误解决
261 0
Google Earth Engine——Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid type的错误解决
Error: invalid option: --with-training-tools
Error: invalid option: --with-training-tools
126 0