toshiya
toshiya

Reputation: 333

GStreamer video capture using USB web camera on macOS

I'm working on developing gstreamer app on macOS. I succeeded to get video captures of MacBook's inside camera.

$ gst-launch-1.0 autovideosrc ! osxvideosink

However, I don't know how to get video captures from attached USB camera. I looked at properties of autovideosrc element and wrappercamerabinsrc element, but couldn't find the proper one to specify the devices while I can specify device property to v4l2src.

How can I get video stream from USB camera using gstreamer on macOS?

Any help would be appreciated!

Upvotes: 5

Views: 3558

Answers (2)

Ben Butterworth
Ben Butterworth

Reputation: 28532

osxvideosink didn't work for me. I used autovideosink instead.

gst-launch-1.0 avfvideosrc device-index=1 ! autovideosink
  • Also, I found device-index=0 didn't work. My external webcam was device-index=1, and my built-in laptop webcam was device-index=2.

Upvotes: 0

toshiya
toshiya

Reputation: 333

Finally I found how to do it.

$ gst-launch-1.0 avfvideosrc device-index=1 ! osxvideosink

Thanks @MarkSetchell

Upvotes: 3

Related Questions