I'm streaming an mp3 file using MediaPlayer
mp.setDataSource(myContext, Uri.parse("http://my_song.mp3"));
mp.prepareAsync();
mp.setOnPreparedListener(mpOnPreparedListener);
mp.setOnBufferingUpdateListener(mpOnBufferingUpdateListener);
Any idea about how I can read the ID3 tags from this stream using android API or any alternative methods?
If you want to view and edit ID3 audio or MP3 tags in VLC Media Player, then it has been really made simple. The quickest way to view/edit it is by using the CTRL + I shortcut key on your PC or by navigating to Tools > Media Information.
How do I find my ID3 Tag? Your ID3 tag can be found by first going into iTunes, then selecting a specific song. From here, right click the selected song and select "Get Info". After you have opened this, a dialog box displaying the information will appear.
An ID3 tag is a type of metadata container used to store information into a media file (traditionally an MP3 audio file). The ID3 tags could include a title, an album title, the artist (author), genre, cover art, the year recorded and other details that are useful for the listener of your show.
ID3 tags are metadata stored within MP3 files that contains information such as; the title of the podcast or episode, the artist, and an image artwork for the episode. There are two versions of the ID3 tags. ID3v1 contains only basic, text-only, information and it's placed at the end of the audio file.
You can get all of this using MediaMetadataRetriever
MediaMetadataRetriever mmr = new MediaMetadataRetriever();
mmr.setDataSource(filePath);
String albumName = mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM);
you can get all other tags by using this class. I hope this would help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With