ffmpeg - ffmpeg dshow网络摄像头属性保存和加载的正确方法是什么?
问题描述
命令(PS == Windows PowerShell):
PS D:\> ffmpeg -f dshow -show_video_device_dialog True -video_device_save some_profile.txt -i 'video=MicrosoftR LifeCam Studio(TM)'
FFmpeg 头文件:
ffmpeg version git-2020-06-04-7f81785 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200523
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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 49.100 / 56. 49.100
libavcodec 58. 90.100 / 58. 90.100
libavformat 58. 44.100 / 58. 44.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 84.100 / 7. 84.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
在相机设置对话框中确定/取消/关闭后出错(创建了空文件)。也试过没有对话框 - 同样的问题:
[dshow @ 0715de40] Query for IPersistStream failed.
video=Microsoft® LifeCam Studio(TM): I/O error
我认为相机方面的问题,但我不排除我的失明(在文档中没有找到保存设置或所需命令选项的任何示例)。
也许还有另一种方法来保存/加载网络摄像头属性?
解决方案
为表示网络摄像头的 DirectShow 对象保存/加载属性的能力是可选的。话虽如此,“查询……失败。” 并且“I/O 错误”并不完全是错误。那是非致命错误。相机端没有问题。
网络摄像头驱动程序实现可能有自己的内部持久性,例如,当您更改某些属性(如对比度设置)时,它可能会被存储并进一步用于所有使用摄像头的应用程序。
推荐阅读
- c# - 使用异步方法时如何调试异常
- javascript - 将时间戳分组到星期几并组合数据
- google-chrome - 尽管在服务器上将它们设置为过期,但 Chrome 仍保留 cookie
- c - C中的UDP侦听器未输出正确的十六进制信息
- r - 使用 group_by 和 ifelse 的奇怪 dplyr 不当行为
- java - Java readObject 和带有继承的强制转换
- node.js - 乘客 + Nginx “找不到模块‘phusion_passenger/line_reader’”
- javascript - 使用 Ramda 的嵌套列表过滤和条件对象映射
- php - 基于 Woocommerce 中产品类别的条件自定义结帐字段
- google-apps-script - 当文件上传到 Google Drive 时,您如何处理该事件(调用脚本)?