I'm trying to understand the "chunked" aspect of HTTP Live Streaming a static video file to an iOS device. Where does the chunking of the video file happen?
Edit: from reading HTTP LIve Streaming and a bit more of https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-07 it sounds like the video file is split into .ts segments on the server. Or the m3u8 playlists can specify byte offsets into the file (apparently using EXT-X-BYTERANGE
).
Here's what I understand of this process after reading Apple's HLS description and https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-07:
m3u8
playlist to the media player (MPMoviePlayer
or similar) in my app.My understanding of this process is incomplete (and perhaps incorrect). Any additional info is much appreciated.
What are you asking for?? Info??? -The app is not reloading the index but playing it... using the M3U8 file that switches the correct encoded file. That way you only have to make a connection between the mediaPlayer and the "Manifest File" for example...
NSURL *fileURL = [NSURL URLWithString:@"http://techxvweb.fr/html5/AppleOutput/2012-03-10-j23-dax-smr-mt1-m3u8-aapl.ism/manifest(format=m3u8-aapl)"];
moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
/* Inset the movie frame in the parent view frame. */
CGRect viewInsetRect = CGRectInset ([self.view bounds],0.0, 0.0 );
[[moviePlayerController view] setFrame: viewInsetRect ];
[self.view addSubview:moviePlayerController.view];
[moviePlayerController play];
where the NSUrl is the url to your manifestFile... note that I'm adding:
/manifest(format=m3u8-aapl)
to the original manifest file, what parses the "ISM" file to the correct M3U8 syntax
NSURL *fileURL = [NSURL URLWithString:@"http://techxvweb.fr/html5/AppleOutput/2012-03-10-j23-dax-smr-mt1-m3u8-aapl.ism/manifest(format=m3u8-aapl)"];