New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL2 audio provider is not working in some Linux distributions. #6601
Comments
Was getting the same error on Ubuntu 18.04. Reinstalled kivy using your suggested way:
And the problem is gone. Thank your @franccisco. |
Unfortunately, for ffpyplayer, I was unable to get sdl2 mixer to work for manylinux wheels. Only when I removed mixer and used sdl2 alone, did audio start working again. It probably can be figured out by compiling mixer and its deps from source on centos and figuring out which .so are the problem and how to provide the correct ones. But it would take a very long time to do that - I spent some time for ffpyplayer and couldn't work it out. We can maybe look at what other sdl2 based projects do for their manylinux wheels. |
Thanks @franccisco, @albertas. After reinstall it works on Xubuntu 19.04 too. |
Same issue on debian, and the fix for me required installation of the kivy dependencies: So: Followed by: pip uninstall kivy and then: pip install --no-binary kivy kivy builds kivy locally without using the pre-compiled wheel. That creates a version of kivy that recognises sdl2 as an audio provider, and also works. Without doing the dependencies, the new kivy can't see sdl2 as a possible provider, even though I did have libsdl2-dev libsdl2-mixer-dev installed, and sdl2 was working on my system via pysdl2 Don't know if that helps kivy dev, but it might help someone finding this bug report while trying to fix the problem. |
I'm having the same issue and this did not fix my problem, I'm still getting the same output. I'm in Ubuntu 18.04. Following @johnlawrenceaspden instructions the audio works but just for a fraction of a second, the output seems fine:
|
Versions
Description
I've seen some issue reports (for example, #6536 and #6512) that cannot reproduce audio using SDL2. It was also reported with ffpyplayer, but seems to be patched in the latest release (see matham/ffpyplayer#71 (comment)).
I've been trying different things to make it work, and finally I realised that the problem is the way the wheel is built in pip. If you try to install with
pip install https://github.com/kivy/kivy/archive/stable.zip
(or with the dev branch) and sdl2 installed, it works because pip builds a fresh wheel. It is not really neccesary to download and compile sdl2 from the web, it is enough to install the sdl2 package from distro repositories.Code and Logs
Example:
where
mytest.wav
is any audio file supported by SDL2.Please, make sure that you see something like:
in your log, to ensure that audio_sdl2 is installed and being used.
If you try and have the same issue I'm reporting, you should see something like this:
If you need help with testing or something, just tell me.
Greetings.
The text was updated successfully, but these errors were encountered: