1

Я пытаюсь сделать снимок с моей веб-камеры с помощью FFMpeg.

Это то, что я пытаюсь запустить:

@echo off

:: Get date and time
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set datetime=%ldt:~0,4%_%ldt:~4,2%_%ldt:~6,2%_%ldt:~8,2%_%ldt:~10,2%_%ldt:~12,2%

:: Capture snapshot through DirectShow using FFmpeg and save to disk.
ffmpeg.exe -f dshow -i video="1.3M WebCam" -vframes 1 D:\snapshot_%datetime%.jpg

Выход:

    ffmpeg version N-63746-gfbaf73a Copyright (c) 2000-2014 the FFmpeg developers
    built on Jun  3 2014 22:10:20 with gcc 4.8.2 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
    libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
    njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
    r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
    -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
    libxavs --enable-libxvid --enable-decklink --enable-zlib
      libavutil      52. 89.100 / 52. 89.100
      libavcodec     55. 66.100 / 55. 66.100
      libavformat    55. 42.100 / 55. 42.100
      libavdevice    55. 13.101 / 55. 13.101
      libavfilter     4.  5.100 /  4.  5.100
      libswscale      2.  6.100 /  2.  6.100
      libswresample   0. 19.100 /  0. 19.100
      libpostproc    52.  3.100 / 52.  3.100
    [dshow @ 0000000002ac0480] Could not run filter
    video=1.3M WebCam: Input/output error

Не могу понять, где проблема.

Когда я запускаю ffmpeg -list_devices true -f dshow -i dummy , я получаю:

ffmpeg version N-63746-gfbaf73a Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun  3 2014 22:10:20 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 89.100 / 52. 89.100
  libavcodec     55. 66.100 / 55. 66.100
  libavformat    55. 42.100 / 55. 42.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[dshow @ 00000000003103e0] DirectShow video devices
[dshow @ 00000000003103e0]  "1.3M WebCam"
[dshow @ 00000000003103e0] DirectShow audio devices
[dshow @ 00000000003103e0]  "Microphone (Realtek High Defini"
dummy: Immediate exit requested

0