Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML - Video not working
QtWS25 Last Chance

QML - Video not working

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.5k Views
  • 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 Offline
    Z Offline
    Zondar
    wrote on last edited by
    #1

    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
    0
    • D Offline
      D Offline
      David Stiel
      wrote on last edited by
      #2

      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
      0
      • Z Offline
        Z Offline
        Zondar
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved