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. QML MediaPlayer Performace
Qt 6.11 is out! See what's new in the release blog

QML MediaPlayer Performace

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.7k 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.
  • M Offline
    M Offline
    miguelorenes
    wrote on last edited by
    #1

    Hi comunity,
    I am getting an unexpected high use of CPU rate when using MediaPlayer + VideoOutput QML components.
    I say "unexpected" because I am playering the same video file with QtWidget (QMediaPlayer + QVideoWidget) and I am getting a not bad response.

    So, I would like to know if anyone knows about QML Media Player CPU performance or someone can give a tip in order to use properly these QML component or to reduce CPU rate, or let me know if that is a QML limitation.

    Environment:
    SO: Windows
    QT: 5.4
    Kit: Desktop Qt 5.4 MSVC2013 32bit

    QTWidget Code:
    @ player = new QMediaPlayer;
    player->setMedia(QUrl::fromLocalFile("file.mp4"));

    playerWidget = new QVideoWidget;
    player->setVideoOutput(playerWidget);
    playerWidget->show();

    player->play();@

    QML Code:
    @MediaPlayer {
    id: playMusic
    source: "file.mp4"

    }
    
    VideoOutput {
        anchors.fill: parent
        source: playMusic
    }
    
    Component.onCompleted: { playMusic.play() }@
    

    Many thanks.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mastablasta
      wrote on last edited by
      #2

      Hello,
      I have the same problem like you. Did you resolve it?

      best regards

      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