Suppose you have a big collection of songs in wav file format that you would like to load on a cell phone. But you find out that the cell phone memory card doesn't have enough space to hold all these. What will you do? You will probably try to reduce the size of the song files right? Converting the files into mp3 format will reduce the size. Of course you can do it using some media player. Let's learn how to perform this conversion operation using Python and GStreamer. Later we will develop a simple command-line utility that can be used to perform a batch conversion for all the files you need.
Like in the earlier examples, let's first list the important building blocks we need to accomplish file conversion. The first three elements remain the same.
As before, the first thing we need is to load an audio file for reading.
Next, we need a decoder to transform the encoded information.
Then, there needs to be an element to convert the raw audio buffers into an appropriate...