[vorbis] Ogg/Vorbis Python modules problem

Andrew Chatham andrew at andrewchatham.com
Mon May 5 13:44:28 PDT 2003



On Mon, 2003-05-05 at 13:18, 8ut3ww302 at sneakemail.com wrote:
> Is anyone else using the Python modules?  I'm working on a Python-based music player that will support, among other things, re-encoding music to low-bitrate Ogg Vorbis for streaming.  Reading from a wav or raw file and encoding to Vorbis works, and reading from a Vorbis file and saving to a wav or raw audio file, or playing via the audio device also works, but I encounter problems whenever I try to encode from a Vorbis or mp3 file.  When encoding from Vorbis, reading the the python Vorbis module, it sounds like small portions of the recording are missing, and  the encoded file is shorter than the original.  With mp3 (read with pymad), there is noise introduced when re-encoding to Vorbis which does not appear if i decode to a file and then encode to Vorbis as a separate step.  The only thing that seems to be able to fix this is unpacking the data to an array of ints, scaling and converting to floats, and repacking to a string in Python, but this is much slower and seems to !
 lea
>  k memory.  I'm guessing it has something to do with passing a Python string to write_wav instead of the buffer objects that both MadFile and VorbisFile return, but I'm not sure.  Does anyone else have any experience with using Vorbis in Python which might be helpful?

Does oggenc.py have the same problem for you? I haven't noticed this
issue before, but I don't have the most discerning ears, so it may be
there.

And you should have a very, very good reason for transcoding mp3s to
vorbis, or you'll get yelled at :)

Andrew

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list