Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64772

Wrong duration in Audio

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.9.3
    • Multimedia
    • None
    • Android

    Description

      Audio component from QtMultimedia 5.9 shows different duration on Desktop and Android for some mp3 files:

      ----- Desktop
      qml: Audio onStatusChanged 2 0
      qml: Audio duration: 0(s) 0(m)
      qml: Audio onStatusChanged 3 0
      qml: Audio duration: 1495.28(s) 24.9213(m)

      ----- Android
      D libaudiobugdemo.so: qrc:/main.qml:16 (onStatusChanged): qml: Audio onStatusChanged 2 0
      D libaudiobugdemo.so: qrc:/main.qml:17 (onStatusChanged): qml: Audio duration: 0(s) 0(m)
      D libaudiobugdemo.so: qrc:/main.qml:16 (onStatusChanged): qml: Audio onStatusChanged 3 0
      D libaudiobugdemo.so: qrc:/main.qml:17 (onStatusChanged): qml: Audio duration: 854.443(s) 14.2407(m)

      Minimal example (full example with "weird" mp3 file in attachments):

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      import QtQuick.Layouts 1.3
      import QtMultimedia 5.9
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Audio duration bug")
      
          Audio {
              id: audioPlayback
              source: "qrc:/mood.mp3"
              onStatusChanged: {
                  console.log("Audio onStatusChanged", status, errorString, error)
                  console.log("Audio duration: %1(s) %2(m)".arg(duration / 1000).arg(duration / 1000 / 60))
              }
          }
      }
      

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            qtros Roman Shchekin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes