Body: <p>I am trying to capture tape content via a BlackMagic Decklink Quad 2, using ffmpeg. </p>
  
  <p>I believe the timecode is passed on through the Decklink because when capturing manually with MediaExpres the timecode is present in the file. So I suspect my settings for ffmpeg are incorrect. </p>
  
  <pre><code>./ffmpeg -loglevel trace -format_code pal -timecode_format rp188vitc -f decklink -i "DeckLink Quad (1)" -map 0:d  TC9atest_09.mov 
  </code></pre>
  
  <p>This prints the following output (incomplete) from which I understand that it only seems to find audio and video streams. I have tried different timecode formats and a few stream mapping options but with no success so far.</p>
  
  <pre><code>Input #0, decklink, from 'DeckLink Quad (1)':
    Duration: N/A, start: 0.000000, bitrate: 167424 kb/s
      Stream #0:0, 5, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
      Stream #0:1, 6, 1/1000000: Video: rawvideo, 1 reference frame (UYVY / 0x59565955), uyvy422(top first), 720x576, 0/1, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
  Successfully opened the file.
  Parsing a group of options: output url TC9atest_09.mov.
  Applying option map (set input stream mapping) with argument 0:d.
  Stream map '0:d' matches no streams.
  To ignore this, add a trailing '?' to the map.
  </code></pre>
  
  <p>Capturing stops after the message above. If I add "?" as indicated, capturing runs but there is no timecode written in the file. Without an explicit mapping for the d stream, there is also no timecode in the file created. </p>
  
  <p>The only way that worked for me to add a timecode is with the manually specified timecode start -timecode, but this option does not work for my use case as I want the original timecode, not just a timecode.</p>
  
  <pre><code>./ffmpeg -loglevel trace  -format_code pal -timecode_format rp188vitc -f decklink -i "DeckLink Quad (1)"  -timecode 00:10:00:00  TC9atest_10.mov 
  </code></pre>
  
  <p>Any pointers would be greatly appreciated. </p>
  
  <p>Full output from the first command:</p>
  
  <pre><code>./ffmpeg -loglevel trace  -format_code pal -timecode_format rp188vitc -f decklink -i "DeckLink Quad (1)"    -map 0:d  TC9atest_09.mov 
  ffmpeg version 4.1.git Copyright (c) 2000-2019 the FFmpeg developers
    built with gcc 7 (Debian 7.3.0-18)
    configuration: --prefix=/usr/local/home/xxx/ffmpeg/build.static --pkg-config-flags=--static --enable-decklink --extra-cflags='-I/usr/local/home/xxx/Desktop/ffmpeg/build.static/include -I/usr/local/home/xxx/Desktop/ffmpeg/BM_SDK_11.1/Linux/include' --extra-ldflags='-L/usr/local/home/xxx/Desktop/ffmpeg/build.static/lib -L~/Desktop/ffmpeg/BM_SDK_11.1/Linux/include' --extra-libs=-lpthread --bindir=/usr/local/home/xxx/Desktop/ffmpeg/bin.static --enable-gpl --enable-version3 --enable-nonfree --enable-libfdk_aac --enable-fontconfig --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-openssl
    libavutil      56. 27.100 / 56. 27.100
    libavcodec     58. 52.101 / 58. 52.101
    libavformat    58. 27.103 / 58. 27.103
    libavdevice    58.  7.100 / 58.  7.100
    libavfilter     7. 53.100 /  7. 53.100
    libswscale      5.  4.101 /  5.  4.101
    libswresample   3.  4.100 /  3.  4.100
    libpostproc    55.  4.100 / 55.  4.100
  Splitting the commandline.
  Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'trace'.
  Reading option '-format_code' ... matched as AVOption 'format_code' with argument 'pal'.
  Reading option '-timecode_format' ... matched as AVOption 'timecode_format' with argument 'rp188vitc'.
  Reading option '-f' ... matched as option 'f' (force format) with argument 'decklink'.
  Reading option '-i' ... matched as input url with argument 'DeckLink Quad (1)'.
  Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:d'.
  Reading option 'TC9atest_09.mov' ... matched as output url.
  Finished splitting the commandline.
  Parsing a group of options: global .
  Applying option loglevel (set logging level) with argument trace.
  Successfully parsed a group of options.
  Parsing a group of options: input url DeckLink Quad (1).
  Applying option f (force format) with argument decklink.
  Successfully parsed a group of options.
  Opening an input file: DeckLink Quad (1).
  [decklink @ 0x55fc4ab56540] Trying to find mode for frame size 0x0, frame timing 0/0, field order 0, direction 0, mode number 0, format code pal
  [decklink @ 0x55fc4ab56540] Found Decklink mode 720 x 576 with rate 25.00(i)
  [decklink @ 0x55fc4ab56540] Using 2 input audio channels
  [decklink @ 0x55fc4ab56540] Frame received (#1) - No input signal detected - Frames dropped 1
  [decklink @ 0x55fc4ab56540] Probe buffer size limit of 5000000 bytes reached
  [decklink @ 0x55fc4ab56540] stream 0: start_time: 0.000 duration: -9223372036854.775
  [decklink @ 0x55fc4ab56540] stream 1: start_time: 0.000 duration: -9223372036854.775
  [decklink @ 0x55fc4ab56540] format: start_time: 0.000 duration: -9223372036854.775 bitrate=167424 kb/s
  Guessed Channel Layout for Input Stream #0.0 : stereo
  Input #0, decklink, from 'DeckLink Quad (1)':
    Duration: N/A, start: 0.000000, bitrate: 167424 kb/s
      Stream #0:0, 5, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
      Stream #0:1, 6, 1/1000000: Video: rawvideo, 1 reference frame (UYVY / 0x59565955), uyvy422(top first), 720x576, 0/1, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
  Successfully opened the file.
  Parsing a group of options: output url TC9atest_09.mov.
  Applying option map (set input stream mapping) with argument 0:d.
  Stream map '0:d' matches no streams.
  To ignore this, add a trailing '?' to the map.
  </code></pre>
  
  <p>If I don't map any stream, capturing works but the file does not contain a timecode. <a href="https://docs.google.com/document/d/1os-ov9MIMDGkx01-Itgl377i4C72K7akx-cVqDNXFK4/edit?usp=sharing" rel="nofollow noreferrer">Full log</a> linked.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T11:14:46.603Z
Comments.Text: Did you email me earlier?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T13:00:47.447Z
Comments.Text: Hi Gyan, I did not. I believe a colleague of mine did but as far as I know not with this particular question :).
Comments.UserDisplayName: ilinca
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T13:17:41.267Z
Comments.Text: Ok, my reply got bounced back. Share full log of your first command.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T13:31:17.603Z
Comments.Text: Updated with full log.
Comments.UserDisplayName: ilinca
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T13:41:04.327Z
Comments.Text: Show log of run without `-map 0:d`.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T14:53:12.110Z
Comments.Text: Done, I just left some of the repeated lines out.
Comments.UserDisplayName: ilinca
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-23T15:24:36.773Z
Comments.Text: Don't do that - paste or link the entire log.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-24T09:33:10.290Z
Comments.Text: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/94054/discussion-between-ilinca-and-gyan).
Comments.UserDisplayName: ilinca
Tags: <ffmpeg><timecode><metadata><blackmagic>
Title: Capture original timecode with ffmpeg from decklink
UserDisplayName: ilinca
ThreadText: # Capture original timecode with ffmpeg from decklink
  
  (Asked by: username_0 on 2019-05-23)
  
  I am trying to capture tape content via a BlackMagic Decklink Quad 2, using ffmpeg.
  
  I believe the timecode is passed on through the Decklink because when capturing manually with MediaExpres the timecode is present in the file. So I suspect my settings for ffmpeg are incorrect.
  
  ```
  ./ffmpeg -loglevel trace -format_code pal -timecode_format rp188vitc -f decklink -i "DeckLink Quad (1)" -map 0:d  TC9atest_09.mov 
  
  ```
  
  This prints the following output (incomplete) from which I understand that it only seems to find audio and video streams. I have tried different timecode formats and a few stream mapping options but with no success so far.
  
  ```
  Input #0, decklink, from 'DeckLink Quad (1)':
    Duration: N/A, start: 0.000000, bitrate: 167424 kb/s
      Stream #0:0, 5, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
      Stream #0:1, 6, 1/1000000: Video: rawvideo, 1 reference frame (UYVY / 0x59565955), uyvy422(top first), 720x576, 0/1, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
  Successfully opened the file.
  Parsing a group of options: output url TC9atest_09.mov.
  Applying option map (set input stream mapping) with argument 0:d.
  Stream map '0:d' matches no streams.
  To ignore this, add a trailing '?' to the map.
  
  ```
  
  Capturing stops after the message above. If I add "?" as indicated, capturing runs but there is no timecode written in the file. Without an explicit mapping for the d stream, there is also no timecode in the file created.
  
  The only way that worked for me to add a timecode is with the manually specified timecode start -timecode, but this option does not work for my use case as I want the original timecode, not just a timecode.
  
  ```
  ./ffmpeg -loglevel trace  -format_code pal -timecode_format rp188vitc -f decklink -i "DeckLink Quad (1)"  -timecode 00:10:00:00  TC9atest_10.mov 
  
  ```
  
  Any pointers would be greatly appreciated.
  
  Full output from the first command:
  
  ```
  ./ffmpeg -loglevel trace  -format_code pal -timecode_format rp188vitc -f decklink -i "DeckLink Quad (1)"    -map 0:d  TC9atest_09.mov 
  ffmpeg version 4.1.git Copyright (c) 2000-2019 the FFmpeg developers
    built with gcc 7 (Debian 7.3.0-18)
    configuration: --prefix=/usr/local/home/xxx/ffmpeg/build.static --pkg-config-flags=--static --enable-decklink --extra-cflags='-I/usr/local/home/xxx/Desktop/ffmpeg/build.static/include -I/usr/local/home/xxx/Desktop/ffmpeg/BM_SDK_11.1/Linux/include' --extra-ldflags='-L/usr/local/home/xxx/Desktop/ffmpeg/build.static/lib -L~/Desktop/ffmpeg/BM_SDK_11.1/Linux/include' --extra-libs=-lpthread --bindir=/usr/local/home/xxx/Desktop/ffmpeg/bin.static --enable-gpl --enable-version3 --enable-nonfree --enable-libfdk_aac --enable-fontconfig --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-openssl
    libavutil      56. 27.100 / 56. 27.100
    libavcodec     58. 52.101 / 58. 52.101
    libavformat    58. 27.103 / 58. 27.103
    libavdevice    58.  7.100 / 58.  7.100
    libavfilter     7. 53.100 /  7. 53.100
    libswscale      5.  4.101 /  5.  4.101
    libswresample   3.  4.100 /  3.  4.100
    libpostproc    55.  4.100 / 55.  4.100
  Splitting the commandline.
  Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'trace'.
  Reading option '-format_code' ... matched as AVOption 'format_code' with argument 'pal'.
  Reading option '-timecode_format' ... matched as AVOption 'timecode_format' with argument 'rp188vitc'.
  Reading option '-f' ... matched as option 'f' (force format) with argument 'decklink'.
  Reading option '-i' ... matched as input url with argument 'DeckLink Quad (1)'.
  Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:d'.
  Reading option 'TC9atest_09.mov' ... matched as output url.
  Finished splitting the commandline.
  Parsing a group of options: global .
  Applying option loglevel (set logging level) with argument trace.
  Successfully parsed a group of options.
  Parsing a group of options: input url DeckLink Quad (1).
  Applying option f (force format) with argument decklink.
  Successfully parsed a group of options.
  Opening an input file: DeckLink Quad (1).
  [decklink @ 0x55fc4ab56540] Trying to find mode for frame size 0x0, frame timing 0/0, field order 0, direction 0, mode number 0, format code pal
  [decklink @ 0x55fc4ab56540] Found Decklink mode 720 x 576 with rate 25.00(i)
  [decklink @ 0x55fc4ab56540] Using 2 input audio channels
  [decklink @ 0x55fc4ab56540] Frame received (#1) - No input signal detected - Frames dropped 1
  [decklink @ 0x55fc4ab56540] Probe buffer size limit of 5000000 bytes reached
  [decklink @ 0x55fc4ab56540] stream 0: start_time: 0.000 duration: -9223372036854.775
  [decklink @ 0x55fc4ab56540] stream 1: start_time: 0.000 duration: -9223372036854.775
  [decklink @ 0x55fc4ab56540] format: start_time: 0.000 duration: -9223372036854.775 bitrate=167424 kb/s
  Guessed Channel Layout for Input Stream #0.0 : stereo
  Input #0, decklink, from 'DeckLink Quad (1)':
    Duration: N/A, start: 0.000000, bitrate: 167424 kb/s
      Stream #0:0, 5, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
      Stream #0:1, 6, 1/1000000: Video: rawvideo, 1 reference frame (UYVY / 0x59565955), uyvy422(top first), 720x576, 0/1, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
  Successfully opened the file.
  Parsing a group of options: output url TC9atest_09.mov.
  Applying option map (set input stream mapping) with argument 0:d.
  Stream map '0:d' matches no streams.
  To ignore this, add a trailing '?' to the map.
  
  ```
  
  If I don't map any stream, capturing works but the file does not contain a timecode. [Full log](https://docs.google.com/document/d/1os-ov9MIMDGkx01-Itgl377i4C72K7akx-cVqDNXFK4/edit?usp=sharing) linked.
  
  **Tags:** ffmpeg, timecode, metadata, blackmagic
  
  > **Comments:**
  > **username_1**: Did you email me earlier?  
  > **username_0**: Hi username_1, I did not. I believe a colleague of mine did but as far as I know not with this particular question :).  
  > **username_1**: Ok, my reply got bounced back. Share full log of your first command.  
  > **username_0**: Updated with full log.  
  > **username_1**: Show log of run without `-map 0:d`.  
  > **username_0**: Done, I just left some of the repeated lines out.  
  > **username_1**: Don't do that - paste or link the entire log.  
  > **username_0**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/94054/discussion-between-username_0-and-username_1).  
  
  ---
  
  ## 0 answers
  
  