Python pyglet AVBin - How to install AVBin

xxjjnn picture xxjjnn · Apr 24, 2012 · Viewed 28.2k times · Source

AVBin is used by Pyglet to decode MP3s. Link: http://avbin.github.com/AVbin/Download.html

Installed using install.sh provided, when utilised leads to error:

'AVbin is required to decode compressed media')
pyglet.media.riff.WAVEFormatException: AVbin is required to decode compressed media

...So it didn't install properly? Using python virtualenv, suspect this might be causing issues... though I ran AVBin's install.sh in virtualenv, like this:

(SoundShenanigans)user@computer:~/Downloads/avbin-linux-x86-64-v8$ sudo bash install.sh 

UPDATE

I have found where avbin is installed... it seems to be installed in the right place =S

~/pyvien/SoundShenanigans/lib/python2.7/site-packages/pyglet/media$ ls
avbin.py   drivers      __init__.pyc   procedural.pyc  riff.pyc
avbin.pyc  __init__.py  procedural.py  riff.py

UPDATE 2

The library is .so , not .dylib , why do you want .dylib mysterious code? This is Linux not Mac (Mac's have .dylib, Ubuntu has .so)

File "SoundShenanigans.py", line 4, in
  from pyglet.media import avbin
File "/home/user/pyvien/SoundShenanigans/local/lib/python2.7/site-packages/pyglet/media/avbin.py", line 53, in
  darwin='/usr/local/lib/libavbin.dylib')
File "/home/user/pyvien/SoundShenanigans/local/lib/python2.7/site-packages/pyglet/lib.py", line 122, in load_library
  raise ImportError('Library "%s" not found.' % names[0])
ImportError: Library "avbin" not found.

Answer

Sebastian picture Sebastian · Nov 19, 2013

What about installing it by:

sudo apt-get install libavbin-dev libavbin0

More information about this package: http://packages.ubuntu.com/source/avbin

Edit: It looks like it is not included anymore for newer ubuntu versions. So you have to download it from https://avbin.github.io/AVbin/Download.html and install it via

sudo sh ./install-avbin-linux-x86-64-v10