When I run the Hello World tutorial for the Gstreamers python API I get the following error:
GST_DEBUG=3 python tutorial_1.py
0:00:01.787091000 98337 0x7fde78071920 ERROR gldisplay gstgldisplay_cocoa.m:171:gst_gl_display_cocoa_setup_nsapp: Custom NSApp initialization failed
0:00:01.787178000 98337 0x7fde78071920 ERROR glutils gstglutils.c:229:gst_gl_element_propagate_display_context:<sink> Could not get GL display connection
0:00:01.788032000 98337 0x7fde78071920 WARN playbin gstplaybin2.c:4757:autoplug_select_cb:<playbin0> Could not activate sink glimagesink
0:00:01.792032000 98337 0x7fde78071920 FIXME videodecoder gstvideodecoder.c:1052:gst_video_decoder_drain_out:<vp8dec0> Sub-class should implement drain()
0:00:01.859639000 98337 0x7fde78071980 FIXME videodecoder gstvideodecoder.c:1052:gst_video_decoder_drain_out:<vp8dec0> Sub-class should implement drain()
zsh: illegal hardware instruction GST_DEBUG=3 python tutorial_1.py
But when I run a Gstreamer command in terminal that serves essentially the same purpose the window opens correctly with no issues:
gst-launch-1.0 -v playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
Looking for a solution or a push in right direction to resolve this.
Environment:
- Hardware:
- Model Name: MacBook Pro
- Model Identifier: MacBookPro13,3
- Processor Name: Quad-Core Intel Core i7
- Processor Speed: 2,7 GHz
- OS:
- System Version: macOS 11.6 (20G165)
- Kernel Version: Darwin 20.6.0
- GStreamer 1.18.4
- pygobject 3.42.0
- python 3.9.7
Code from the tutorial:
#!/usr/bin/env python3
import sys
import gi
gi.require_version('GLib', '2.0')
gi.require_version('GObject', '2.0')
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GObject, GLib
pipeline = None
bus = None
message = None
# initialize GStreamer
Gst.init(sys.argv[1:])
# build the pipeline
pipeline = Gst.parse_launch(
"playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"
)
# start playing
pipeline.set_state(Gst.State.PLAYING)
# wait until EOS or error
bus = pipeline.get_bus()
msg = bus.timed_pop_filtered(
Gst.CLOCK_TIME_NONE,
Gst.MessageType.ERROR | Gst.MessageType.EOS
)
# free resources
pipeline.set_state(Gst.State.NULL)