Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
372 views
in Technique[技术] by (71.8m points)

mp3 - Python pyglet AVBin - How to install AVBin

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.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...