开发者

I'm looking for a cross-platform Python library that can play MP3 and OGG and support ALSA or similar [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

开发者_C百科

Closed 7 years ago.

Improve this question

There are several different audio libraries, however, none of them meet my exact needs:

- It needs to be cross-platform.

- It needs to be able to use the ALSA, PulseAudio or any other common default mixer under Linux.

- It needs to be able to autodetect the sample frequency.

- It needs to be (fairly) simple in usage, if instead someone can give me an extra script that will MAKE it easier for me that's accepted too.

- The only functionality I need is play/pause, seeking is a nice bonus.

- It needs to be able to play MP3 and OGG. No other formats are important to me.

The libraries I've tried so far:

PyGame - doesn't support detecting the song's frequency

PyAudiere - promising, but only loads OSS in Linux, with which I have serious mixing problems

Built-in modules - don't support MP3 and OGG as far as I'm aware

PyMedia - promising, but complicated. Also couldn't find out what mixing devices it uses.

PySonic - relies on a closed-source library.

PyQt4.phonon - promising, but wouldn't play anything. Got the following error:

gst_element_make_from_uri: assertion `gst_uri_is_valid (uri)' failed

Any help on this would be appreciated.


Use gstreamer.


  • It needs to be cross-platform.
  • It needs to be able to use the ALSA, PulseAudio or any other common default mixer under Linux.

Check - From gstreamer website:

GStreamer has been ported to a wide range of operating systems, processors and compilers. This include but are not limited to Linux on i86,PPC, ARM using GCC. Solaris on x86 and SPARC using both GCC and Forte, MacOSX, Microsoft Windows using MS Visual Developer and IBM OS/400.

GStreamer can bridge to other multimedia frameworks in order to reuse existing components (e.g. codecs) and use platform input/output mechanisms:

  • Linux/Unix: OpenMAX-IL (via gst-openmax)
  • Windows: DirectShow
  • MacOS X: QuickTime

  • It needs to be able to autodetect the sample frequency.

Okay.

  • It needs to be (fairly) simple in usage, if instead someone can give me an extra script that will MAKE it easier for me that's accepted too.

Gstreamer has a lot of documentation and examples, and a strong community to give you support.

  • The only functionality I need is play/pause, seeking is a nice bonus.
  • It needs to be able to play MP3 and OGG. No other formats are important to me.

Then those are overwhelmed!

Go get yours!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