PDA

View Full Version : How would i play a .mp3 or .ogg from python?



jimi_hendrix
April 5th, 2009, 11:18 PM
well how would i? google returns a couple libs, but i was wondering which you would advise and some tutorial on how to use them

vambo
April 5th, 2009, 11:28 PM
For .ogg have a look at python-pyvorbis - it's in the repo's. The examples section has a prog called ogg123, which is quite instructive. Hope this bit helps. Don't know about mp3's I'm afraid.

jimi_hendrix
April 5th, 2009, 11:28 PM
that works, thanks

cabalas
April 5th, 2009, 11:54 PM
Another option is to look at the python bindings for gstreamer which is also in the repos.

This site has most of the information that you would need.

http://pygstdocs.berlios.de/

imdano
April 5th, 2009, 11:56 PM
Another option is to look at the python bindings for gstreamer which is also in the repos.

This site has most of the information that you would need.

http://pygstdocs.berlios.de/Take a look at Exaile's (http://www.exaile.org) source code if you want a real world example, that's what they use in their backend.

SledgeHammer_999
April 5th, 2009, 11:57 PM
I also suggest gstreamer+python bindings.

kostkon
April 6th, 2009, 12:14 AM
+1 for Gstreamer...

jimi_hendrix
April 6th, 2009, 12:21 AM
Another option is to look at the python bindings for gstreamer which is also in the repos.

This site has most of the information that you would need.

http://pygstdocs.berlios.de/

i tried downloading from svn, i went to make and it got errors and about not connecting to SF

kostkon
April 6th, 2009, 12:31 AM
Why not use the ones from the repos (http://packages.ubuntu.com/search?keywords=python-gst0.10&searchon=names&suite=all&section=all), as already suggested.