Check with ffmpeg if your Blackmagic device is installed correctly by running the following command:

ffmpeg -list_devices true -f dshow -i dummy

[dshow @ 000000a9a5eaa880] DirectShow video devices (some may be both video and audio devices)
[dshow @ 000000a9a5eaa880]  "Blackmagic WDM Capture"
[dshow @ 000000a9a5eaa880]     Alternative name "@device_pnp_\\?\decklink#avstre am#5&2550cef9&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\decklinkcapture1"
[dshow @ 000000a9a5eaa880]  "Decklink Video Capture" 
[dshow @ 000000a9a5eaa880]     Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{44A8B5C7-13B6-4211-BD40-35B629D9E6DF}"
[dshow @ 000000a9a5eaa880] DirectShow audio devices
[dshow @ 000000a9a5eaa880]  "Line In (Blackmagic Audio)"
[dshow @ 000000a9a5eaa880]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{E4A3FD31-CA95-412B-9463-58084D0D11A6}"
[dshow @ 000000a9a5eaa880]  "Decklink Audio Capture"
[dshow @ 000000a9a5eaa880]     Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{AAA22F7E-5AA0-49D9-8C8D-B52B1AA92EB7}"
You can list your devices with:

ffmpeg -list_devices true -f dshow -i dummy
To list the supported, connected capture devices:

ffmpeg -y -f vfwcap -i list

# Output:
# …
# libavutil     50.36. 0 / 50.36. 0
# libavcore      0.16. 1 /  0.16. 1
# libavcodec    52.108. 0 / 52.108. 0
# libavformat   52.93. 0 / 52.93. 0
# libavdevice   52. 2. 3 / 52. 2. 3
# libavfilter    1.74. 0 /  1.74. 0
# libswscale     0.12. 0 /  0.12. 0
# [vfwcap @ 01c6d150] Driver 0
# [vfwcap @ 01c6d150]  Microsoft WDM Image Capture (Win32)
# [vfwcap @ 01c6d150]  Version:  5.1.2600.5512
# list: Input/output error

ffmpeg -list_options true -f dshow -i video="Decklink Video Capture"

[dshow @ 0000007201cda8a0] DirectShow video device options (from video devices)
[dshow @ 0000007201cda8a0]  Pin "Capture" (alternative pin name "1")
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=720x486 fps=29.97 max s=720x486 fps=29.97
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=720x576 fps=25 max s=720x576 fps=25
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=23.976 max s=1920x1080 fps=23.976
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=24 max s=1920x1080 fps=24
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=25 max s=1920x1080 fps=25
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=29.97 max s=1920x1080 fps=29.97
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=30 max s=1920x1080 fps=30
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=50 max s=1920x1080 fps=50
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=59.9402 max s=1920x1080 fps=59.9402
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1920x1080 fps=60.0002 max s=1920x1080 fps=60.0002
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1280x720 fps=50 max s=1280x720 fps=50
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1280x720 fps=59.9402 max s=1280x720 fps=59.9402
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=1280x720 fps=60.0002 max s=1280x720 fps=60.0002
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=3840x2160 fps=23.976 max s=3840x2160 fps=23.976
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=3840x2160 fps=24 max s=3840x2160 fps=24
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=3840x2160 fps=25 max s=3840x2160 fps=25
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=3840x2160 fps=29.97 max s=3840x2160 fps=29.97
[dshow @ 0000007201cda8a0]   pixel_format=uyvy422  min s=3840x2160 fps=30 max s=3840x2160 fps=30
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=720x486 fps=29.97 max s=720x486fps=29.97
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=720x576 fps=25 max s=720x576 fps=25
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=23.976 max s=1920x1080 fps=23.976
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=24 max s=1920x1080 fps=24
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=25 max s=1920x1080 fps=25
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=29.97 max s=1920x1080 fps=29.97
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=30 max s=1920x1080 fps=30
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=50 max s=1920x1080 fps=50
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=59.9402 max s=1920x1080 fps=59.9402
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1920x1080 fps=60.0002 max s=1920x1080 fps=60.0002
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1280x720 fps=50 max s=1280x720 fps=50
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1280x720 fps=59.9402 max s=1280x720 fps=59.9402
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=1280x720 fps=60.0002 max s=1280x720 fps=60.0002
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=3840x2160 fps=23.976 max s=3840x2160 fps=23.976
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=3840x2160 fps=24 max s=3840x2160 fps=24
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=3840x2160 fps=25 max s=3840x2160 fps=25
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=3840x2160 fps=29.97 max s=3840x2160 fps=29.97
[dshow @ 0000007201cda8a0]   vcodec=v210  min s=3840x2160 fps=30 max s=3840x2160 fps=30
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=23.976 max s=1920x1080 fps=23.976
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=24 max s=1920x1080 fps=24
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=25 max s=1920x1080 fps=25
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=29.97 max s=1920x1080 fps=29.97
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=30 max s=1920x1080 fps=30
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=50 max s=1920x1080 fps=50
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=59.9402 max s=1920x1080 fps=59.9402
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1920x1080 fps=60.0002 max s=1920x1080 fps=60.0002
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1280x720 fps=50 max s=1280x720 fps=50
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1280x720 fps=59.9402 max s=1280x720 fps=59.9402
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=1280x720 fps=60.0002 max s=1280x720 fps=60.0002
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=3840x2160 fps=23.976 max s=3840x2160 fps=23.976
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=3840x2160 fps=24 max s=3840x2160 fps=24
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=3840x2160 fps=25 max s=3840x2160 fps=25
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=3840x2160 fps=29.97 max s=3840x2160 fps=29.97
[dshow @ 0000007201cda8a0]   vcodec=r210  min s=3840x2160 fps=30 max s=3840x2160 fps=30
List available dither options related to the argument. The argument must be one of algorithms, antialiases, charsets, colors.

