MediaPlayer does not receive stream metadata.
-
-
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.
-
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.
-
@SGaist Qt6.5, Linux Distribution (Manjaro KDE). ffmpeg can display meta (ICY metadata from command ffmpeg -i %stream%), but MediaPlayer can't display it...
@Driglu4it, sorry for Qt6.5 Linux Neon Developer Edition*
-
J JoeCFD referenced this topic on
-
@Driglu4it, sorry for Qt6.5 Linux Neon Developer Edition*
Which release of 6.5 is it ?
-
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 : 90004532Qt/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
QMediaMetaDatadictionary 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?
-
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 : 90004532Qt/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
QMediaMetaDatadictionary 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?
@Niclas-Eisenhut hi and welcome to devnet,
Can you also confirme this with the latest 6.10 release ?
-
@Niclas-Eisenhut hi and welcome to devnet,
Can you also confirme this with the latest 6.10 release ?
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 -
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 missingI used Debian 13 btw