Audio file cannot be played in Windows XP using Qt 5.1 QMediaPlayer
-
This problem has already been commented in a "Qt forum topic":https://qt-project.org/forums/viewthread/31885/#140572 and a "bug":https://bugreports.qt-project.org/browse/QTBUG-28881 has already been filed, but as far as I can see no solution is found.
QMediaPlayer plays some audio file formats correctly on Windows 7/8 (haven't tried Vista) but on XP no sound is generated and the QMediaPlayer reports QMediaPlayer::ServiceMissingError meaning that codecs are missing.
I've copied all "mediaservice" and "playlistformats" plugins' folders in the application directory along with "platforms", etc. but this only helps on Windows 7/8 (not in XP) where if these folders are missing from the application dir no sound is generated from the application as well.
Any suggestions?
-
the bug report you posted contains a solution and an explanation of the problem in the very first comment.
-
You are not reading carefully both the bugreport and the current topic - the bug report is about Qt 5.0 but the current topic is about Qt 5.1. Qt 5.1 builds all mediaservice plugins:
dsengine.dll - the mentioned DirectShow plugin in the bug report
qtmedia_audioengine.dll
wmfengine.dll - the Windows Media player related pluginSo, if you have read all comments in this bug report you will see the last one saying:
bq. Out of scope?
Someone knows how I can deploy in Windows XP ?
I built QMultimedia and the error continue.I confirm that Qt 5.1 QMediaPlayer is not working on Windows XP running the Qt application that uses it with the mediaservice plugins deployed in the application's folder.
-
and the necessary codecs are available on your XP system?!
-
No, my XP is a freshly installed one. Nothing except for the deployed Qt application and the installed MSVCRT redistributable.
No additional codecs are installed on all Windows versions - XP, 7, 8.
Only XP suffers from this problem. -
yes but directshow depends on codecs in order to playback most formats.
Unless you don't try to playback one of "these formats":http://msdn.microsoft.com/en-us/library/windows/desktop/dd407173(v=vs.85).aspx you need to download a codec for it. There are codec packs available on the net which bundle a bunch of codecs... -
The link you provided is invalid.
Yes, I know about that. One such pack is K-Lite (Mega) Code Pack. But for a wav file coded using PCM, I think it is not needed to install such. Could you point me out to such codecs that are freeware and can be redistributed with commercial applications? -
[quote author="napajejenunedk0" date="1380793349"]The link you provided is invalid.
[/quote]the forum doesn't accept the url for whatever reason. Just add a ")" at the end of the url.
[quote author="napajejenunedk0" date="1380793349"]
Yes, I know about that. One such pack is K-Lite (Mega) Code Pack. But for a wav file coded using PCM, I think it is not needed to install such.
[/quote]
PCM-WAV files should be played out of the box when they are 8-bit or 16-bit linear PCM.[quote author="napajejenunedk0" date="1380793349"]
Could you point me out to such codecs that are freeware and can be redistributed with commercial applications?[/quote]no not really. I turned my back on codecs in windows.
For sake of convenience i only use VLC these days so i don't have to worry about them anymore :)
Unfortunately AFAIK LibVLC can't be used as an backend for QtMultimedia yet. -
Thanks for the answer.
-
Was this ever solved? I have the same issue but with Videos.
Our app plays back wmv files. We're using Qt 5.3.2 which DOES come with dsengine.dll in plugins.
All plugins are deployed with application. It runs and plays the videos fine on Windows Vista and greater.
In Windows XP, I get this same error (displayed as "The QMediaPlayer object does not have a valid service"). It's NOT codecs. I can take one of the same wmv files, double click it under the same XP system and it will open and playback in Windows Media Player.
Everything I've read on the subject pertains to older Qt versions where dsengine.dll was not included, but of course it is in my version and it has been deployed.
Any ideas? Thanks. -
Was this ever solved? I have the same issue but with Videos.
Our app plays back wmv files. We're using Qt 5.3.2 which DOES come with dsengine.dll in plugins.
All plugins are deployed with application. It runs and plays the videos fine on Windows Vista and greater.
In Windows XP, I get this same error (displayed as "The QMediaPlayer object does not have a valid service"). It's NOT codecs. I can take one of the same wmv files, double click it under the same XP system and it will open and playback in Windows Media Player.
Everything I've read on the subject pertains to older Qt versions where dsengine.dll was not included, but of course it is in my version and it has been deployed.
Any ideas? Thanks.