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. MediaPlayer not works
Forum Updated to NodeBB v4.3 + New Features

MediaPlayer not works

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 779 Views 2 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.
  • E Offline
    E Offline
    EnormousSoft
    wrote on last edited by
    #1
    import QtQuick 2.6
    import QtQuick.Window 2.2
    import QtMultimedia 5.8
    
    Window {
    id: window
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")
    
    MediaPlayer {
        id: medFPV
        source: "file:///mnt/sdcard/3-5.mp4"
        autoLoad: true
        autoPlay: true
    }
    
    VideoOutput {
        id: vidFpvMed
        source: medFPV
        anchors.fill: parent
    }
    }
    

    App opend and all controlls works, but no video or audio
    Tested on android 4.1 and 6.0

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

      Hi,

      What version of Qt ?
      What version of Android ?
      Does your application have access to the SD Card ?
      Can you play that file with another multimedia player on your 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
      1
      • E Offline
        E Offline
        EnormousSoft
        wrote on last edited by EnormousSoft
        #3

        Qt 5.11
        Android SDK 26 , NDK 17c , API 23
        Device Samsung Grand Prime Plus (Android 6.0)

        android.permission.READ_EXTERNAL_STORAGE
        The file in internal memory not sd card
        is android.permission.READ_EXTERNAL_STORAGE give me access for internel memory ?

        Yes i can play file with built-in player

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

          You should add handling of the MediaPlayer error signal.

          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
          1
          • E Offline
            E Offline
            EnormousSoft
            wrote on last edited by
            #5

            no errors

            i changed ndk to 10e, and now audio only works, also all controlls and seekbar works, but no video, just black box

            1 Reply Last reply
            0
            • Bhushan_SureB Offline
              Bhushan_SureB Offline
              Bhushan_Sure
              wrote on last edited by
              #6

              Have you installed codec software ? Like i was also facing problem while making video player using Qt, but then i installed Codec then my program worked 😊

              1 Reply Last reply
              1

              • Login

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