Page 1 of 1

Two Decklinks and ffmpeg

PostPosted: Tue Apr 09, 2019 9:04 pm
by Roman Pytkin Pekarek
Hello !

Im making 16 channel transcoder with two Decklink QUAD 2.. I was installed last CENTOS , installed drivers for Decklink , compilled ffmpeg with decklink support .. Everything works except :
When I list output devices with
Code: Select all
ffmpeg -i test.avi -f decklink -list_devices 1 dummy

I get :
Code: Select all
[decklink @ 0x2b70f00] Blackmagic DeckLink output devices:
[decklink @ 0x2b70f00]    'DeckLink Quad (1)'
[decklink @ 0x2b70f00]    'DeckLink Quad (2)'
[decklink @ 0x2b70f00]    'DeckLink Quad (3)'
[decklink @ 0x2b70f00]    'DeckLink Quad (4)'
[decklink @ 0x2b70f00]    'DeckLink Quad (5)'
[decklink @ 0x2b70f00]    'DeckLink Quad (6)'
[decklink @ 0x2b70f00]    'DeckLink Quad (7)'
[decklink @ 0x2b70f00]    'DeckLink Quad (8)'
[decklink @ 0x2b70f00]    'DeckLink Quad (1)'
[decklink @ 0x2b70f00]    'DeckLink Quad (2)'
[decklink @ 0x2b70f00]    'DeckLink Quad (3)'
[decklink @ 0x2b70f00]    'DeckLink Quad (4)'
[decklink @ 0x2b70f00]    'DeckLink Quad (5)'
[decklink @ 0x2b70f00]    'DeckLink Quad (6)'
[decklink @ 0x2b70f00]    'DeckLink Quad (7)'
[decklink @ 0x2b70f00]    'DeckLink Quad (8)'

Both card have same ports , so I cannot select whitch card im sending .. Can I set any alias in system ?
both card have different IDS:
Code: Select all
# lspci | grep Bla
0d:00.0 Multimedia video controller: Blackmagic Design DeckLink Quad 2
0e:00.0 Multimedia video controller: Blackmagic Design DeckLink Quad 2
12:00.0 Multimedia video controller: Blackmagic Design DeckLink Quad 2
13:00.0 Multimedia video controller: Blackmagic Design DeckLink Quad 2

