I'm helping develop a PyQt4.8 application which amongst other things plays video and audio. We are using Phonon for this, part of the reason being that we also embed videos in a QtWebkit page which uses the same.
On Windows 7, the default phonon backend (phonon_ds94.dll) seems to struggle with some media formats (refusal to play) so we're looking to try the phonon_vlc backend instead.
This page appeared to be the most helpful, but I still haven't had success. I've extracted phonon_vlc.dll and copied it into C:\Python26\Lib\site-packages\PyQt4\plugins\phonon_backend\ . I've installed VLC 1.1.7. I've removed phonon_ds94.
But when I run my app, I just get the error:
WARNING: bool __thiscall Phonon::FactoryPrivate::createBackend(void) phonon backend plugin could not be loaded
I've also tried adding C:\Program Files\VideoLAN\VLC to the %PATH%, but still no joy.
Can anyone offer any suggestions?
One thing you can try is to make sure that the version of the VLC library that is being used by the Phonon VLC backend is compatible with the version of VLC that you have installed on your system.
Another thing to check is that the Phonon VLC backend is being loaded correctly by Phonon. You can try to print the available Phonon backends and check if the Phonon VLC backend is listed among them.
from PyQt4.phonon import Phonon print(Phonon.BackendCapabilities.availableBackends())
If the Phonon VLC backend is not listed, then it is not being loaded correctly and you may need to check the installation path, and make sure that the phonon_vlc.dll is placed correctly in the correct folder.
Also, you can try to run your application with the environment variable QT_DEBUG_PLUGINS=1, this should give you more information about why the backend is not being loaded.
QT_DEBUG_PLUGINS=1 python your_script.py
This should help you to understand why the backend is not being loaded and should give you more information about what needs to be done to fix it.