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

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Incomplete
    • Affects Version/s: 5.5.0, 5.5.1
    • Fix Version/s: None
    • Component/s: Multimedia
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            valentyn.doroshchuk Valentyn Doroshchuk
            Reporter:
            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