I would like to use MP4 file/link in m3u8 file. The reason I would like to do this is because I would like to start m3u8 link at specific time. Is this possible?
No, HLS only supports segmented transport streams in an m3u8 playlist. You may find it to work in some players, but it is not part of the standard, and will not work in iOS.
Related
I am trying to save any m3u8 stream playlist as video to disk as 1 complete video file, similar to vlc. I can create an AVAsset and play it in an AVPlayer fine, however the m3u8 links i have tried all return false from asset.isExportable so using AVAssetExportSession does not work. I thought it might be possible opening the link as an InputStream and then writing it to an OutputStream but was lost on how to do this. Is this a viable option or will it only return the actual m3u8 file instead of the .ts video links? Any guidance in the right direction would be appreciated. I am fine doing the research on how to use the different classes, i'm just kinda lost on where to go from here.
Thank you,
Phil
Building a single video from all the streams in a m3u8 playlist may not actually give you what you want, depending on the m3u8 file.
This is because m3u8 playlists can contain multiple bit rate versions for a single video - so if you added them all together you would get the same video with different quality levels (bit rates) one after another.
Its also worth noting that some videos streams will be encrypted, in fact most high value streams such as Netflix etc will be, so downloading them will not allow you to play them back unless you do it as part of the providers own 'download and go' service.
Finally, some services may make it hard for you to access the streams by requiring some form of authentication in parallel with the video stream URL.
Assuming all the above is fine or does not apply in your case, then the video files themselves can be downloaded as files using a HTTP downloading function. Good examples of these exist such as: https://stackoverflow.com/a/35510812/334402
so I have a flash video recorder that uses Red5 media server. After recording the video, it saves an FLV file to the Red5 RTMP server. My question is, if I wanted to use just a regular free FLV player (JWPlayer) would I just use the regular player and set the video source as something like rtmp://domain.com/recorder/streams/test.flv ? Or would I set the player to use single rtmp stream with this player builder? http://www.longtailvideo.com/support/jw-player-setup-wizard?example=204 I dont know if that requires some actual streaming app in rtmp. Thanks.
I think there is no "OR" in what you could do. It results in the same thing.
If you want to stream the FLV from the server you specify an URL that starts with "rtmp".
I guess the link will just exactly do that. However you can of course also configure your FLV player manually.
I dont know if that requires some actual streaming app in rtmp. Thanks.
=> Usually FLV players can play a rtmp stream. But of course you need a Red5 server and the FLV must be available in the streams directory of the webapp. Similar to:
rtmp://domain.com/recorder/streams/test.flv
Usually you could specify the URL also with: rtmp://domain.com:1935/recorder/test[.flv]
recorder is the webapp.
test[.flv] is the file you want to stream (It might be that "test" is enough, without the .flv suffix)
no need to put "streams" into the URL to stream the video. "streams" in the default folder for the video in Red5, comparable to your FLV_VIDEO_ROOT directory of this webapp "recorder".
Can a MPMoviePlayerView play a .smi file? If not, is there any other way to play this type of file?
Unfortunaly, there's no way to play that format on iOS. It only supports mp4/m4v (h264) video format with AAC audio codec.
You should try to convert it into those supported formats.
Also, take a look at HTTP Live Streaming.
HTTP Live Streaming, FFMPEG & FFSERVER, and iPhone OS 3
I need help in converting mp3 files to Apples Http Live Streaming protocol files. I am working on a music application and wants to use Live streaming in this app.
I got this link http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/ from google but it contains how to live stream video files.
Can anybody help me with mp3 files.
Thanks
With ffmpeg you're also able to convert mp3-files only (no video).
Just use:
ffmpeg -i yourmp3.mp3 ...your arguments... output.mp3
To add to Tim's answer, HLS supports mp3 codec. So if your audio is already in mp3, all you would need is the segmenter
I would like to use a .m3u8 playlist containing remote mp4 files with MPMoviePlayerController, did you success with this ?
Does the .m3u8 must contain .ts file ?If not what is the purpose of .ts ?
Does next / previous buttons will be enable once the playlist be loaded ?
If not, what is the purpose of these buttons ?
And last question, do you have a .m3u8 sample file with remote mp4 file to test ?
Thanks a lot for your help.
Thierry
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? There is more info about HTTP Live Streaming in the documentation.
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.
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.
Apple's docs provide links to some sample test pattern streams.