views:

1959

answers:

2

Hello,

I would like to use a .m3u8 playlist containing remote mp4 files with MPMoviePlayerController, did you success with this ?

  1. Does the .m3u8 must contain .ts file ?
    If not what is the purpose of .ts ?

  2. Does next / previous buttons will be enable once the playlist be loaded ?
    If not, what is the purpose of these buttons ?

  3. And last question, do you have a .m3u8 sample file with remote mp4 file to test ?

Thanks a lot for your help.

Thierry

+1  A: 

Since you're talking about .m3u8 and .ts files, can I assume you're interested in HTTP Live Streaming, as supported by iPhone OS 3.0 and Snow Leopard? If so, start by RTFM.

  1. In HTTP Live Streaming, the .m3u8 file lists other files that are to be downloaded and played in order. If the .m3u8 file doesn't contain an #EXT-X-ENDLIST directive, then the client assumes the source is a live stream, and periodically re-fetches the .m3u8 to find new media files to download. The .ts files are MPEG-2 trasnsport stream files that contain muxed audio and video (despite the fact that the transport stream is part of the MPEG-2 spec, the contents should be H.264 and AAC, the audio and video codecs usually associated with MPEG-4). You sometimes see other contents, like .aac for audio-only streams. A server will segment a video stream into many .ts files, the .m3u8 file will provide URLs for these .ts files, and a client will download and play the .ts files in order. As an iPhone developer, all you have to do is provide the .m3u8 URL to the MPMoviePlayerController, which will handle the rest.
  2. Don't know about the prev/next buttons... don't seem like they'd make sense in a stream context, and I'm not sure whether the the MPMoviePlayerController even shows them. You can use the movieControlMode property to set what controls are offered to the user.
  3. Apple's docs provide links to some sample test pattern streams.
invalidname
A: 

A follow up on this: unfortunately it is well documented that MPMoviePlayerController will only play full-screen in OS 3.1, so iPhone users are stuck watching the video (listening to audio, in my case) and can't navigate in the application. I haven't found a way to stream via m3u8 like you can, for example, using Matt Gallagher's code and an mp3...

any ideas on how to include a m3u8 player that will play embedded?

thanks!

Antonio
Better ask this as a new question (it's not an answer to this question). More people would see it this way and try to answer.
sth