4

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?

Alexander Ushakov
  • 5,139
  • 3
  • 27
  • 50
davidb
  • 1,503
  • 4
  • 30
  • 49

2 Answers2

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

Setting this works for me.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
LXQeui
  • 31
  • 2
  • This certainly changed things for me, too. Setting the GST_PLUGIN_PATH, as described, allowed `gst-device-monitor-1.0` to find some devices on my M1 MacBook Pro. It only found the mic and speakers, however. I installed GStreamer via HomeBrew, so perhaps I need to add some missing plug-ins, etc. edit: Yep... I needed to add `gst-plugins-bad` now I get the desired output, including the FaceTime HD camera. – Stephen Henderson Jul 29 '22 at 18:48
2

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

Alexander Ushakov
  • 5,139
  • 3
  • 27
  • 50
  • 1
    Fair enough. I checked and gstreamer indeed could access the camera and stream footage. I accept your answer. Thanks a lot for pointing this out. – davidb Apr 04 '22 at 00:22