pyglet WAVEFormatException: AVbin is required to decode compressed media

GoodPie picture GoodPie · Jul 14, 2013 · Viewed 8.5k times · Source

I don't understand what is going wrong here. Everytime I attempt to play a sound in pyglet, I get the following error: WAVEFormatException: AVbin is required to decode compressed media.

These are the things I have attempted:

  • Installing versions 5-10 of AVbin manually and resetting my computer after each install, just to be sure that this wasn't the problem. I have attempted both x64 and x86 versions.
  • Installing it via the AVbin installer.

I tried AVbin 5 as this was the one that is pre packaged with the pyglet installer, which I can't use due to an error with python 2.7.5. I would like to keep using python 2.7 as allot of modules that I often use are installed for 2.7. Any help on this situation?

Also, this is on windows 7

Answer

lefti picture lefti · Nov 20, 2013

From the pyglet.org Programming Guide:

"Decoding of compressed audio and video is provided by AVbin. If AVbin is not present, pyglet will fall back to reading uncompressed WAV files only."

So this means AVbin is needed to decode and play different audio formats, other than .WAV.

I had this same problem, using Windows 7 64-bit, Python 2.7.6 with pyglet.

I tried installing version 5 and version 10 of AVbin, I tried to copy the .dll file to windows/system32 folder etc., but none of these worked.

This way I got the sounds working:

  1. Download the windows version of AVbin 5 from here: http://avbin.github.io/AVbin/Home/Home.html

  2. Copy the avbin.dll to your project folder. (The folder where your .py file resides.)

This works for me. Hope it works for you aswell.