hadware / gstreamer-python-player Goto Github PK
View Code? Open in Web Editor NEWMinimalist examples of audio players in python, using the new Gstreamer 1.0 API
License: MIT License
Minimalist examples of audio players in python, using the new Gstreamer 1.0 API
License: MIT License
I tried running python player.py
in python 2.7.9 with GStreamer Core Library version 1.4.4
I got the error:
File "player.py", line 14, in __init__ self.pipeline = Gst.Pipeline("mypipeline") TypeError: GObject.__init__() takes exactly 0 arguments (1 given)
I fixed it by changing line 14 to:
self.pipeline = Gst.Pipeline.new("mypipeline")
from gi.repository import Gst, Gtk, GLib
/home/hasan/PycharmProjects/audioplayer/backup/seek_test.py:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gst, Gtk, GLib
Traceback (most recent call last):
File "/home/hasan/PycharmProjects/audioplayer/backup/seek_test.py", line 78, in update_slider
raise GenericException("Couldn't fetch song duration")
__main__.GenericException: Couldn't fetch song duration
Traceback (most recent call last):
File "/home/hasan/PycharmProjects/audioplayer/backup/seek_test.py", line 78, in update_slider
raise GenericException("Couldn't fetch song duration")
__main__.GenericException: Couldn't fetch song duration
The only parts i edited was these
Gst.init("")
# setting up the playbin elements
self.playbin = Gst.ElementFactory.make("playbin", "playbin")
self.playbin.set_property("uri", "file:///1cut.mp3")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.