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 linked.
-map 0:d
.