Code: Select all
# dmesg|grep Bla
[    6.165459] BlackmagicIO: Driver version 11.1a11 loading
[    6.169693] BlackmagicIO: Enabled device "DeckLink Quad 2 (1)" x4/5 Gbps (11ceff40,500d00) FW Date: 06-12 10:35
[    6.171383] BlackmagicIO: DeckLink Quad 2 (1) as blackmagic!io0 [0000:0d:00.0]
[    6.171388] BlackmagicIO: Initialised serial driver for blackmagic!io0
[    6.172361] BlackmagicIO: Enabled device "DeckLink Quad 2 (5)" x4/5 Gbps (11ceff44,500d01) FW Date: 06-12 10:35
[    6.174426] BlackmagicIO: DeckLink Quad 2 (5) as blackmagic!io1 [0000:0d:00.0]
[    6.174431] BlackmagicIO: Initialised serial driver for blackmagic!io1
[    6.175531] BlackmagicIO: Enabled device "DeckLink Quad 2 (2)" x4/5 Gbps (11ceff41,500d02) FW Date: 06-12 10:35
[    6.177353] BlackmagicIO: DeckLink Quad 2 (2) as blackmagic!io2 [0000:0d:00.0]
[    6.177357] BlackmagicIO: Initialised serial driver for blackmagic!io2
[    6.180118] BlackmagicIO: Enabled device "DeckLink Quad 2 (6)" x4/5 Gbps (11ceff45,500d03) FW Date: 06-12 10:35
[    6.181847] BlackmagicIO: DeckLink Quad 2 (6) as blackmagic!io3 [0000:0d:00.0]
[    6.181852] BlackmagicIO: Initialised serial driver for blackmagic!io3
[    6.183576] BlackmagicIO: Enabled device "DeckLink Quad 2 (3)" x4/5 Gbps (11ceff42,500e00) FW Date: 06-12 10:35
[    6.185403] BlackmagicIO: DeckLink Quad 2 (3) as blackmagic!io4 [0000:0e:00.0]
[    6.185408] BlackmagicIO: Initialised serial driver for blackmagic!io4
[    6.185643] BlackmagicIO: Enabled device "DeckLink Quad 2 (7)" x4/5 Gbps (11ceff46,500e01) FW Date: 06-12 10:35
[    6.187526] BlackmagicIO: DeckLink Quad 2 (7) as blackmagic!io5 [0000:0e:00.0]
[    6.187531] BlackmagicIO: Initialised serial driver for blackmagic!io5
[    6.188493] BlackmagicIO: Enabled device "DeckLink Quad 2 (4)" x4/5 Gbps (11ceff43,500e02) FW Date: 06-12 10:35
[    6.190290] BlackmagicIO: DeckLink Quad 2 (4) as blackmagic!io6 [0000:0e:00.0]
[    6.190294] BlackmagicIO: Initialised serial driver for blackmagic!io6
[    6.191865] BlackmagicIO: Enabled device "DeckLink Quad 2 (8)" x4/5 Gbps (11ceff47,500e03) FW Date: 06-12 10:35
[    6.193660] BlackmagicIO: DeckLink Quad 2 (8) as blackmagic!io7 [0000:0e:00.0]
[    6.193666] BlackmagicIO: Initialised serial driver for blackmagic!io7
[    6.195623] BlackmagicIO: Enabled device "DeckLink Quad 2 (1)" x4/5 Gbps (b540ac40,501200) FW Date: 06-12 10:35
[    6.197336] BlackmagicIO: DeckLink Quad 2 (1) as blackmagic!io8 [0000:12:00.0]
[    6.197341] BlackmagicIO: Initialised serial driver for blackmagic!io8
[    6.199648] BlackmagicIO: Enabled device "DeckLink Quad 2 (5)" x4/5 Gbps (b540ac44,501201) FW Date: 06-12 10:35
[    6.201533] BlackmagicIO: DeckLink Quad 2 (5) as blackmagic!io9 [0000:12:00.0]
[    6.201539] BlackmagicIO: Initialised serial driver for blackmagic!io9
[    6.201740] BlackmagicIO: Enabled device "DeckLink Quad 2 (2)" x4/5 Gbps (b540ac41,501202) FW Date: 06-12 10:35
[    6.203506] BlackmagicIO: DeckLink Quad 2 (2) as blackmagic!io10 [0000:12:00.0]
[    6.203512] BlackmagicIO: Initialised serial driver for blackmagic!io10
[    6.206067] BlackmagicIO: Enabled device "DeckLink Quad 2 (6)" x4/5 Gbps (b540ac45,501203) FW Date: 06-12 10:35
[    6.207928] BlackmagicIO: DeckLink Quad 2 (6) as blackmagic!io11 [0000:12:00.0]
[    6.207934] BlackmagicIO: Initialised serial driver for blackmagic!io11
[    6.213219] BlackmagicIO: Enabled device "DeckLink Quad 2 (3)" x4/5 Gbps (b540ac42,501300) FW Date: 06-12 10:35
[    6.215364] BlackmagicIO: DeckLink Quad 2 (3) as blackmagic!io12 [0000:13:00.0]
[    6.215369] BlackmagicIO: Initialised serial driver for blackmagic!io12
[    6.217017] BlackmagicIO: Enabled device "DeckLink Quad 2 (7)" x4/5 Gbps (b540ac46,501301) FW Date: 06-12 10:35
[    6.218659] BlackmagicIO: DeckLink Quad 2 (7) as blackmagic!io13 [0000:13:00.0]
[    6.218663] BlackmagicIO: Initialised serial driver for blackmagic!io13
[    6.219680] BlackmagicIO: Enabled device "DeckLink Quad 2 (4)" x4/5 Gbps (b540ac43,501302) FW Date: 06-12 10:35
[    6.221435] BlackmagicIO: DeckLink Quad 2 (4) as blackmagic!io14 [0000:13:00.0]
[    6.221440] BlackmagicIO: Initialised serial driver for blackmagic!io14
[    6.221666] BlackmagicIO: Enabled device "DeckLink Quad 2 (8)" x4/5 Gbps (b540ac47,501303) FW Date: 06-12 10:35
[    6.223346] BlackmagicIO: DeckLink Quad 2 (8) as blackmagic!io15 [0000:13:00.0]
[    6.223351] BlackmagicIO: Initialised serial driver for blackmagic!io15

