Python pyglet AVBin - How to install AVBin

谁说胖子不能爱 提交于 2019-11-28 23:09:29

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

I had the same problem on Windows, and there's no installer for python 2.7 on Windows.

If you put the avbin dll in your folder (or install it globally using the installer), then write:

pyglet.lib.load_library('avbin')
pyglet.have_avbin=True

after the import of pyglet, like this:

import pyglet
pyglet.lib.load_library('avbin')
pyglet.have_avbin=True

It will load and use avbin happily.

I went super saiyan banging my head against the wall, and broke through it.

The solution is to install the STABLE release, rather than the latest. All it needs is a little

:~/Downloads/avbin-linux-x86-64-7$ sudo ./install.sh 

And it works. I think they have a mix up with their installers...

For me specifically it was installing AVbin 7 from here.

AVbin 8 and 10 just seemed to run, but there wasn't any sound coming out.

Running 32bit Ubuntu 12.04.

Download the specific installer from here.

Then go to the download folder and run it using sudo.

For example in my case I ran the following:

wget https://github.com/downloads/AVbin/AVbin/install-avbin-linux-x86-64-v10
sudo install-avbin-linux-x86-64-v10

I had this issue on Windows and found this question via a search engine so I thought I'd share my experience and solution.

I tried to load w WMV file (at least that's the extension) and got the same exception as described in the question but my problem was due to the fact that I installed pyglet using 'pip install pyglet' command and then AVBin from an installer.

What solved the problem for me was an installation of pyglet from an installer found on the project site, it contains AVBin and then everything worked fine.

For me, I had to manually move the dll to the correct folder.
Due to a bug in the AVBin installer, it installs in C:\Windows\System32 when it should've been placed in C:\Windows\SysWOW64 .
(Assuming you are on Windows!)

To fix this, all you have to do is go into C:\Windows\System32 and find avbin.dll (or avbin64.dll if you are on a 64 bit system) and manually cut-and-paste it into C:\Windows\SysWOW64 .

(Or if you're me and downloaded both dlls then move both...)

My OS is Windows10 64bits.

The issue:

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

How to fix it on Windows10:

  1. Download 32bits AVbin.dll from AVbin Downloads
    Please note: The 64bits AVbin dll does NOT work even you're using 64bits Win10.
    So please download the 32bits instead.

  2. The .exe from 1. extracts the avbin.dll into windows/system32/ folder.
    Please cut/copy it and paste to windows/system/ folder. It looks windows10 refers to only 32bits AVbin but not 64bits.

  3. You're good to go. Try it !

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!