[英]GStreamer video capture using USB web camera on macOS
I'm working on developing gstreamer app on macOS .我正在开发macOS上的gstreamer应用程序。 I succeeded to get video captures of MacBook's inside camera.
我成功地拍摄了MacBook 内部摄像头的视频。
$ gst-launch-1.0 autovideosrc ! osxvideosink
However, I don't know how to get video captures from attached USB camera .但是,我不知道如何从连接的USB 摄像头获取视频捕获。 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
.我查看了
autovideosrc
元素和wrappercamerabinsrc
元素的属性,但找不到合适的属性来指定设备,而我可以将device
属性指定为v4l2src
。
How can I get video stream from USB camera using gstreamer on macOS?如何在 macOS 上使用 gstreamer 从 USB 摄像头获取视频流?
Any help would be appreciated!任何帮助,将不胜感激!
Finally I found how to do it.最后我找到了怎么做。
$ gst-launch-1.0 avfvideosrc device-index=1 ! osxvideosink
Thanks @MarkSetchell谢谢@MarkSetchell
osxvideosink
didn't work for me. osxvideosink
对我不起作用。 I used autovideosink
instead.我
autovideosink
。
gst-launch-1.0 avfvideosrc device-index=1 ! autovideosink
device-index=0
didn't work.device-index=0
不起作用。 My external webcam was device-index=1
, and my built-in laptop webcam was device-index=2
.device-index=1
,而我的内置笔记本电脑网络摄像头是device-index=2
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.