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. MediaPlayer does not receive stream metadata.

MediaPlayer does not receive stream metadata.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
mediaplayerbug
10 Posts 3 Posters 1.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.
  • D Offline
    D Offline
    Driglu4it
    wrote on last edited by
    #1

    In Qt6 MediaPlayer can only get this metadata:
    Duration: 00:00:00
    Audio codec: AAC
    Audio bit rate: 319798
    Container Format: AAC

    At the same time, in Qt5 MediaPlayer from the same source, in addition to the data above, it also shows the genre and title.

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

      Hi and welcome to devnet,

      You should also add the exact version of Qt 6. As Qt 6.5 switched the multimedia backend to ffmpeg.

      The OS version would also be useful.

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

      D 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        You should also add the exact version of Qt 6. As Qt 6.5 switched the multimedia backend to ffmpeg.

        The OS version would also be useful.

        D Offline
        D Offline
        Driglu4it
        wrote on last edited by
        #3

        @SGaist Qt6.5, Linux Distribution (Manjaro KDE). ffmpeg can display meta (ICY metadata from command ffmpeg -i %stream%), but MediaPlayer can't display it...

        D 1 Reply Last reply
        0
        • D Driglu4it

          @SGaist Qt6.5, Linux Distribution (Manjaro KDE). ffmpeg can display meta (ICY metadata from command ffmpeg -i %stream%), but MediaPlayer can't display it...

          D Offline
          D Offline
          Driglu4it
          wrote on last edited by
          #4

          @Driglu4it, sorry for Qt6.5 Linux Neon Developer Edition*

          SGaistS 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD referenced this topic on
          • D Driglu4it

            @Driglu4it, sorry for Qt6.5 Linux Neon Developer Edition*

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

            Which release of 6.5 is it ?

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

            D 1 Reply Last reply
            0
            • SGaistS SGaist

              Which release of 6.5 is it ?

              D Offline
              D Offline
              Driglu4it
              wrote on last edited by
              #6

              @SGaist, yes Qt 6.5

              1 Reply Last reply
              0
              • Niclas EisenhutN Offline
                Niclas EisenhutN Offline
                Niclas Eisenhut
                wrote on last edited by
                #7

                Hi,

                I can confirm this regression is still present in Qt 6.9.3 on Linux.
                I am streaming Internet Radio (ICY/Shoutcast). The underlying FFmpeg backend clearly logs the metadata (StreamTitle), so the data is definitely arriving. However, neither QML (MediaPlayer.metaData) nor C++ (QMediaPlayer::metaData()) exposes this data.

                I have tried iterating through all available metadata keys (0-20) and requesting the raw "StreamTitle" key explicitly in C++, but it returns empty strings.

                FFmpeg Log (Success):

                Input #0, aac, from 'https://mp3.ffh.de/ffhchannels/hqeurodance.aac':
                  Metadata:
                    StreamTitle     : Jam & Spoon - Angel
                    StreamUrl       : 90004532
                

                Qt/QML Debug Log (Failure):

                qml: --- DEBUGGING METADATA MAPPING ---
                qml: Direct 'StreamTitle': ""
                qml: Direct 'icy-name': ""
                qml: Found data at ID [10]: 00:00:00  (Duration)
                qml: Found data at ID [12]: AAC       (Codec)
                

                It seems the FFmpeg backend in Qt Multimedia is parsing the ICY headers but failing to populate the QMediaMetaData dictionary for live streams.

                Has anyone found a workaround using standard Qt APIs, or is the only solution to implement a parallel TCP socket to sniff the headers manually?

                SGaistS 1 Reply Last reply
                0
                • Niclas EisenhutN Niclas Eisenhut

                  Hi,

                  I can confirm this regression is still present in Qt 6.9.3 on Linux.
                  I am streaming Internet Radio (ICY/Shoutcast). The underlying FFmpeg backend clearly logs the metadata (StreamTitle), so the data is definitely arriving. However, neither QML (MediaPlayer.metaData) nor C++ (QMediaPlayer::metaData()) exposes this data.

                  I have tried iterating through all available metadata keys (0-20) and requesting the raw "StreamTitle" key explicitly in C++, but it returns empty strings.

                  FFmpeg Log (Success):

                  Input #0, aac, from 'https://mp3.ffh.de/ffhchannels/hqeurodance.aac':
                    Metadata:
                      StreamTitle     : Jam & Spoon - Angel
                      StreamUrl       : 90004532
                  

                  Qt/QML Debug Log (Failure):

                  qml: --- DEBUGGING METADATA MAPPING ---
                  qml: Direct 'StreamTitle': ""
                  qml: Direct 'icy-name': ""
                  qml: Found data at ID [10]: 00:00:00  (Duration)
                  qml: Found data at ID [12]: AAC       (Codec)
                  

                  It seems the FFmpeg backend in Qt Multimedia is parsing the ICY headers but failing to populate the QMediaMetaData dictionary for live streams.

                  Has anyone found a workaround using standard Qt APIs, or is the only solution to implement a parallel TCP socket to sniff the headers manually?

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

                  @Niclas-Eisenhut hi and welcome to devnet,

                  Can you also confirme this with the latest 6.10 release ?

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

                  Niclas EisenhutN 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    @Niclas-Eisenhut hi and welcome to devnet,

                    Can you also confirme this with the latest 6.10 release ?

                    Niclas EisenhutN Offline
                    Niclas EisenhutN Offline
                    Niclas Eisenhut
                    wrote last edited by
                    #9

                    @SGaist

                    Hi,

                    I have tested this with Qt 6.9.3, Qt 6.10.2, and even the Qt 6.11.0-beta2 snapshot.
                    The result is identical in all versions: The metadata is visible in the FFmpeg debug output, but completely missing from the QML/C++ API.

                    In my application i switched to libvlcpp, so i made this MRE (Minimal Reproducible Example) with Gemini:

                    Main.qml

                    import QtQuick
                    import QtMultimedia
                    
                    Window {
                        width: 400
                        height: 300
                        visible: true
                        title: "Metadata Tester"
                    
                        MediaPlayer {
                            id: player
                            source: "http://mp3.ffh.de/radioffh/hqlivestream.mp3"
                            audioOutput: AudioOutput {}
                            autoPlay: true
                    
                            onMetaDataChanged: {
                                console.log("\n--- METADATA RECEIVED ---")
                                var meta = player.metaData
                    
                                if (!meta) {
                                    console.log("MetaData Object is null/undefined")
                                    return
                                }
                    
                                // 1. Check Standard Qt Enum (Title)
                                var standardTitle = meta.stringValue(MediaMetaData.Title)
                                console.log("Standard Title (Enum): " + (standardTitle ? standardTitle : "[EMPTY]"))
                    
                                // 2. Check Raw FFmpeg/ICY Key
                                var rawStreamTitle = meta.stringValue("StreamTitle")
                                console.log("Raw Key 'StreamTitle': " + (rawStreamTitle ? rawStreamTitle : "[EMPTY]"))
                    
                                var rawIcyName = meta.stringValue("icy-name")
                                console.log("Raw Key 'icy-name':    " + (rawIcyName ? rawIcyName : "[EMPTY]"))
                    
                                // 3. Dump ALL available keys to prove what Qt actually exposes
                                console.log("-- Dumping all available keys --")
                                var keys = meta.keys()
                                for (var i = 0; i < keys.length; i++) {
                                    var key = keys[i]
                                    var val = meta.stringValue(key)
                                    console.log("Key [" + key + "] = " + val)
                                }
                                console.log("-----------------------------\n")
                            }
                    
                            onErrorOccurred: {
                                console.log("Error: " + errorString)
                            }
                        }
                    }
                    

                    Results (Qt 6.10.2 & 6.11.0-beta2)
                    As you can see, FFmpeg successfully parses the ICY headers (StreamTitle: Bruno Mars), but Qt only exposes the technical audio details (Bitrate/Codec).
                    The only thing which changed is the FFmpeg version.

                    info: Using Qt multimedia with FFmpeg version 7.1.2
                    Input #0, mp3, from 'http://mp3.ffh.de/radioffh/hqlivestream.mp3':
                      Metadata:
                        icy-name        : HIT RADIO FFH
                        StreamTitle     : Bruno Mars - I Just Might
                      Duration: N/A, start: 0.000000, bitrate: 128 kb/s
                    
                    debug: --- METADATA RECEIVED ---
                    debug: Standard Title: undefined
                    debug: Raw StreamTitle: undefined
                    debug: Raw icy-name:    undefined
                    debug: -- Dumping all available keys --
                    debug: Key [10] = 00:00:00
                    debug: Key [12] = MP3
                    debug: Key [13] = 128000
                    debug: Key [14] = MP3
                    
                    1 Reply Last reply
                    0
                    • Niclas EisenhutN Offline
                      Niclas EisenhutN Offline
                      Niclas Eisenhut
                      wrote last edited by Niclas Eisenhut
                      #10

                      I also tested Qt 6.4.3 because you mentioned As Qt 6.5 switched the multimedia backend to ffmpeg, in which I got Key [7] (Publisher) = HIT RADIO FFH, so the Station Name is mapped, but the Song Title (StreamTitle) is still missing

                      I used Debian 13 btw

                      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