How to create video loopback devices on OS X? Is there a Mac equivalent of v4l2loopback

driverstreamingvideo

In Linux, I can use v4l2loopback to create virtual devices and use them as video inputs/outputs. Is there an equivalent toolset for OS X? How does one create multiple streams of videos on MacBook?

Best Answer

Audio Loopback

For audio loopback devices I'm familiar with Soundflower. From the looks of it there appears to be an alternative called Loopback which is a paid-for application.

NOTE: Soundflower is available as a binary build from the Github repo.

Video Loopback

For video loopback devices you have a couple of options. Searching led me to this page on Stackoverflow - gstreamer create virtual device on OSX .

That Q&A mentions that you can use gstreamer which provides a DMG file to use on OSX.

$ ./gst-launch-1.0 -v videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! osxvideosink

There's also another option which mentions the framework CoreMediaIO. As part of that framework is sample code and documentation which covers creating a custom solution to construct a loopback device for video.

References