[Solved]Media player example not playing .mkv .flv and .mpg files



  • Hello ,
    I am playing with the media player example of Qt5 here :http://qt-project.org/doc/qt-5/qtmultimediawidgets-player-example.html and it is playing .avi and .mp4 files well on my sytem(Windows) .The problem is that it is not playing .mkv ,.flv and .mpg files which I also need to support .

    The doc says

    This example creates a simple multimedia player. We can play audio and or video files using various codecs.

    Am I missing the codecs to play those files ?If so how do I install them and make my Qt application aware of them?

    Thank you for your time .


  • Moderators

    Hi,

    AFAIK, Yes you will need codecs to be installed on the system. I used the KLite Mega codec pack.



  • Thanks for the reply,
    the codec pack you suggested sure installs them .I have "vlc":http://www.videolan.org/vlc/index.html installed on my computer and it can play those files( .mkv ,.flv ,and .mpg) .This means I have the codecs on my computer right? If so why is the media player example picking up .mp4 and .avi codecs and not picking the others?Is there a place I can specify the codecs in Qt media classes?I have been looking in the doc and haven't found a clue.

    Thanks.


  • Moderators

    I guess it is not picking up from the vlc. It is because directshow which is used as the backend by multimedia on windows is able to play avi and mp4 files.



  • I see ,
    I just installed KLite Mega codec pack ,I ran my app hopping the system automatically sets things up but it didn't .It silently doesn't respond when I try to play those unsupported files . How do I make my app know the codecs are there do it can pick them up?

    Thanks.



  • With which compiler are you compile?if you use msv the default engine is wmf, if you compile with mingw the engine is directx. Anyway with msvc you can recompile qtmultimedia with directx enabled and sobstitute mediaservice folder in compiler plugins folder



  • Hi,
    I am working with msvc, I found Qt5's QMediaplayer to be problematic in terms of those codec issues and I found "vlcQt":http://projects.tano.si/vlc-qt to be a better solution for me.

    Thanks.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.