3

Command (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 Header:

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

Error after OK/Cancel/Close in camera settings dialog (empty file was created). Also tried without dialog - the same problem:

[dshow @ 0715de40] Query for IPersistStream failed.
video=Microsoft® LifeCam Studio(TM): I/O error

I assume that problem at the camera side, but I don't exclude my blindness (didn’t find any examples of saving settings or required command options in the documentation).

Perhaps there is another way to save / load webcamera properties?

Roman R.
  • 68,205
  • 6
  • 94
  • 158
C0oo1D
  • 95
  • 7

1 Answers1

2

Ability to save/load properties for DirectShow objects representing webcameras is optional. Having said that, "Query... failed." and "I/O error" is not exactly an error. It is non-fatal error, that is. There is no problem at the camera side.

Webcamera driver implementation might have its own internal persistence, such as, for example, when you change some property like contrast setting it might be stored and be used further for all application consuming the camera.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • But how to control camera properties? In my case autofocus is poor, so I need to disable it. The only way I've seen is that mechanism. DirectShow provides access through dialog, but scripting mouse/keyboard is not the opportunity I'm looking for. And usb access seems like hellish torment. – C0oo1D Jun 06 '20 at 18:29
  • 1
    To control/disable autofocus you'd use [`IAMCameraControl` interface](https://learn.microsoft.com/en-us/windows/win32/api/strmif/nn-strmif-iamcameracontrol) and `CameraControl_Focus` property ([related question](https://stackoverflow.com/a/56056897/868014)). Just checked - yes, according to my data Microsoft® LifeCam Studio(TM) implements it. – Roman R. Jun 06 '20 at 19:35