Reputation: 1563
I am currently working on a music streaming/internet radio Android app, I really would appreciate if you could help me on this. Thanks in advance!
I can play the music but I dont know how to get information such as currently playing song,album art,etc. It would really help my app if I can get these information.
My question is, how would I know or where would I get the info on what song is currently playing? As I have noticed VLC can do it with given only a link.
Here is a screenshot from vlc.
Here are couple of links that I have tried:
http://tar.stream.dev.al:9078/listen.pls
http://84.46.147.81:80/m1/mp3
http://stream.radioeger.hu:18000/listen.pls
http://95.110.186.253:8020/magic.mp3
Upvotes: 1
Views: 6966
Reputation: 11
Most radio streams use http streaming. The compressed audio data is usually interleaved with metadata. So you will need a way to process the http stream in realtime, extracting any metadata. For Shoutcast, the metadata is part of the protocol, here is an example from streamripper:
For classic HTTP streaming, the protocol does not include metadata, but the container does. In this case you also have to rudimentarily decode the container. Again here's an example from streamripper. This one uses libvorbis to inspect the container and get the metadata. It does however have to do some magic tricks to get it right:
HTH
Upvotes: 1
Reputation: 6201
you able to retrieve audio metadata via MediaMetadataRetriever but MediaMetadataRetriever doesn't work with URL's on certain versions of Android. so, Use FFmpegMediaMetadataRetriever as a workaround, I suggest trying it out.
Upvotes: 3