Important: Please read the Qt Code of Conduct -

QMediaPlayer frame rate

  • Looking for a reliable way to get video frame rate from QMediaPlayer. I hooked into the mediaStatusChanged signal and iterated through the availableMetaData.

    void VideoWidget::onMediaStatusChanged(QMediaPlayer::MediaStatus) {
        QStringList metadatalist = _mediaPlayer->availableMetaData();
        int list_size = metadatalist.size();
        QString metadata_key;
        QVariant var_data;
        for (int indx = 0; indx < list_size; indx++)
            metadata_key =;
            var_data = _mediaPlayer->metaData(metadata_key);
            qDebug() << metadata_key << var_data.toString();

    This prints out some information but not frame rate. I need to do some calculations based on frame rate. Can this be obtained reliably from QMediaPlayer some other way? Is there another library I could use?

  • I'm guessing from lack of replies that this is either not possible or not guaranteed to be in the meta data.

  • Lifetime Qt Champion


    You might also be loading a video which has a variable frame rate.

    You might be interested by MediaInfo.

  • MediaInfo seems to work. Thanks.

Log in to reply