Giter Site home page Giter Site logo

hadware / gstreamer-python-player Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 7.0 8 KB

Minimalist examples of audio players in python, using the new Gstreamer 1.0 API

License: MIT License

Python 100.00%
audio example gst gstreamer gtk3 pad player python3 slide

gstreamer-python-player's People

Contributors

hadware avatar jamesaxl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gstreamer-python-player's Issues

Error from python.py Gst.Pipeline

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")

Doesn't play anything for me in python 3

  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")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.