Decklink Quad Playback on Ubuntu Server

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Jonas Holthusen

  • Posts: 2
  • Joined: Mon Sep 11, 2017 1:29 pm

Decklink Quad Playback on Ubuntu Server

PostMon Sep 11, 2017 1:33 pm

Hello,
we have a problem with an Ubuntu 16.04 Server and a Decklink Quad card. I hope somebody can help us.

We try to get an output from the Decklink card on an SDI port. We succsesfully installed the needed drivers for the card and now try to playback a video via ffmpeg. We compiled ffmpeg with the following configuration options:
Code: Select all
--disable-yasm --enable-nonfree --enable-libx264 --enable-gpl --enable-decklink --extra-cflags=-I/home/daten/Blackmagic_DeckLink_SDK_10.9.5/blacklink/Linux/include --extra-ldflags=-L/home/daten/Blackmagic_DeckLink_SDK_10.9.5/blacklink/Linux/include


We tried to List the output devices according to the ffmpeg devices doc
Code: Select all
ffmpeg -i /home/daten/bla.mp4 -f decklink -list_devices 1 dummy

Code: Select all
/home/daten/ffmpeg$ ffmpeg -i /home/daten/bla.mp4 -f decklink -list_devices 1 dummy
ffmpeg version N-87201-g837c55e Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --disable-yasm --enable-nonfree --enable-libx264 --enable-gpl --enable-decklink --extra-cflags=-I/home/daten/Blackmagic_DeckLink_SDK_10.9.5/blacklink/Linux/include --extra-ldflags=-L/home/daten/Blackmagic_DeckLink_SDK_10.9.5/blacklink/Linux/include
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.105.100 / 57.105.100
  libavformat    57. 81.100 / 57. 81.100
  libavdevice    57.  8.100 / 57.  8.100
  libavfilter     6.102.100 /  6.102.100
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/daten/bla.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01T00:00:00.000000Z
    encoder         : Lavf53.24.2
  Duration: 00:00:05.31, start: 0.000000, bitrate: 1589 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1205 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[decklink @ 0x2068f20] Blackmagic DeckLink devices:
[decklink @ 0x2068f20]  'DeckLink SDI (1)'
[decklink @ 0x2068f20]  'DeckLink SDI (2)'
[decklink @ 0x2068f20]  'DeckLink SDI (3)'
[decklink @ 0x2068f20]  'DeckLink SDI (4)'
Could not write header for output file #0 (incorrect codec parameters ?): Immediate exit requested
Error initializing output stream 0:0 --
Conversion failed!


But when we tried to play a video clip using the standard conversion like in the ffmpeg device doc
Code: Select all
ffmpeg -i /home/daten/bla.mp4 -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink SDI (4)'
we get the following error:
Code: Select all
[decklink @ 0x2f8b340] Could not get configuration interface for 'DeckLink SDI (4)'
Could not write header for output file #0 (incorrect codec parameters ?): Generic error in an external library
Error initializing output stream 0:0 --
Conversion failed!


See full output below.

Code: Select all
/home/daten/ffmpeg$ ffmpeg -i /home/daten/bla.mp4 -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink SDI (4)'
ffmpeg version N-87201-g837c55e Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --disable-yasm --enable-nonfree --enable-libx264 --enable-gpl --enable-decklink --extra-cflags=-I/home/daten/Blackmagic_DeckLink_SDK_10.9.5/blacklink/Linux/include --extra-ldflags=-L/home/daten/Blackmagic_DeckLink_SDK_10.9.5/blacklink/Linux/include
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.105.100 / 57.105.100
  libavformat    57. 81.100 / 57. 81.100
  libavdevice    57.  8.100 / 57.  8.100
  libavfilter     6.102.100 /  6.102.100
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/daten/bla.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01T00:00:00.000000Z
    encoder         : Lavf53.24.2
  Duration: 00:00:05.31, start: 0.000000, bitrate: 1589 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1205 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[decklink @ 0x2f8b340] Could not get configuration interface for 'DeckLink SDI (4)'
Could not write header for output file #0 (incorrect codec parameters ?): Generic error in an external library
Error initializing output stream 0:0 --
Conversion failed!


Can anybody help us with this problem.
Thanks Jonas and Mulu
Offline
User avatar

Xtreemtec

  • Posts: 5397
  • Joined: Wed Jan 02, 2013 11:48 am
  • Location: The Netherlands

Re: Decklink Quad Playback on Ubuntu Server

PostTue Sep 12, 2017 9:02 am