Re: Two Decklinks and ffmpeg

PostPosted: Wed Apr 10, 2019 6:29 am
by Ian Morrish
You can rename the logical devices in Desktop Video utility.

Sent from my SM-G960F using Tapatalk

Re: Two Decklinks and ffmpeg

PostPosted: Wed Apr 10, 2019 9:47 am
by Roman Pytkin Pekarek
I was looked to it yesterday and i was not found it .. I will try again :)

Re: Two Decklinks and ffmpeg

PostPosted: Wed Apr 10, 2019 9:55 am
by Roman Pytkin Pekarek
Yep ! There is field LABEL in tab ABOUT .. And it works !

Thanx ALOT ..

Re: Two Decklinks and ffmpeg

PostPosted: Fri Apr 12, 2019 6:53 pm
by colekas
Don't want to hijack the thread, but when I try to set this programmatically via bmdDeckLinkConfigDeviceInformationLabel it doesn't seem to stick... I'm basically running the DeviceConfigure sample application and using the -n.

I get no complaints about permissions. Any other ideas?

Re: Two Decklinks and ffmpeg

PostPosted: Sat Apr 13, 2019 1:57 am
by Ian Morrish
To make it persist, look at IDeckLinkConfiguration::WriteConfigurationToPreferences method.

I do this in C# with

public void WriteConfigurationToPreferences()
{
IDeckLinkConfiguration deckLinkConfiguration;
deckLinkConfiguration = (IDeckLinkConfiguration)Card;
deckLinkConfiguration.WriteConfigurationToPreferences();
}

Re: Two Decklinks and ffmpeg

PostPosted: Tue Apr 16, 2019 2:21 am
by colekas
Ian Morrish wrote:To make it persist, look at IDeckLinkConfiguration::WriteConfigurationToPreferences method.

I do this in C# with

public void WriteConfigurationToPreferences()
{
IDeckLinkConfiguration deckLinkConfiguration;
deckLinkConfiguration = (IDeckLinkConfiguration)Card;
deckLinkConfiguration.WriteConfigurationToPreferences();
}


Something that I figured out is that WriteConfigurationToPreferences will work *ONLY* if DesktopVideoHelper service is running

Code: Select all
[root@ssimwave ~]# systemctl status DesktopVideoHelper
● DesktopVideoHelper.service - DesktopVideo helper daemon
   Loaded: loaded (/usr/lib/systemd/system/DesktopVideoHelper.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-04-16 01:49:33 UTC; 31min ago
 Main PID: 800 (DesktopVideoHel)
   CGroup: /system.slice/DesktopVideoHelper.service
           └─800 /usr/lib64/blackmagic/DesktopVideo/DesktopVideoHelper -n

Apr 16 01:49:33 ssimwave.dutch systemd[1]: Started DesktopVideo helper daemon.
Apr 16 01:49:33 ssimwave.dutch systemd[1]: Starting DesktopVideo helper daemon...
Apr 16 01:49:33 ssimwave.dutch DesktopVideoHelper[800]: Start
Apr 16 01:49:33 ssimwave.dutch DesktopVideoHelper[800]: Listening for DesktopVideo settings changes