Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Video playback using QMultimedia
Qt 6.11 is out! See what's new in the release blog

Video playback using QMultimedia

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Timmoth
    wrote on last edited by
    #1

    Hi all, im trying to play back a video using QMultimedia - this is my code so far:

    @
    int main(int argc, char** argv)
    {
    QApplication app(argc, argv);

    QVideoWidget* videoWidget = new QVideoWidget;
    QMediaPlayer *player = new QMediaPlayer();
    
    player->setVideoOutput(videoWidget);
    videoWidget->show();
    
    player->setMedia(QUrl::fromLocalFile("C:/Wildlife.wmv"));
    player->play();
    return app.exec();
    

    }
    @

    Basically all that happens is the QVideoWidget is shown but that is it - no video at all.
    and when i try to play back an AVI the background goes black and i get two messages in the application output :
    handleSessionEvent: serious error = -2147467262
    handleSessionEvent: serious error = -2147467262

    does any one know what the issue is here?
    Regards, Tim.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It seems that the current default backend for windows uses WMF and it doesn't support as much codec than the DirectShow backend. You could try to build the DirectShow backend and see if it fits your needs.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved