[SOLVED] QMediaPlayer won't play on other machine
-
Latest version of Qt and MSVC 2012 and Windows 7
Video works on my Windows 8 system in QtCreator and as standalone app... But in Windows 7 does not work...
-
Ok... what type of video is it? What error messages do you get? (When you run the program from Qt Creator, see the "Application Output" tab)
-
.mp4 .avi
I am getting following error:
The format of a media resource isn’t (fully) supported. Playback may still be possible, but without an audio or video component.I found on google http://stackoverflow.com/questions/21458581/playing-videos-with-qmediaplayer-qvideowidget-in-qt5-2
It might be OpenGL problem... I am runing it on a virtual machine without any video drivers... But why would then GOM player and Windows Media Player work there??? Also application requires OpenGL.dll to work... I will install Windows 7 without virtual machine and test it...
EDIT: WMV video plays on virtual machine...
-
[quote]I found on google http://stackoverflow.com/questions/21458581/playing-videos-with-qmediaplayer-qvideowidget-in-qt5-2
It might be OpenGL problem…[/quote]Yes, possibly. The StackOverflow post you found said that OpenGL 2.1 or higher is needed. However, Windows only supports OpenGL 1.1. You need a physical machine and install graphics drivers to get better OpenGL support.[quote]But why would then GOM player and Windows Media Player work there???[/quote]Probably because they don't use OpenGL. (I don't know the details though)
[quote]Also application requires OpenGL.dll to work[/quote]I don't understand. You said you're using 32-bit Windows with MSVC 2012.
However, from http://qt-project.org/downloads , the 32-bit MSVC 2012 package -- which is "Qt 5.2.1 for Windows 32-bit (VS 2012, 541 MB)" -- does NOT use OpenGL.
Can you please re-confirm: Which Qt package did you download?
[quote]I will install Windows 7 without virtual machine and test it…[/quote]I believe that should work if you install graphics drivers that support OpenGL 2.1 or higher.
Alternatively, try using "Qt 5.2.1 for Windows 32-bit (VS 2012, 541 MB)" to build your project in your virtual Windows 7.
-
Installed Windows 7 on physical PC and everything works fine...
About Qt Package you are right... I forgot I installed few weeks ago Qt 5.2.0 for Windows 32-bit (VS 2010, OpenGL, 517 MB)...
-
[quote author="Anonymous" date="1391794109"]I installed few weeks ago Qt 5.2.0 for Windows 32-bit (VS 2010, OpenGL, 517 MB)...[/quote]Did you try the non-OpenGL version?
-
bq. Installed Windows 7 on physical PC and everything works fine...
It worked on physical PC... Seems like problem was in virtual PC and OpenGL...
-
[quote author="Anonymous" date="1391813300"]It worked on physical PC... Seems like problem was in virtual PC and OpenGL...[/quote]Yes. Which is why I asked, did you try the non-OpenGL version of Qt in your virtual machine? That might play the video.
- This uses OpenGL: "Qt 5.2.1 for Windows 32-bit (VS 2010, OpenGL, 517 MB)"
- This doesn't use OpenGL: "Qt 5.2.1 for Windows 32-bit (VS 2010, 518 MB)"
-
I installed Qt 5.2.1 for Windows 32-bit (VS 2010, 518 MB) on my virtual machine and video did not work...
-
[quote author="Anonymous" date="1391813894"]I installed Qt 5.2.1 for Windows 32-bit (VS 2010, 518 MB) on my virtual machine and video did not work... [/quote]I see. Sorry I couldn't help there... but good luck with your project!