Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7632481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:38:13+00:00 2026-05-31T06:38:13+00:00

Ok So i have a Live Stream from a URL using MPMoviePlayerController. Player =

  • 0

Ok So i have a Live Stream from a URL using MPMoviePlayerController.

Player = [[MPMoviePlayerController alloc] 
               initWithContentURL:[NSURL URLWithString:@"MY_URL_HERE_I_REMOVED"]];
Player.movieSourceType = MPMovieSourceTypeStreaming

Now The stream gives Meta Data (I believe thats what everyone calls it). Eg. Name of the track etc.

I want to get this information and display it on a Label.

I have no idea how to get it, I cant change from MPMoviePlayerController and after searching for hours i found MPTimedMetadata class reference but dunno how to use to get this information.

Great if you can mention how to use the notification also to trigger every time this data changes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:38:14+00:00Added an answer on May 31, 2026 at 6:38 am

    Assuming that you already know what kind of metadata is being sent from the stream (if you don’t, use a media player like VLC to see), you must first register a notification to get the metadata in timed intervals and then a method to process them.

    Starting with the notification, just

     [[NSNotificationCenter defaultCenter] addObserver:self
                                              selector:@selector(MetadataUpdate:)
                                                  name:MPMoviePlayerTimedMetadataUpdatedNotification
                                                object:nil];
    

    after the MPMoviePlayerController allocation.

    Then on 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 a NSString to store the value. The above will get the Artist and Track info of the currently playing song.

    This is the case for the standard metadata send by a shoutcast or icecast stream.
    (can’t say for others because I haven’t tried them)

    Note that each stream may handle and send different metadata.
    Since [streamAudioPlayer timedMetadata] is a NSArray you can

    NSArray *metaArray = [streamAudioPlayer timedMetadata];
    NSLog (@"%i", [metaArray count]); //to see how many elements in the array
    MPTimedMetadata *firstMeta = [[streamAudioPlayer timedMetadata] objectAtIndex:0];
    

    Use then the debug console to show the content of metadata using the key, keyspace, timestamp, value properties.

    All the above is just an example. There isn’t a single way to handle metadata.
    Detailed information can be found at

    https://developer.apple.com/library/ios/#DOCUMENTATION/MediaPlayer/Reference/MPTimedMetadata_Class/Reference/Reference.html

    for the MPTimedMetadata class reference and from there… code on!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a local URL like http://localhost:port/ with live video stream in it.
I'm using the AVFoundation classes to capture the live video stream from the camera
I am using AVPlayer to play a live stream from the Internet using the
I have a live database that had some data deleted from it and I
I'm trying to do http live streaming from VLC to an android app using
Description of my website: On my website people enter, watch a live stream from
I want to create a live-stream by using vlc on rtp, (preferably) rtsp or
I have a single key encrypted HTTP Live Stream which decodes fine in Quicktime
What would be the best way to live stream audio from an application running
I have a requirement where I need to detect human prescence from a live

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.