Assuming that you already know what metadata is sent from the stream (if you do not, use a media player such as VLC), you must first register a notification to receive metadata at time intervals, and then the method for processing it.
Starting from the notice, just
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MetadataUpdate:) name:MPMoviePlayerTimedMetadataUpdatedNotification object:nil];
after allocating MPMoviePlayerController.
Then in the MetadataUpdate method
- (void)MetadataUpdate:(NSNotification*)notification { if ([streamAudioPlayer timedMetadata]!=nil && [[streamAudioPlayer timedMetadata] count] > 0) { MPTimedMetadata *firstMeta = [[streamAudioPlayer timedMetadata] objectAtIndex:0]; metadataInfo = firstMeta.value; } }
where streamAudioplayer is your MPMoviePlayerController and metadataInfo is NSString to store the value. The above information will contain information about the artists and tracks of the current song.
This refers to sending standard metadata to a shoutcast or icecast stream. (I can not say for others, because I have not tried them)
Please note that each stream can process and send different metadata. Since [streamAudioPlayer timedMetadata] is an NSArray, you can
NSArray *metaArray = [streamAudioPlayer timedMetadata]; NSLog (@"%i", [metaArray count]);
Use the debug console to display metadata content using keys, keys, timestamps, value properties.
All of the above is just an example. There is more than one way to process metadata. Detailed information can be found at
https://developer.apple.com/library/ios/#DOCUMENTATION/MediaPlayer/Reference/MPTimedMetadata_Class/Reference/Reference.html
for reference to the MPTimedMetadata class and from there ... the code on!