obs-studio
obs-studio copied to clipboard
Blackmagic devices not recognized
I am using a Blackmagic Intensity Pro 4K video capture card. It's recognized when I use the PPA version of OBS, but not when using the snap version.
Thanks for the report. Where does it show up on the system? My USB capture card shows up as /dev/video0
(or similar). Does the BM card show up similarly. It's possible we need to extend the camera interface to cover this.
Alternatively it might be there some funky kernel module it talks to?
@popey
The Intensity Pro 4K requires a custom driver, and mounts /dev/blackmagic
for their family of devices and /dev/blackmagic/io0
respectively for the card. The PPA version of OBS then perfectly detects it as Blackmagic Device among possible sources.
As I suspected, this looks like a confinement issue. The camera interface might need extending to cover this class of device. I have started a thread on the snapcraft forum. I'll keep this issue open until we have a resolution there.
Great, thanks a lot! Let me know if there's something that I can help you with.
I followed the discussion on the snapcraft forum, but I refrain a little from creating an account for just one answer. Sorry for misusing you as a relay here.
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 :-)
If you have to spare a minute, I'd love to learn a little more about the difference between debian archives and snap archives and what would lead to the capture card working flawlessly with the former but not with the latter. Is there a particular resource that you would recommend, or should I just look out for "deb vs snap"?
Ok, relayed your comment. Not a problem.
The reason a deb works and the snap (currently doesn't) is pretty simple. debs are unconfined, that is they have full access to the entire filesystem, and can thus (via the usual group/user permissions) see all the necessary nodes in /dev
on Linux. Snaps are confined, using apparmor and cgroups, to prevent applications having access they "shouldn't". So a note taking app can't access the camera, and a browser can't see your ssh keys. The side effect of this is some edge cases such as this require us to do some work on the snapd side to provide access to these features.
Aah, get it. Thanks a lot!
Creating a symlink from e.g. /dev/video99 to /dev/blackmagic/io0 did not work - or I did something wrong.
You did wrong as the AppArmor confinement doesn't acknowledge symlinks, the feasible solution is to wait for the snapd to support snap access to the Blackmagic hardware.
@Lin-Buo-Ren Thanks! Already read that at https://forum.snapcraft.io/t/support-for-blackmagic-cards-in-camera-interface/17337/5
I’ve submitted this pull request which expands camera/capture device support, including the addition of Blackmagic devices.
https://github.com/snapcore/snapd/pull/9734
@flexiondotorg :+1:
question about the above PR for someone who has this hardware, can you run the following:
udevadm info --query property --name /dev/blackmagic/io*
and paste the output in the linked PR?
@anonymouse64 Done
udevadm info --query property --name /dev/blackmagic/io*
I am on a fresh install of Debian 11 release candidate w/ realtime kernel. I have a BlackMagic DeckLink "mini" Recorder. The output of that command is:
e@debian:~$ udevadm info --query property --name /dev/blackmagic/io*
DEVPATH=/devices/pci0000:00/0000:00:01.3/0000:02:00.2/0000:03:04.0/0000:05:00.0/misc/blackmagic!io0
DEVNAME=/dev/blackmagic/io0
DEVMODE=0666
MAJOR=10
MINOR=61
SUBSYSTEM=misc
I've installed the edge version of obs-studio from snap, but unfortunately don't see my blackmagic device in the list of sources.
I should note that I have been able to use blackmagic device on arch linux with obs from arch repos.
I've installed the edge version of obs-studio from snap, but unfortunately don't see my blackmagic device in the list of sources.
The patch hasn't merged at upstream yet: https://github.com/snapcore/snapd/pull/9734
For anyone encountering this issue, users have a couple of options for getting a current OBS Studio version that will work with Blackmagic devices:
- OBS Studio Container - comes with the same plugins as this snap
- OBS Studio Flatpak - vanilla upstream release