Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    QML - Video not working

    QML and Qt Quick
    2
    3
    1168
    Loading More Posts
    • 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.
    • Z
      Zondar last edited by

      Hello,

      I have a problem with Video element, when I try to play .mp4 or any other .avi file, I will have just blank screen.
      Itried this code
      @import QtQuick 2.4
      import QtQuick.Controls 1.3
      import QtMultimedia 5.0

      ApplicationWindow {
      title: qsTr("Hello World")
      width: 640
      height: 480
      visible: true

      Video {
          source: "small.mp4"
          autoPlay: true
          anchors.fill: parent
      }
      

      }
      @

      I find only one .avi file, which can be played, but there are always some black flashes in background.
      I tried these files: https://drive.google.com/folderview?id=0B_p9vAQIJUL6Qm9vRExESnp6T1k&usp=sharing

      Thank you

      1 Reply Last reply Reply Quote 0
      • D
        David Stiel last edited by

        Hi

        Probably it's a matter of missing codeces.

        If you are on windows using MinGW K-Lite Codec Pack is an option.

        The tricky bit can be hardware decoding of certain formats and sizes.
        The following pages contains some useful information : "backends":http://qt-project.org/wiki/Qt_Multimedia_Backends and "angel":http://qt-project.org/wiki/Qt-5-on-Windows-ANGLE-and-OpenGL

        1 Reply Last reply Reply Quote 0
        • Z
          Zondar last edited by

          Thank you for response. I tried to install some Media codecs before, but even installing K-Lite Codec Pack, I will get just blank screen with mp4. And I use MinGW as you said. But .avi started working :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post