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. Video shows "no content"!

Video shows "no content"!

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 643 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.
  • small_birdS Offline
    small_birdS Offline
    small_bird
    wrote on last edited by
    #1

    Hello, I try to use video item to play .flv video. However, the result shows "no content". The code is as following:

                 Video {
                    id: video1;
                    anchors.fill: parent;
                    source: "rafael.flv";
                    MouseArea {
                    anchors.fill: parent;
                    onClicked: {
                        if(video1.hasVideo){
                            video1.play();
                        }
                        else{
                            console.log("no content");
                        }
                    }
                }
    
                focus: true;
                Keys.onSpacePressed: video1.playbackState == MediaPlayer.PlayingState ? video1.pause() : video1.play();
                Keys.onLeftPressed: video1.seek(video1.position - 5000);
                Keys.onRightPressed: video1.seek(video1.position + 5000);
            }
    

    Could anyone tell me the reason? Thanks in advance!

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

      Hi,

      That's a relative path, are you sure it's in the same folder as the executable ?

      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
      • small_birdS small_bird

        Hello, I try to use video item to play .flv video. However, the result shows "no content". The code is as following:

                     Video {
                        id: video1;
                        anchors.fill: parent;
                        source: "rafael.flv";
                        MouseArea {
                        anchors.fill: parent;
                        onClicked: {
                            if(video1.hasVideo){
                                video1.play();
                            }
                            else{
                                console.log("no content");
                            }
                        }
                    }
        
                    focus: true;
                    Keys.onSpacePressed: video1.playbackState == MediaPlayer.PlayingState ? video1.pause() : video1.play();
                    Keys.onLeftPressed: video1.seek(video1.position - 5000);
                    Keys.onRightPressed: video1.seek(video1.position + 5000);
                }
        

        Could anyone tell me the reason? Thanks in advance!

        small_birdS Offline
        small_birdS Offline
        small_bird
        wrote on last edited by
        #3

        @small_bird I have knowed that I have to install DirectShow on my OS!!

        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