androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.69k stars 404 forks source link

Incorrect display of tags in the Kazakh alphabet (Cyrillic) #930

Open nobef opened 10 months ago

nobef commented 10 months ago

Version

Media3 1.2.0

More version details

All players on Android and even Windows have such problems. Tags are misunderstood

Devices that reproduce the issue

Everywhere

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

If you play such radio stations 1 2 and wait for the name in Kazakh, then instead of letters there will be incomprehensible symbols

Expected result

//

Actual result

image

Media

https://stream.beufm.kz/beufm https://icecast.ns.kz/radions-kz

Bug Report

marcbaechinger commented 10 months ago

These а look like HTML entities for cyrillic letters to me that these channels put in their stream title of the ID3 tags of their MP3.

When I try

 ffprobe https://stream.beufm.kz/beufm

it gives me the same text output than you get

Input #0, mp3, from 'https://stream.beufm.kz/beufm':
  Metadata:
    icy-br          : 192
    icy-genre       : POP KZ
    icy-name        : Beu FM
    icy-pub         : 1
    icy-url         : www.beufm.kz
    StreamTitle     : Ғазизхан Шекербеков - Қайдан ғана жолықты&#11

From what I see in ID3Decoder here, I'd say that both ExoPlayer and ID3 supports UTF8 or UTF16 for text frames. From this I think it's correct that the strings you get from the player do not resolve HTML entities but give you the raw text.

Obviously, you can't change the streams that you don't own. Best would be they use unicode instead of HTML entities. I think you can either use an Android view that supports displaying HTML text with entities, or then you can convert them to normal text that you can use with your UI. This is the first hit of a Google search for this: https://stackoverflow.com/a/42816458