-
Notifications
You must be signed in to change notification settings - Fork 531
Multiple Devices
mxa edited this page May 31, 2020
·
3 revisions
In the case you need multiple loopback connections of producer and consumer pairs you need multiple loopback devices. Let's look at an example:
You want to stream the preview from a DLSR camera as an input for OBS (as described in gPhoto2) and at the same time stream the output of OBS as a virtual camera to be accessible in a videoconferencing solution (as described in OBS Studio).
First load the v4l2loopback kernel module and create two devices like this:
sudo modprobe v4l2loopback devices=2 video_nr=10,9 card_label="OBS Output","Canon 5D" exclusive_caps=1
now you will have two devices: video10
with the name "OBS Output" and video9
with the name "Canon 5D".
Then start the capturing of the DSLR with the gPhoto command piping it into video9
via v4l2sink
:
gphoto2 --stdout --capture-movie | gst-launch-1.0 fdsrc fd=0 ! decodebin name=dec ! queue ! videoconvert ! tee ! v4l2sink device=/dev/video9
In the videoconferencing solution choose the video input "OBS Output"