Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QML: audio plays correctly but the video doesn't

QML: audio plays correctly but the video doesn't

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 620 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.
  • N Offline
    N Offline
    Nekk
    wrote on last edited by
    #1

    Hi all.
    I'm working on a embedded Yocto OpenSTLinux project. I'm developing a QT/QML application in witch I have to play videos and audios. Using the following line command

    gst-launch-1.0 playbin uri=file:///home/root/media/video_test.mp4 video-sink="waylandsink sync=false"
    

    the video and audio work correctly. Instead, using QML, for example this

    Item {
    
        id: idVideo
    
        visible: true
    
        width: 1024
        height: 600
    
        Video {
            id: videoExample
            anchors.fill: parent
            source: "file:///home/root/media/video_test.mp4"
            autoPlay: true
        
            focus: true
        }
    }
    

    or this

    Item {
    
        id: idVideo
    
        visible: true
    
        width: 1024
        height: 600
    
        MediaPlayer {
            id: mdpExample
            source: "file:///home/root/media/video_test.mp4"
            autoPlay: true
        }
        
        
        VideoOutput {
            id: videoExample
            anchors.fill: parent
            source: mdpExample
        }
    }
    

    the audio plays correctly but the video does not. The display doesn't show any image (it is black). Can someone give me a suggestion to solve the problem?

    Many thanks

    K 1 Reply Last reply
    1
    • N Nekk

      Hi all.
      I'm working on a embedded Yocto OpenSTLinux project. I'm developing a QT/QML application in witch I have to play videos and audios. Using the following line command

      gst-launch-1.0 playbin uri=file:///home/root/media/video_test.mp4 video-sink="waylandsink sync=false"
      

      the video and audio work correctly. Instead, using QML, for example this

      Item {
      
          id: idVideo
      
          visible: true
      
          width: 1024
          height: 600
      
          Video {
              id: videoExample
              anchors.fill: parent
              source: "file:///home/root/media/video_test.mp4"
              autoPlay: true
          
              focus: true
          }
      }
      

      or this

      Item {
      
          id: idVideo
      
          visible: true
      
          width: 1024
          height: 600
      
          MediaPlayer {
              id: mdpExample
              source: "file:///home/root/media/video_test.mp4"
              autoPlay: true
          }
          
          
          VideoOutput {
              id: videoExample
              anchors.fill: parent
              source: mdpExample
          }
      }
      

      the audio plays correctly but the video does not. The display doesn't show any image (it is black). Can someone give me a suggestion to solve the problem?

      Many thanks

      K Offline
      K Offline
      kluszon
      wrote on last edited by
      #2

      @Nekk I meet the same situation on Yocto Kirkstone for iMX8.

      1 Reply Last reply
      0
      • JKSHJ JKSH moved this topic from Qt for MCUs on

      • Login

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