I think you will have more response if you post this in the right sub forum.. >> Software Developers
viewforum.php?f=12
Daniel Wittenaar .:: Xtreemtec Media Productions ::. -= www.xtreemtec.nl =-
4K OBV Trailer, ATEM TVS HD, 4M/E Broadcast Studio 4K, Constelation 8K, Hyperdeck Studio 12G, Ursa Broadcast 4K, 4K fiber converters with Sony Control
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 443
  • Joined: Mon Sep 04, 2017 4:05 am

Re: Decklink Quad Playback on Ubuntu Server

PostMon Sep 18, 2017 7:14 am

Hi Jonas,

Unfortunately I have been unable to replicate this issue, my output is as follows:
Code: Select all
$ ffmpeg -i ../../Untitled02.mp4 -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001  'DeckLink SDI (4)'
ffmpeg version N-87317-g08ec828 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (Ubuntu 6.3.0-12ubuntu2) 20170406
  configuration: --prefix=/home/bmd/ffmpeg_build --pkg-config-flags=--static --extra-cflags='-I/home/bmd/ffmpeg_build/include -I/home/bmd/Downloads/Blackmagic_DeckLink_SDK_10.9.5/Linux/include' --extra-ldflags='-L/home/bmd/ffmpeg_build/lib -L/home/bmd/Downloads/Blackmagic_DeckLink_SDK_10.9.5/Linux/include' --bindir=/home/bmd/bin --enable-gpl --enable-libass --enable-libfreetype --enable-libfdk-aac --enable-libx264 --enable-decklink --enable-nonfree
  libavutil      55. 75.100 / 55. 75.100
  libavcodec     57.106.101 / 57.106.101
  libavformat    57. 82.100 / 57. 82.100
  libavdevice    57.  8.101 / 57.  8.101
  libavfilter     6.105.100 /  6.105.100
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../../Untitled02.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.82.100
  Duration: 00:00:04.32, start: 0.000000, bitrate: 2313 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2179 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[decklink @ 0x55848d952a40] Found Decklink mode 720 x 486 with rate 23.98
Output #0, decklink, to 'DeckLink SDI (4)':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.82.100
    Stream #0:0(und): Video: wrapped_avframe, uyvy422, 720x486, q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.106.101 wrapped_avframe
    Stream #0:1(und): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc57.106.101 pcm_s16le
...


Can you ensure that the DeckLink drivers installed match the SDK headers being used (10.9.5)?

Kind Regards
Cameron Nichols
Offline

Jonas Holthusen

  • Posts: 2
  • Joined: Mon Sep 11, 2017 1:29 pm

Re: Decklink Quad Playback on Ubuntu Server

PostTue Sep 26, 2017 6:22 am

Thank you Cameron Nichols for trying to solve our problem.
We have fixed the problem by starting with working with a graphical interface and try to playback a video with MediaExpress. There we find out, that we can only give the card videos that are in the right format. So we tried again, but that didnt either helped. So we looked up the directory of the SDK and noticed that it was displaced. After that we compiled ffmpeg again and try to playback a videofile in the right format with the same command like before and it worked. Now we can continue with our work. Thanks a lot for your help.
Kind regards Jonas
Offline

catalan63

  • Posts: 5
  • Joined: Thu May 09, 2019 6:36 pm
  • Real Name: Pablo Enrique Llorach

Re: Decklink Quad Playback on Ubuntu Server

PostMon May 13, 2019 2:55 pm

Jonas Holthusen wrote:e full output below


Jonas Holthusen, can you share with us how do you compile the FFMPEG to work with the Decklink SDI?

i have the same problem as you.

Thanks in advance.
Offline

catalan63

  • Posts: 5
  • Joined: Thu May 09, 2019 6:36 pm
  • Real Name: Pablo Enrique Llorach

Re: Decklink Quad Playback on Ubuntu Server

PostMon May 13, 2019 5:13 pm

Jonas Holthusen wrote:Thank you Cameron Nichols for trying to solve our problem.
We have fixed the problem by starting with working with a graphical interface and try to playback a video with MediaExpress. There we find out, that we can only give the card videos that are in the right format. So we tried again, but that didnt either helped. So we looked up the directory of the SDK and noticed that it was displaced. After that we compiled ffmpeg again and try to playback a videofile in the right format with the same command like before and it worked. Now we can continue with our work. Thanks a lot for your help.
Kind regards Jonas


Hi Jonas, how are you?

Can you share with us how do you compile the ffmpeg to work with the Declink SDI and what was the supported codec and formats?

Thanks in advance.

Return to Software Developers

Who is online

Users browsing this forum: RichardDeC and 16 guests