Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. QtMultimedia using QML Video play is not working
Forum Updated to NodeBB v4.3 + New Features

QtMultimedia using QML Video play is not working

Scheduled Pinned Locked Moved Unsolved QtonPi
10 Posts 4 Posters 2.7k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    Kallappa M B
    wrote on last edited by Kallappa M B
    #1

    Hello,
    I am trying to play a video on Raspberry pi-3 and Made cross compile setup on Linux host machine and the problem is video play is not working on Raspberry pi but the same code will work on Linux machine.
    Also i have tried the Qt widget example for video play, it is working fine.
    and the qml code is here

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtMultimedia 5.12
    import Directory 1.0

    Window {
    visible: true
    width: 640
    height: 480
    color: "#000000"
    title: qsTr("Hello World")

    Rectangle {
        id: rectangle
        width: 400
        height: 246
        color: "#00000000"
        border.width: 7
        border.color: "#8a8b91"
    
        MediaPlayer {
              id: player
              source:  "./foggy_road_timelapse_256.webm"
              autoPlay: true
    
        }
    
        VideoOutput {
            id: output
            anchors.fill: parent
            autoOrientation: true
            source: player
        }
    }
    

    }

    For this only blank screen is coming in Raspberry, Kindly suggest where i am doing wrong

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kallappa M B
      wrote on last edited by
      #2

      Please any one assist me for the above issue ....

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Did you deploy that video file on your device in the save folder as your application ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        M K 2 Replies Last reply
        1
        • SGaistS SGaist

          Hi,

          Did you deploy that video file on your device in the save folder as your application ?

          M Offline
          M Offline
          macfanpl
          wrote on last edited by macfanpl
          #4

          @SGaist

          VideoOutput {
                  (...)
                  anchors.fill: parent
                  (...)
              }
          

          It clearly says that yes, he deployed to the same folder as app. So I dont understand your question. Was it meant to substitute your lack of knowledge?

          jsulmJ SGaistS 2 Replies Last reply
          -4
          • M macfanpl

            @SGaist

            VideoOutput {
                    (...)
                    anchors.fill: parent
                    (...)
                }
            

            It clearly says that yes, he deployed to the same folder as app. So I dont understand your question. Was it meant to substitute your lack of knowledge?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @macfanpl said in QtMultimedia using QML Video play is not working:

            Was it meant to substitute your lack of knowledge?

            Please don't get personal and read https://forum.qt.io/topic/113070/qt-code-of-conduct

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • M macfanpl

              @SGaist

              VideoOutput {
                      (...)
                      anchors.fill: parent
                      (...)
                  }
              

              It clearly says that yes, he deployed to the same folder as app. So I dont understand your question. Was it meant to substitute your lack of knowledge?

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @macfanpl said in QtMultimedia using QML Video play is not working:

              @SGaist

              VideoOutput {
                      (...)
                      anchors.fill: parent
                      (...)
                  }
              

              It clearly says that yes, he deployed to the same folder as app. So I dont understand your question. Was it meant to substitute your lack of knowledge?

              First thing: please stay polite.

              As for the question I asked to @Kallappa-M-B, no it does not say that. Especially in the part you are quoting.

              Code does not ensure that the file is available anywhere.

              In the case of @Kallappa-M-B, the video path is "./foggy_road_timelapse_256.webm" which means that it is relative to the executable path. @Kallappa-M-B is cross-compiling his application. At no point does he mention that he also copied the file over to his Raspberry Pi-3 in the same folder where his application resides on the device.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2
              • SGaistS SGaist

                Hi,

                Did you deploy that video file on your device in the save folder as your application ?

                K Offline
                K Offline
                Kallappa M B
                wrote on last edited by Kallappa M B
                #7

                thanks @SGaist
                Yes i have kept Video file in the same folder in Raspberry-Pi

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Does it play correctly if you do that using GStreamer directly ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  K 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Does it play correctly if you do that using GStreamer directly ?

                    K Offline
                    K Offline
                    Kallappa M B
                    wrote on last edited by
                    #9

                    @SGaist
                    No i haven't tried the way you mentioned and Kindly let me if any methods to test i am new to to this

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      The idea is that you try playing your video using the GStreamer command line tool as GStreamer is used as backend on Linux for multimedia related stuff.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      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