I'm making an iOS video player application that gets a whole bunch of URLs of videos from a web service and plays them in an MPMoviePlayerViewController.
Most of the videos are just .mp4 or .mov files, but some of them are live HTTP streams. The only thing I have is a URL and those don't indicate whether it's a file or stream.
Since I'm using MPMovieControlStyleNone and my own video controls, I need to be able to detect whether or not a video is a file or a live stream in order to change my controls.
Is there any way I can detect that?
Use an HTTP HEAD request. If the Content-Type is application/vnd.apple.mpegurl, then it's an http live streaming stream.
Related
I am streaming m3u8 url in an iOS application.
I am referring Apple HLS Catalog sample application.
I could stream and add offline the url.
Also playing from the offline is possible.
Is it possible to stream and save the video partially (eg:- user trying to stop the video, I need to save up the user cancelled part)
So i'm trying to play HLS streams on HTML5 without using Flash. We've tried many video players but they all relay on a flash player. My question, is it possible to play HLS streams (any) on HTML5 without using Flash?
(I know of the https://github.com/RReverser/mpegts but it doesn't work on mobile and is pretty laggy.)
m3u8 file is for live streaming. so please play your url in AVPlayer
https://developer.apple.com/streaming/
Currently in our iOS Application, we are downloading the video and then playing it, which is indeed taking a lot of time and killing the user experience. Now, we want to shift to directly stream the video or play the video while it is downloading.
I have tried using AVAssetResourceLoaderDelegate. I doesn't play the video at all and displays the mime type as text/html. Maybe because I am loading from a secured URL with headers.
Can someone suggest me a good way where I can stream or Play the video while downloading it. Would be glad if someone suggest a way to Stream the video's directly from the URL.
Problem:
I need to download mp4 video from media server and simultaneously feed the localhost httpserver (GCDWebServer) to enable video streaming.
What have i tried so far:
I am able to download a video file from media server and then provide the localhost url for streaming the video.
But this takes a lot of time in downloading. So i wanted to know if there is a way i can segment the video on the fly and keep updating the m3u8 file as and when my next segment is ready.
Ok, Why downloading? Basically i need to deal with a custom encrypted video file. So i need to download, then decrypt the stream and then feed to my local httpserver.
I hope i'm clear in the requirements.
I have a bunch of MP4 files on S3. Is it possible to stream MP4 video content onto iPhone directly from S3? If so, how can I do this? If I can't do this, what options do I have for streaming video to iPhone? (e.g. run HLs streaming server on EC2? pseudo-streaming or progressive media download?)
Cloudfront can stream video but apparently only using RTMP protocol which is not supported natively by iOS. I'd like to stream natively (make things easier). Thanks all.
You can stream, but the video file must be segmented into .ts files and an .m3u8 file that lists the segments. See https://developer.apple.com/streaming/