Gstreamer 在 Mac 上找不到内部摄像头

发布于 2025-01-16 23:51:09 字数 746 浏览 7 评论 0原文

我已经通过自制程序在我的 mac 上安装了 Gstreamer。我想流式传输 Mac 内部摄像头的镜头,但是当我跑步时 gst-device-monitor-1.0 我不断收到探测设备...无法启动设备监视器!

我还尝试使用 GST_DEBUG=2< 运行相同的命令/code> 然后我得到

WARN devicemonitor gstdevicemonitor.c:501:gst_device_monitor_start:<devicemonitor0> No filters have been set, will expose all devices found
0:00:00.002759000 24294 0x7ffc5151c190 WARN devicemonitor gstdevicemonitor.c:507:gst_device_monitor_start:<devicemonitor0> No providers match the current filters

The version I'm running 是

gst-device-monitor-1.0 version 1.20.0
GStreamer 1.20.0

How do I get this to work?我检查了 mac 设置,没有看到任何阻止此操作的内容。如何让 gstreamer 看到我的 Mac 内置摄像头?

I have installed Gstreamer via homebrew on my mac. I want to stream the mac's internal camera's footage, however when I run
gst-device-monitor-1.0 I keep getting Probing devices... Failed to start device monitor!

I also tried running the same command with GST_DEBUG=2 and then I get

WARN devicemonitor gstdevicemonitor.c:501:gst_device_monitor_start:<devicemonitor0> No filters have been set, will expose all devices found
0:00:00.002759000 24294 0x7ffc5151c190 WARN devicemonitor gstdevicemonitor.c:507:gst_device_monitor_start:<devicemonitor0> No providers match the current filters

The version I'm running is

gst-device-monitor-1.0 version 1.20.0
GStreamer 1.20.0

How do I get this to work? I have checked the mac settings and I don't see anything that'd block this. How do I make gstreamer see my mac's internal camera?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鲸落 2025-01-23 23:51:09
export GST_PLUGIN_PATH=/opt/homebrew/lib/gstreamer-1.0/

设置这个对我有用。

export GST_PLUGIN_PATH=/opt/homebrew/lib/gstreamer-1.0/

Setting this works for me.

挽手叙旧 2025-01-23 23:51:09

我在 Mac(M1、macOS Monterey)上也遇到同样的问题。这是 gst-device-monitor-1.0 的问题。根据其 源代码< /a> 找不到任何相应的设备提供商:

  if (monitor->priv->filters->len == 0) {
    GST_WARNING_OBJECT (monitor, "No filters have been set, will expose all "
        "devices found");
    gst_device_monitor_add_filter_unlocked (monitor, NULL, NULL);
  }

  if (monitor->priv->providers->len == 0) {
    GST_OBJECT_UNLOCK (monitor);
    GST_WARNING_OBJECT (monitor, "No providers match the current filters");
    return FALSE;
  }

该问题在一年前出现,至今尚未解决:
https://gitlab.freedesktop.org/gstreamer/gst-插件库/-/issues/780
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/ 667

还是gstreamer本身可以在macOS上访问视频(包括mac的内部摄像头)和音频源。

视频:

gst-launch-1.0 avfvideosrc device-index=0 ! video/x-raw, framerate=30/1, width=1280, height=720 ! queue ! autovideosink

音频:

gst-launch-1.0 -v osxaudiosrc device=0 ! audio/x-raw ! queue ! autoaudiosink

注意:avfvideosrcgst-plugins-bad 的一部分,osxaudiosrc - gst-plugins-good< 的一部分/代码>

I have the same problem on my Mac (M1, macOS Monterey). It is issue of gst-device-monitor-1.0. According to its source code it cannot find any corresponding device providers:

  if (monitor->priv->filters->len == 0) {
    GST_WARNING_OBJECT (monitor, "No filters have been set, will expose all "
        "devices found");
    gst_device_monitor_add_filter_unlocked (monitor, NULL, NULL);
  }

  if (monitor->priv->providers->len == 0) {
    GST_OBJECT_UNLOCK (monitor);
    GST_WARNING_OBJECT (monitor, "No providers match the current filters");
    return FALSE;
  }

The problem appeared a year ago and has not yet been resolved:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/780
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/667

Still gstreamer itself can access video (including mac's internal camera) and audio sources on macOS just fine.

Video:

gst-launch-1.0 avfvideosrc device-index=0 ! video/x-raw, framerate=30/1, width=1280, height=720 ! queue ! autovideosink

Audio:

gst-launch-1.0 -v osxaudiosrc device=0 ! audio/x-raw ! queue ! autoaudiosink

Note: avfvideosrc is part of gst-plugins-bad, osxaudiosrc - part of gst-plugins-good

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文