简体   繁体   中英

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!

Finally I found how to do it.

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

Thanks @MarkSetchell

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM