Support for blackmagic cards in camera interface

We recently had an issue filed against the OBS snap because the users’ video capture card was not recognised by the confined application, but on the same system, the deb of OBS works fine.

It looks like the capture device, made by Black Magic, has a kernel driver which presents the device under /dev/blackmagic, specifically /dev/blackmagic/io0for their card.

My capture cards show up under /dev/video* so are covered by the camera interface. What’s the right course of action here? Should we add a section to the camera interface for these manufacturer specific device nodes, or should they get a new interface.

Note: We’re not dealing with Black Magic themselves, but a customer using one of their cards. I don’t know what other nodes are used by Black Magic devices, but we could likely do the necessary research to find out, to cover all necessary bases.

1 Like

When a user sets up their system to support the black magic card, I assume they need to install some drivers to support the device getting added as /dev/blackmagic, correct? The simplest way from my standpoint would probably to have udev rules included in this driver installation which adds a symlink for /dev/video* to /dev/blackmagic/* which would then work from the standard camera interface in snapd.

That said it’s not out of the question to have a device specific interface in snapd for this.

Piping reply from github…

Creating a symlink from e.g. /dev/video99 to /dev/blackmagic/io0 did not work - or I did something wrong. However, I couldn’t find the device as a video capture device (or any other device, also tried media device and even screen capture). Sorry if that’s crappy bug reporting, but I am totally new to the world of video on Linux and just guessing it might be about missing V4L2 compliance or something? Hope that’s not complete nonsense :slight_smile:

I think a simple blackmagic interface, or an extension to the camera interface would be appropriate.

1 Like

indeed that can not work because apparmor will notice you followed a symlink to access /dev/videoXXX, /dev/blackmagic would have to be allowed as well …

1 Like

I +1 for the blackmagic interface, can’t test it though as I don’t have the related products…

I’ve submitted this pull request which expands camera/capture device support, including the addition of Blackmagic devices.

was trying this and i can select the decklink capture card as the source but its just black screen. is this not allowed? anyway to use the capture card and a digital camera as a webcam source for skype or zoom? other software like OBS and black magic software works fine for recording. TIA. UPSers