GStreamer is a video streaming framework. When it is first used after installation, an error will be reported when using the Hello World routine in the official doc, as follows:
ImportError: cannot import name GstRtspServer, introspection typelib not found
```python
#!/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)
“209151;”
sudo apt-get install gir1.2-gst-rtsp-server-1.0
Read More:
- A method to solve the error – 110 whilst initializing SD card of raspberry pie
- Raspberry pie upgrade to Python 3.7.3
- ImportError: DLL load failed while importing xxx: The specified program could not be found.
- Finally solved the importError: DLLload failed: the specified module could not be found when import matplotlib.pyplot
- How to login raspberry pie
- Raspberry pie set up to run Python program automatically
- Error: Command ‘arm linux gnueabihf GCC’ failed with exit status 1, raspberry pie install paramiko
- Several ways to check the IP address of raspberry pie
- from ._ NNLS import NNLS importerror: DLL load failed: the specified module was not found.
- Python’s importerror: DLL load failed: the specified module was not found and the problem was solved
- Solution of apt unable to update in the docker container of raspberry pie
- Raspberry pie startup self startup opencv program script and error analysis
- Solved! The new version of statsmodels has the problem of importerror: cannot import name ‘factorial’
- Raspberry pie 4B uses adafruit_ Pca9685 report error ioerror: [errno 121] remote I / O error solution
- Raspberry pie view IP address (command ifconfig) and exit Ping
- Problem solving module ‘ tensorflow.compat . V2 ‘has no attribute’ contrib ‘and importerror cannot import name’ auto ‘
- How to solve “import cv2 failed ImportError: DLL load fail: Cannot find the specified module” in Anaconda environment
- Solve the problem that the Raspberry Pi cannot start (dependency failed for Local File Systems)
- After tensorflow installation, an error occurred while importing: importerror: DLL load failed: the specified module could not be found
- Duplicate class com.xxx.xxx Find in modules problem solving (Aidl interdependence problem)