Search code examples
androidshoutcastinternet-radiomediaextractor

Get the icy-meta using the android.media.Extractor


Is it possible to get the icy-meta from streaming data using android.media.MediaExtractor?

I want to get the artist and title.


Solution

  • Android's MediaExtractor does not demux SHOUTcast-style ICY metadata. You will have to request it and demux it yourself before decoding the audio data.

    Additionally, the metadata does not specify fields. There is only StreamTitle and StreamURL. The StreamTitle field is usually in the format of Artist - Title, but not always. It is up to the station to determine the format of that field.

    The StreamURL is generally left blank, and doesn't typically exist in the case of Icecast streams.