homebrew-core
                                
                                 homebrew-core copied to clipboard
                                
                                    homebrew-core copied to clipboard
                            
                            
                            
                        Gstreamer not working on M1 Max Macbook
brew config output
1) MacBook Pro (14-inch, 2021) - Chip M1 Max
2) Installed gstreamer with this command: brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server gst-editing-services gst-devtools
3) Upon launching any gstreamer pipeline (already tried reinstalling, rebooting etc. etc.)
e.g.
gst-launch-1.0 videotestsrc ! fakesink
I get this error.
(gst-plugin-scanner:1245): GLib-GObject-WARNING **: 06:45:13.387: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.388: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.388: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:1245): GLib-GObject-WARNING **: 06:45:13.404: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.404: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.404: g_type_set_qdata: assertion 'node != NULL' failed
brew doctor output
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
  /usr/local/include/python3.9/greenlet/greenlet.h
Verification
- [X] I ran brew updateand am still able to reproduce my issue.
- [X] I have resolved all warnings from brew doctorand that did not fix my problem.
What were you trying to do (and why)?
Trying to Run gstreamer on Mac M1 Max
gst-launch-1.0 videotestsrc ! fakesink
What happened (include all command output)?
Application does NOT work
(gst-plugin-scanner:1245): GLib-GObject-WARNING **: 06:45:13.387: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.388: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.388: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:1245): GLib-GObject-WARNING **: 06:45:13.404: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.404: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:1245): GLib-GObject-CRITICAL **: 06:45:13.404: g_type_set_qdata: assertion 'node != NULL' failed
What did you expect to happen?
Expected it to work
Step-by-step reproduction instructions (by running brew commands)
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server gst-editing-services gst-devtools
Where is the output of brew config?
HOMEBREW_VERSION: 3.5.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: c5731faf8be1ddc1eeae4b162b88bd76318fc279
Last commit: 8 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 084c9bf8ef4a7d34a09edaaf3ceeed6a8e03c28e
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.32.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.5.1-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4.1
Rosetta 2: false
What made you think Homebrew's code has an issue rather than the gstreamer project itself?
- The gstreamer standalone (non-Homebrew) does work
- The gstreamer Homebrew build does not work
https://gstreamer.freedesktop.org/documentation/installing/on-mac-osx.html?gi-language=c
Judging by the macOS versions referenced on that page that pkg is for a x86 version of gstreamer and it works only in Rosetta.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1358 indicates that gstreamer doesn't work on M1 macs
Thanks for your prompt response!
The gstreamer build from the gstreamer site work. The "kind" shows up as "Apple" and not "Rosetta" indicating that it is in fact the M1 version.
Appreciate any pointers. Perhaps there may be some weird issue in an upstream dependency in the Homebrew builds (I don't know the internals)?
Below screenshots are from the "official" Gstreamer build. I would much prefer to use the Home-brew version, if possible, though.


The non-Homebrew version distributed by upstream (both runtime and development) seem to contain all fat libraries with both x86_64 and arm64 slices. I guess the GitLab issue linked above is outdated.
FYI, this looks M1-specific; works fine on my Intel machine:

When I tried commands on M1, after the GLib-GObject-WARNING/etc messages, the commands worked (below with fakesink and also tried autovideosink with no issue).
❯ gst-launch-1.0 videotestsrc ! fakesink
(gst-plugin-scanner:23613): GLib-GObject-WARNING **: 14:53:06.125: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:23613): GLib-GObject-CRITICAL **: 14:53:06.126: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:23613): GLib-GObject-CRITICAL **: 14:53:06.126: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:23613): GLib-GObject-WARNING **: 14:53:06.142: type name '-a-png-encoder-pred' contains invalid characters
(gst-plugin-scanner:23613): GLib-GObject-CRITICAL **: 14:53:06.142: g_type_set_qdata: assertion 'node != NULL' failed
(gst-plugin-scanner:23613): GLib-GObject-CRITICAL **: 14:53:06.142: g_type_set_qdata: assertion 'node != NULL' failed
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
0:28:21.9 / 99:99:99.
As far as I can tell, the logged warnings didn't impact particular functionality.
Anyway, it could be an upstream issue in gst-libav with FFmpeg 5 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1055
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.