tags:

views:

55

answers:

2

hi

How can I convert a .wav file to some other format such as .mp3 in pygame?

Update: Why not Gstreamer or Pygame: I want to use native Windows environment to install a package that can do this (i.e. don't want to install cygwin). I am searching for a package which has a binary installer available for windows (with Python 2.6) or atleast where I can do "python setup.py install" without a need to install any dependencies.

A: 

Pygame is an SDL wrapper. Not a multimedia framework. Why do you want to do audio format conversions in Pygame? Can't you use something else like maybe the gstreamer bindings for Python?

Noufal Ibrahim
I am on windows and building gstreamer or pymedia is not straightforward , unless you have a cygwin like environment (I want to use native Windows environment). I am searching for a package which has a binary installer available for windows (with Python 2.6) or atleast a script such as "python setup.py install" that installs it.
cppb
You can't randomly install a package just because it has a binary installer and expect it to do audio format conversions.
Noufal Ibrahim
I asked whether you know if it can be done. A simple answer "no you can't" was enough.
cppb
That's basically what I said in my original answer along with a possible alternative. You comment sounded (atleast to me) like the only criterion for package selection was that it had a distutils based setup.py script and that was how you selected pygame. I can also see that you finally *did* decide to go with gstreamer. That's good.
Noufal Ibrahim
+1  A: 

The answer is you can not do this using PyGame.

I found out GStreamer installer for windows from GStreamer-Winbuild project: http://www.gstreamer-winbuild.ylatuya.es/doku.php So, I will be using Gstreamer framework for audio handling.

cppb