Skip to content

Fix not showing metadata for webradio http stream (only vlc backend)

Reason for the change

  • No metadata is shown for webradio streams (no song title, artist or radio station) although code for this exists
  • The current mapping of the title and station data leads to the station data being shown in the mainLabel in the Headerbar of Elisa (where the track title is usually shown)

Findings / details

Metadata usage is not standardized in webradio streaming out there and feels a bit "messy" when different webradio stations are compared.

AAC and MP3 streams

The majority of streams out there falls in this category. These streams usually set the nowPlaying and title metadata. The title metadata is the radio station title / description, not the song title. The single nowPlaying metadata string contains both artist and song title. This is not a behaviour of libvlc, but instead of mp3/aac streams generally, because artist and song title are transmitted in 1 single string in the raw stream. See screenshot of wireshark analysis below. Separating artist and song title is not possible because there's no rule how they are concatenated: Some stations use " - ", other " by " or " / ".
This code change puts the artist-and-songtitle-string in Elisa's TitleRole (so it is visible in its window title) and the radio station title in Elisa's ArtistRole. I feel that is the best trade-off.

OGG streams

Not only the content, but the used metadata fields are varying. Artist metadata field might be set or not. Title metadata can be the song title, or a single string containing both artist and song title. Probably there exist other usages as well.
This code change tries to do its best to show as much information as possible at the right place.

Test plan

The following webradio stations have been tested manually by me (VLC backend):

Name Stream URL Type Filled metadata Result / visible labels in HeaderBar.qml-Element Comment
Trancebase FM http://listen.trancebase.fm/tunein-aac-hd AAC nowPlaying: <artist> - <song title>

title: <radiostation>
mainLabel=nowPlaying

authorLabel=title
Standard AAC/MP3 usage
WFMU http://stream0.wfmu.org/freeform-high.aac AAC nowPlaying: <song title> by <artist> on <radiostation>

title: <radiostation>
mainLabel=nowPlaying

authorLabel=title
SomaFM Underground 80s http://ice1.somafm.com/u80s-256-mp3 MP3 nowPlaying: <artist> - <song title>

title: <radiostation>
mainLabel=nowPlaying

authorLabel=title
Standard MP3 usage. Please note http instead of https.
SWR3 http://liveradio.swr.de/sw282p3/swr3/play.mp3 MP3 nowPlaying: <text> OR <song title > / <artist>

title: <radiostation>
mainLabel=nowPlaying

authorLabel=title
station pushes text messages in between song infos (switches after a few seconds)
omroep venray http://icecast.omroepvenray.nl:80/lov.ogg OGG title: <song title uppercase> - <artist uppercase> mainLabel=nowPlaying Station name missing in stream
SoCoRock http://listen.echonet.cc/socorock.ogg OGG title: <song title>

artist: <artist>
mainLabel=title

authorLabel=artist
This station gets it right! Wait until they play a regular song; no interview or live recording.

Other things

I noticed two other issues:

  1. String encoding is assumed Latin1 but seems to be UTF-8 in webradio streams.
  2. Metadata info can't be grabbed from https streams but only http streams.

Will look into those later, and separately.

Screenshot

Wireshark analysis: Artist and song title in 1 string

Bugs partially fixed

CCBUG: 467265

Edited by Manuel Roth

Merge request reports

Loading