2

I've been spending the 24 hours troubleshooting this problem, but am getting a bit stuck.

Pre-info: I'm running an Ubuntu 18.04 server with a DeckLink Duo 2 card inside.

Goal: Capture video from the DeckLink Duo 2 and write it to output.avi

What I've tried so far:

I've installed BMD DeckLink drivers 10.11.4 on my Ubuntu Server and verified they server can see the card:

redacted@redacted:~$ BlackmagicFirmwareUpdater status
0:  /dev/blackmagic/io0 [DeckLink Duo 2]    0xd5    OK
1:  /dev/blackmagic/io2 [DeckLink Duo 2]    0xd5    OK
2:  /dev/blackmagic/io1 [DeckLink Duo 2]    0xd5    OK
3:  /dev/blackmagic/io3 [DeckLink Duo 2]    0xd5    OK

I've compiled ffmpeg with decklink and the following configuration:

ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: 
--prefix=/home/redacted/ffmpeg_build 
--pkg-config-flags=--static 
--extra-cflags='-I/home/redacted/ffmpeg_build/include -I/home/redacted/ffmpeg_sources/BMD_SDK/include' 
--extra-ldflags=-L/home/redacted/ffmpeg_build/lib 
--extra-libs='-lpthread -lm' 
--bindir=/home/redacted/bin 
--enable-gpl 
--enable-libass 
--enable-libfdk-aac 
--enable-libfreetype 
--enable-libmp3lame 
--enable-libopus 
--enable-libvorbis 
--enable-libvpx 
--enable-libx264 
--enable-libx265 
--enable-nonfree 
--enable-decklink

Next I do a basic check to see if my DeckLink Duo 2 shows up in ffmpeg:

[decklink @ 0x5574cc33ef00] Blackmagic DeckLink input devices:
[decklink @ 0x5574cc33ef00]     'DeckLink Duo (1)'
[decklink @ 0x5574cc33ef00]     'DeckLink Duo (2)'
[decklink @ 0x5574cc33ef00]     'DeckLink Duo (3)'
[decklink @ 0x5574cc33ef00]     'DeckLink Duo (4)'
dummy: Immediate exit requested

This confirms the card is seen by ffmpeg.

So now I want to run a capture command, however, it does not matter what command I run, FFmpeg does not start capturing. For example, running a very basic:

"ffmpeg -format_code Hi50 -f decklink -i 'DeckLink Duo (1)' out.avi"

returns

redacted@redacted:~$ ffmpeg -format_code Hi50 -f decklink -i 'DeckLink 
Duo (1)' out.avi
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --prefix=/home/redacted/ffmpeg_build --pkg-config-flags=--static - 
-extra-cflags='-I/home/redacted/ffmpeg_build/include - 
I/home/redacted/ffmpeg_sources/BMD_SDK/include' --extra-ldflags=- 
L/home/redacted/ffmpeg_build/lib --extra-libs='-lpthread -lm' -- 
bindir=/home/redacted/bin --enable-gpl --enable-libass --enable-libfdk-aac -- 
enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis -- 
enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable- 
decklink
libavutil      56. 22.100 / 56. 22.100
libavcodec     58. 35.100 / 58. 35.100
libavformat    58. 20.100 / 58. 20.100
libavdevice    58.  5.100 / 58.  5.100
libavfilter     7. 40.101 /  7. 40.101
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100
libpostproc    55.  3.100 / 55.  3.100
[decklink @ 0x5638a755d000] Found Decklink mode 1920 x 1080 with rate 25.00(i)

It doesn't matter how complicated I make the initial command, with video formats, audio formats, custom sizes, codecs, etc. It all returns the same.

It essentially stays stuck in this position, with the command still running forever. To the best of my knowledge, FFmpeg is supposed to start the encoding process straight after. It does not.

I can confirm that a normal re-encoding command such as:

redacted@redacted:~$ ffmpeg -i video.mov out.avi

works just fine. So FFmpeg at a basic level works.

I can also confirm FFmpeg can 'talk to the DeckLink and set the right mode, I can confirm a picture 'flows' through the card as I can see it showing up on the output loop on my monitor(see image) as soon as I put any of the FFmpeg commands in, however, FFmpeg does not start encoding/capturing.

image showing on loopout

I think I've done something wrong with the configuration/compiling of FFmpeg, perhaps during compiling, but I cannot figure out what I've done wrong.

Any suggestions are much appreciated.

Thanks,

Rik

EDIT: Running the command with -loglevel trace as requested

redacted@redacted:~$ ffmpeg -loglevel trace -raw_format yuv422p10 1 -an 
- 
format_code Hp25 -f decklink -i 'DeckLink Duo (2)' output.avi
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --prefix=/home/redacted/ffmpeg_build --pkg-config-flags=--static 
- 
-extra-cflags='-I/home/redacted/ffmpeg_build/include - 
I/home/redacted/ffmpeg_sources/BMD_SDK/include' --extra-ldflags=- 
L/home/redacted/ffmpeg_build/lib --extra-libs='-lpthread -lm' -- 
bindir=/home/redacted/bin --enable-gpl --enable-libass --enable-libfdk-aac -- 
enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis -- 
enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable- 
decklink
libavutil      56. 22.100 / 56. 22.100
libavcodec     58. 35.100 / 58. 35.100
libavformat    58. 20.100 / 58. 20.100
libavdevice    58.  5.100 / 58.  5.100
libavfilter     7. 40.101 /  7. 40.101
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100
libpostproc    55.  3.100 / 55.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging 
level) with argument 'trace'.
Reading option '-raw_format' ... matched as AVOption 'raw_format' with 
argument 'yuv422p10'.
Reading option '1' ... matched as output url.
Reading option '-ac' ... matched as option 'ac' (set number of audio 
channels) with argument '2'.
Reading option '-format_code' ... matched as AVOption 'format_code' with 
argument 'Hp25'.
Reading option '-f' ... matched as option 'f' (force format) with argument 
'decklink'.
Reading option '-i' ... matched as input url with argument 'DeckLink Duo 
(2)'.
Reading option 'output.avi' ... 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 Duo (2).
Applying option ac (set number of audio channels) with argument 2.
Applying option f (force format) with argument decklink.
Successfully parsed a group of options.
Opening an input file: DeckLink Duo (2).
[decklink @ 0x55cef7de7300] Trying to find mode for frame size 0x0, frame 
timing 0/0, field order 0, direction 0, mode number 0, format code Hp25
[decklink @ 0x55cef7de7300] Found Decklink mode 1920 x 1080 with rate 25.00
[decklink @ 0x55cef7de7300] Using 2 input audio channels
  • Run the command with -loglevel trace and share full log. – Gyan Aug 1 '19 at 8:23
  • @Gyan Thanks for looking into this, see original edit – Rik Roukens Aug 1 '19 at 8:37
  • Full log, please. – Gyan Aug 1 '19 at 9:34
  • @Gyan full log this time. apologies. – Rik Roukens Aug 1 '19 at 9:42
1

I managed to fix this. It turns out the card was active, but had frozen for some reason. rebooting the machine, something I should have done in the beginning sorted out the problem. Thinks are still not perfect. But my issue is solved. Thanks

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.