QVideoWidget can't play video on Windows
-
I'm building the videoplayer example that comes with Qt 5.6.1 installation on Windows 7. When I load a mp4 video file, it says "DirectShowPlayerService::doRender: Unresolved error code 80040218". But if I build the same example with Qt5.5.1, it plays. I don't understand why. Does anyone have any clue?
Many thanks!
-
Hi and welcome to devnet,
Do you have both versions of Qt currently installed ?
AFAIK, that error might get triggered if the file was damaged.
-
@SGaist Yes, I have both Qt versions installed. What do you mean that the file was damaged? The mp4 file? It plays fine with other players. I read at somewhere that from Qt 5.6.0 QMediaPlayer uses the codec installed on system. So I installed k-lite codec pack and the file plays now. But it is rather annoying. Because basically it makes my app not working anymore for my users unless they install the required codec by themselves. Is there any way to deploy the app with codec so that my app will work out of box?
-
build the same example with Qt5.5.1, it plays
then, you can just take QtMultimedia from the 5.5.1 branch and re-build && re-install to the your Qt 5.6.1 target...
PS: QtMultimedia is a buggy module, IMHO.