title: Ffmpeg Command to capture video from Decklink 4k Extreme in Ubuntu Linux
body: <p>I am trying to capture a video using ffmpeg, from the HDMI input port of the Blackmagic DeckLink 4K Extreme capture card in Ubuntu Linux.</p>
  
  <p>As per the <a href="https://www.ffmpeg.org/ffmpeg-devices.html#decklink" rel="nofollow noreferrer" title="ffmpeg devices Documentation">ffmpeg Documentation</a> I have tried the following:</p>
  
  <pre><code>ffmpeg -f decklink -video_input 'hdmi' -i 'DeckLink 4K Extreme (1)@14' -acodec copy -vcodec copy ~/testCapture/card1_f14_hdmi.avi
  </code></pre>
  
  <p>but no matter what I do I always get this picture as a video<br>
  <a href="https://i.stack.imgur.com/ubTDos.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ubTDos.jpg" alt="Video unavailable"></a></p>
  
  <p>My ffmpeg version is :</p>
  
  <blockquote>
  <pre><code>ffmpeg version git-2016-08-15-4899953 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static 
  --extra-cflags=-I/root/ffmpeg_build/include 
  --extra-ldflags=-L/root/ffmpeg_build/lib 
  --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac 
  --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora 
  --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 
  --enable-decklink 
  --extra-cflags=-I/root/decklinkSDK/Blackmagic_DeckLink_SDK/Linux/include
  --extra-ldflags=-L/root/decklinkSDK/Blackmagic_DeckLink_SDK/Linux/include
  --enable-nonfree
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 51.102 / 57. 51.102
  libavformat    57. 46.101 / 57. 46.101
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 51.100 /  6. 51.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
  </code></pre>
  </blockquote>
  
  <p>I have two of these cards as per the following:  </p>
  
  <blockquote>
  <pre><code>ffmpeg -f decklink -list_devices 1 -i dummy
  .....
  [decklink @ 0x2e9e440] Blackmagic DeckLink devices:
  [decklink @ 0x2e9e440]    'DeckLink 4K Extreme (1)'
  [decklink @ 0x2e9e440]    'DeckLink 4K Extreme (2)'
  </code></pre>
  </blockquote>
  
  <p>I am able to get a list of the supported formats with the following:</p>
  
  <blockquote>
  <pre><code>ffmpeg -f decklink -list_formats 1 -i 'DeckLink 4K Extreme (1)'
  ...
  [decklink @ 0x36e2440] Supported formats for 'DeckLink 4K Extreme (1)':
  [decklink @ 0x36e2440]    1   720x486 at 30000/1001 fps (interlaced, lower field first)
  [decklink @ 0x36e2440]    2   720x576 at 25000/1000 fps (interlaced, upper field first)
  [decklink @ 0x36e2440]    3   1920x1080 at 24000/1001 fps
  [decklink @ 0x36e2440]    4   1920x1080 at 24000/1000 fps
  [decklink @ 0x36e2440]    5   1920x1080 at 25000/1000 fps
  [decklink @ 0x36e2440]    6   1920x1080 at 30000/1001 fps
  [decklink @ 0x36e2440]    7   1920x1080 at 30000/1000 fps
  [decklink @ 0x36e2440]    8   1920x1080 at 25000/1000 fps (interlaced, upper field first)
  [decklink @ 0x36e2440]    9   1920x1080 at 30000/1001 fps (interlaced, upper field first)
  [decklink @ 0x36e2440]    10  1920x1080 at 30000/1000 fps (interlaced, upper field first)
  [decklink @ 0x36e2440]    11  1920x1080 at 50000/1000 fps
  [decklink @ 0x36e2440]    12  1920x1080 at 60000/1001 fps
  [decklink @ 0x36e2440]    13  1920x1080 at 60000/1000 fps
  [decklink @ 0x36e2440]    14  1280x720 at 50000/1000 fps
  [decklink @ 0x36e2440]    15  1280x720 at 60000/1001 fps
  [decklink @ 0x36e2440]    16  1280x720 at 60000/1000 fps
  ...
  DeckLink 4K Extreme (1): Immediate exit requested
  </code></pre>
  </blockquote>
  
  <p>What should I use with ffmpeg in order to capture an HD video with sound from the HDMI port?</p>