ffmpeg -i INPUT -c:v rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
List available dither options related to the argument. The argument must be one of algorithms, antialiases, charsets, colors.

ffmpeg -i INPUT -c:v rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -

First be sure that the video label you use is really the label return by:

More info here But another solution should be ti use the old "Video For Windows" (VFW). To try that, list your device with:

And use your device number as value of the -ioption:

And if finally you are able to record your stream, there is different options, but in your case everything is clear describe here


ffmpeg -list_devices true -f dshow -i dummy


ffmpeg -y -f vfwcap -i list


ffmpeg -y -f vfwcap -r 25 -i 0 out.mp4


ffmpeg -y -f vfwcap -r 25 -i 0 -f image2 -vf fps=fps=1 out%d.jpg

Using DirectShow (dshow) input and make a JPG snapshot:

Print the list of dshow supported devices and exit:

Print the list of supported options in selected device and exit:


ffmpeg -f dshow -i "video=HD Pro Webcam C920" -frames:v 1 test.jpg


ffmpeg -list_devices true -f dshow -i dummy


ffmpeg -list_options true -f dshow -i "video=HD Pro Webcam C920"

I did it... based on what @Mulvya commented, i was able to list all cameras withing the code and extract a command from them, i now have a different issue about that, but i will ask another question for it. In the meanwhile, if anyone is interested in automatically selecting the first available camera on windows through python and ffmpeg, my solution is this:


    import re
    from subprocess import Popen, PIPE
    list_cmd = 'ffmpeg -list_devices true -f dshow -i dummy'.split()
    p = Popen(list_cmd, stderr=PIPE)
    for line in iter(p.stderr.readline,''):
        if flagcam:
            cam = re.search('".*"',line.decode(encoding='UTF-8')).group(0)
            cam = 'video=' + cam if cam else ''
            flagcam = False
        elif 'DirectShow video devices'.encode(encoding='UTF-8') in line:
            flagcam = True
        elif 'Immediate exit requested'.encode(encoding='UTF-8') in line:
            break

As it turns out, FFMPEG supports DirectShow under Windows, allowing us to select an audio input. For example, the following command records my web cam's microphone, dumping an MP3 file along the way:

You can get a list of input devices by running:


ffmpeg -f dshow -i audio="Microphone (2- Microsoft LifeCa" test.mp3


ffmpeg -list_devices true -f dshow -i dummy

Recommend

FFMPEG Capture/Lightning–FFmpeg The actual solution

FFMPEG Capture/Lightning–FFmpeg The ideal solution

FFMPEG Capture/V4L2_ALSA–FFmpeg Destinations Streaming to your LAN

FFMPEG Capture/V4L2_ALSA–FFmpeg Destinations Streaming on your web site

FFMPEG Capture/V4L2_ALSA–FFmpeg Destinations File

FFMPEG Capture/V4L2_ALSA–FFmpeg Compression

FFMPEG Capture/V4L2_ALSA–FFmpeg Video stream

FFMPEG Examples Record audio from an application

FFMPEG Examples Record audio from your microphone

FFMPEG Selecting the input Mixer tools pactl

FFMPEG Selecting the input

FFMPEG Syntax

FFMPEG Examples Record audio from an application while also routing the audio to an output device

FFMPEG Selecting the input card Surviving the reboot

FFMPEG Selecting the input card

FFMPEG OS X AVFoundation

FFMPEG Linux Adjusting camera functions

FFMPEG Linux Encoding example

FFMPEG Linux List device capabilities

FFMPEG Linux List devices

FFMPEG Windows vfwcap Encoding example

FFMPEG Windows vfwcap List devices

FFMPEG Lossless Recording

FFMPEG Hardware Encoding

FFMPEG Windows Use built-in GDI screengrabber

FFMPEG Windows Use DirectShow

FFMPEG macOS

FFMPEG Linux

FFMPEG Debugging Macroblocks and Motion Vectors

FFMPEG Testing Coverage of FATE Test Suite Using gcovr

FFMPEG Testing Coverage of FATE Test Suite Using lcov

FFMPEG Testing Coverage of FATE Test Suite ./configure

FFMPEG Testing Coverage of FATE Test Suite Prerequisites

FFMPEG FATE/UseOftiny_psnr–FFmpeg Use of tiny_psnr

FFMPEG Adding a FATE Test Three Parts of a Test Configuration enc_dec_pcm

FFMPEG Adding a FATE Test Three Parts of a Test Registration Lots of Tests for One Feature -- Irregular File Names

FFMPEG Adding a FATE Test Three Parts of a Test Registration <= 3 Tests for One Feature

FFMPEG Adding a FATE Test Three Parts of a Test Registration One Test for One Feature

FFMPEG fateserver Getting Started on Developing fateserver Feed fateserver Data To Display Not Using SSH

FFMPEG fateserver Getting Started on Developing fateserver Feed fateserver Data To Display Using SSH

FFMPEG fateserver Getting Started on Developing fateserver Install fateserver

FFMPEG Hardware/VAAPI–FFmpeg Full Examples Other

FFMPEG Hardware/VAAPI–FFmpeg Full Examples Transcode

FFMPEG Hardware/VAAPI–FFmpeg Full Examples Encode-only Screen Capture

FFMPEG Hardware/VAAPI–FFmpeg Full Examples Encode-only Camera Capture

FFMPEG Hardware/VAAPI–FFmpeg Full Examples Encode-only