Pavan K
Pavan K

Reputation: 4683

gstreamer create virtual device on OSX

I would like to create a virtual camera device using gstreamer on OSX

I am able to create it on *nix systems using

 gst-launch-1.0 -v videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! v4l2sink device=/dev/video1

On osx I get a erroneous pipeline v4l2

I would like to be able to pipe the output into applications such as skype etc.,

Any pointers in this direction ? Should I use syphon?

Upvotes: 6

Views: 5265

Answers (2)

Pavan K
Pavan K

Reputation: 4683

The way to go is to use CoreMediaIO framework. You can create a virtual device using the framework and feed in any stream using a wrapper. Some pointers for wrappers can be seen here.

Upvotes: 3

Markw63
Markw63

Reputation: 71

This gstreamer command:

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

Works on OSX Sierra if you install Gstreamer on OSX from the following packages which will install in the /Library/Frameworks/Gstreamer.framework/ folder. Execute commands from the Commands subfolder.

https://gstreamer.freedesktop.org/data/pkg/osx/1.12.0/

This link has a standard package, a development package and a dmg with lots of smaller distribution packages. To pipe output you will need to choose an appropriate sink - either appsink, and write it yourself, or one of the many other sink types in Gstreamer. Hope that gets you started!

Upvotes: 2

Related Questions