python3-gst
This module contains a wrapper that allows GStreamer applications to be
written in Python.
If you want to use multimedia in your python app on a Sailfish device, you'll need this module.
And if you want to use qml in a noarch app and miss some gstreamer options in Qt Multimedia, you'll need this module too (e.g. Equalizer or Set speed/pitch on audio/raw streams).
python-gstreamer ( Python3.8 --- gstreamer1.0 )
provides: libgstpython.so
using in your .py code file:
import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GLib, GObject
sha256sum filename:
ddc0b5efb99a67c7eab1342ee0aed65dd259ee64888c7c2ab60dbcbe9c8b5a5d gstreamer1.0-plugins-python-1.20.5-2.aarch64.rpm
369dbf632fdcbb2b0585abfbd970c467b2f074d6b870eca997062c4de9628e43 python-gst-1.20.5-2.aarch64.rpm
588a20456bf0d366d1ca8589e66e97295f5588afb3d71d42c1743f11618ef30f gstreamer1.0-plugins-python-1.22.5-2.armv7hl.rpm
7ed000adbd4cefce91599c3d6412210b5bfadf2f234529446838d80f60968f1c python-gst-1.22.5-2.armv7hl.rpm
Category:
Attachment | Size | Date |
---|---|---|
gstreamer1.0-plugins-python-1.18.5-3.aarch64.rpm | 35.23 KB | 21/08/2022 - 16:28 |
gstreamer1.0-plugins-python-1.20.3-3.armv7hl.rpm | 13.78 KB | 30/07/2022 - 23:09 |
gstreamer1.0-plugins-python-1.20.4-2.armv7hl.rpm | 13.79 KB | 16/10/2022 - 18:16 |
gstreamer1.0-plugins-python-1.20.5-2.aarch64.rpm | 13.33 KB | 14/02/2023 - 03:36 |
gstreamer1.0-plugins-python-1.22.0-2.armv7hl.rpm | 13.79 KB | 29/01/2023 - 18:10 |
gstreamer1.0-plugins-python-1.22.5-2.armv7hl.rpm | 13.78 KB | 27/08/2023 - 16:44 |
python-gst-1.18.5-3.aarch64.rpm | 111.57 KB | 21/08/2022 - 16:28 |
python-gst-1.20.3-3.armv7hl.rpm | 74.18 KB | 31/07/2022 - 13:18 |
python-gst-1.20.4-2.armv7hl.rpm | 77.37 KB | 16/10/2022 - 18:16 |
python-gst-1.20.5-2.aarch64.rpm | 79.7 KB | 14/02/2023 - 03:36 |
python-gst-1.22.0-2.armv7hl.rpm | 58.49 KB | 29/01/2023 - 18:10 |
python-gst-1.22.5-2.armv7hl.rpm | 67.99 KB | 27/08/2023 - 16:44 |
helloworld.py example:
#!/usr/bin/env python
import sys
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst, GLib
def bus_call(bus, message, loop):
t = message.type
if t == Gst.MessageType.EOS:
sys.stdout.write("End-of-stream\n")
loop.quit()
elif t == Gst.MessageType.ERROR:
err, debug = message.parse_error()
sys.stderr.write("Error: %s: %s\n" % (err, debug))
loop.quit()
return True
def main(args):
if len(args) != 2:
sys.stderr.write("usage: %s <media file or uri>\n" % args[0])
sys.exit(1)
Gst.init(None)
playbin = Gst.ElementFactory.make("playbin", None)
if not playbin:
sys.stderr.write("'playbin' gstreamer plugin missing\n")
sys.exit(1)
# take the commandline argument and ensure that it is a uri
if Gst.uri_is_valid(args[1]):
uri = args[1]
else:
uri = Gst.filename_to_uri(args[1])
playbin.set_property('uri', uri)
# create and event loop and feed gstreamer bus mesages to it
loop = GLib.MainLoop()
bus = playbin.get_bus()
bus.add_signal_watch()
bus.connect ("message", bus_call, loop)
# Create element to add (echo)/equalizer-10bands to the signal
gecho = Gst.ElementFactory.make('audioecho')
gecho.set_property('delay', 500000000)
gecho.set_property('intensity', 0.6)
gecho.set_property('feedback', 0.4)
gequa = Gst.ElementFactory.make('equalizer-10bands')
gequa.set_property('band2', 3.0)
# Create playbin and add the custom audio sink to it
playbin.set_property('audio_filter', gequa)
#playbin.set_property('audio_filter', gecho)
# start play back and listed to events
playbin.set_state(Gst.State.PLAYING)
try:
loop.run()
except:
pass
# cleanup
playbin.set_state(Gst.State.NULL)
if __name__ == '__main__':
sys.exit(main(sys.argv))
Laatste reacties