Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48950

QML Video element obtains metaData.resolution on Linux, but not OSX or iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.5.0, 5.5.1
    • Multimedia
    • None
    • macOS

    Description

      I'm using the QML Video element to play videos of various sizes.

      On Linux, I seem to have no problems obtaining metaData.resolution with the width and height of the video.

      On OSX and iOS, the video plays but metaData.resolution remains undefined.

      Same behaviour with 5.4.1 observed, currently downloading 5.5.1.

      I've tried this with a few different video files (.mov / .mp4 / h264 stuff), of various sizes.

      Simple qmlscene runnable example:

      import QtQuick 2.2
      import QtMultimedia 5.4
      
      Video {
      
        width: (metaData==undefined || metaData.resolution==undefined ? 400 : metaData.resolution.width)
        height: (metaData==undefined || metaData.resolution==undefined ? 300 : metaData.resolution.height)
      
        onWidthChanged: console.log('Video width',width)
        onHeightChanged: console.log('Video height',height)
      
        source: '<some video file>'
        autoPlay: true
        fillMode: VideoOutput.PreserveAspectFit
      }
      

      On OSX that never gets the video's resolution (it sticks with the fallback sizes). On Linux it does. Not tried on Windows or Android. I have very similar code in an iOS app's QML which never gets the actual video size too.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            timday Tim Day
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes