title: Buffer overrun Blackmagic Intensity 4K as input to FFmpeg
body: <p>I am trying to take direct video output from a 4k Sony Handycam, via HDMI directly into a Blackmagic Intensity Pro 4K. I can verify that the camera, Hdmi and blackmagic card are working as I can capture and view video using the provided "Media Express" program. When use ffmpeg I do get video output but I also get a buffer overrun.</p>
  
  <p>Here is the command:</p>
  
  <pre><code>time ffmpeg -f decklink -i "Intensity Pro 4K@20" -c:v nvenc -b:v 100M -vf yadif=0:-1:0" -pix_fmt yuv420p -crf 29.97 -strict -2 output.mp4
  </code></pre>
  
  <p>And I get the following output:</p>
  
  <pre><code>ffmpeg version N-76538-gb83c849 Copyright (c) 2000-2015 the FFmpeg 
  
  developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --enable-nonfree --enable-nvenc --enable-nvresize --extra-cflags=-I../cudautils --extra-ldflags=-L../cudautils --enable-gpl --enable-libx264 --enable-libx265 --enable-decklink --extra-cflags=-I/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include --extra-ldflags=-L/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include
  libavutil      55.  5.100 / 55.  5.100
  libavcodec     57. 15.100 / 57. 15.100
  libavformat    57. 14.100 / 57. 14.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 15.100 /  6. 15.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
  [decklink @ 0x1ccd6e0] Found Decklink mode 3840 x 2160 with rate 29.97
  [decklink @ 0x1ccd6e0] Stream #1: not enough frames to estimate rate; consider increasing probesize
  Guessed Channel Layout for  Input Stream #0.0 : stereo
  Input #0, decklink, from 'Intensity Pro 4K@20':
  Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
  Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
  Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422, 3840x2160, -5 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc
  Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (output.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
  File 'output.mp4' already exists. Overwrite ? [y/N] y
  Output #0, mp4, to 'output.mp4':
  Metadata:
  encoder         : Lavf57.14.100
  Stream #0:0: Video: h264 (nvenc) ([33][0][0][0] / 0x0021), yuv420p, 3840x2160, q=-1--1, 100000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
  Metadata:
  encoder         : Lavc57.15.100 nvenc
  Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s
  Metadata:
  encoder         : Lavc57.15.100 aac
  Stream mapping:
  Stream #0:1 -&gt; #0:0 (rawvideo (native) -&gt; h264 (nvenc))
  Stream #0:0 -&gt; #0:1 (pcm_s16le (native) -&gt; aac (native))
  Press [q] to stop, [?] for help
  [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.15 bitrate=70411.7kbits/s   
  Last message repeated 1 times
  [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.54 bitrate=73110.9kbits/s   
  Last message repeated 20 times
  [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.92 bitrate=76270.2kbits/s   
  Last message repeated 15 times
  [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:04.28 bitrate=78367.6kbits/s   
  Last message repeated 61 times
  frame=  140 fps= 22 q=-0.0 Lsize=   57266kB time=00:00:04.67 bitrate=100425.2kbits/s   
  video:57187kB audio:72kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.009844%
  [decklink @ 0x1ccd6e0] Decklink input buffer overrun!
  Last message repeated 7 times
  [aac @ 0x1cd7020] Qavg: 215.556
  
  real   0m8.808s
  user   0m5.785s
  sys   0m1.749s
  </code></pre>
  
  <p>Some sort of insight into this, be that just some commands that may fix it the issue, or otherwise.</p>