HLS stream and save Partially - Swift - ios

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)

Related

How to broadcast wowza video from one iPad to multiple iPad devices - swift

I want to broadcast existing videos to multiple users through wowza...
Suppose I want to broadcast any 1 uploaded video (in wowza server) to my multiple users? so how can I do that.. can wowza call any API to start streaming in other users devices? Means when I started streaming video from my application then it should start in other devices also through wowza API.
Are you talking about broadcasting (streaming) an MP4 file as a simulated Live stream (playout) or as Video On Demand (VOD)?
Obviously you cannot force devices to start playing a stream. That'd only work if you develop an App that can listen for commands and trigger playback accordingly. Wowza doesn't have such an App, nor any built-in features that can do this.
If you want devices to access a stream on-demand you can simply upload the file to Wowza's content folder. If you want to have a programmed playout, like a TV channel, then you can check out this article: https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher
(the source code of the plug-in that is used in that article is available from https://github.com/WowzaMediaSystems/wse-plugin-streampublisher)
As from your Question, You can broadcast stream successfully and you might have used Wowza Go Coder SDK for doing it.
On Broadcasting live stream, broadcasted videos stored in CONTENT directory which is inside of Stream Engine installation directory structure.
You can find all the streamed videos in it.
Now, You want to broadcast particular stored video then you can do it by loading specific URL for that video. Broadcasting for that Video is not possible but, you can play that particular video as below which will be accessible to all your application users :
In IOS, Link or URL for Videos stored in CONTENT directory is as below :
http://[Host Address]:[PORT]/vod/mp4:sample.mp4/playlist.m3u8
rtsp://[Host Address]:[PORT]/vod/sample.mp4 (In Android)
Here, sample is the name of your Stream. You have to broadcast live stream video with different stream names so that all videos are accessible.
In this way, you can play stored live stream videos.

How to download a encrypted m3u8 in iOS. Even if would able to download I could not able to play the encrypted video in offline mode

In earlier case of my I have played non encrypted .m3u8 video in offline mode
I have download a .m3u8 extension video file which is not encrypted
and I have played that video.
This video is download in the formate of .movpkg extension format.
I have download this video using AVAsset download Session
But in the case of encrypted video
I can download the .m3u8 extension video and this video get saved in extension of .movpkg
The issue rise when the saved video is played without any internet connection I know this reason for this because the decryption key is not available for it. So that video can decrypt and play in player level it self
Is there any possibility to play the saved video file without using internet(offline)
Do I need to use the apple fair play concept to play m3u8 video?
if so how can implement it in server side?
Have anyone used apple fair play concept?
How can implement the fair play concept in the FFmpeg Convertor?
Is there any method to override the key delivery mode in AVPlayer?

IOS Live streaming

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.

Is there a way MPMovieplayerViewController can detect if video is a stream?

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.

How to play an in downloading progress video file in IOS

I'm assigned to implement a iphone app that can download video files from a server, and to play that video while the video file is written to the disk; something likes
(Movie player)<--read--[###### iphone flaskdisk ######]<--write---(Downloader)
I know that I would use HTTP video streaming play a remote video stream, but what i need is the video file is saved in flask mem after playing.
Any suggestion?
Thanks
If you know how to play a video from a URL, you can easily play the video while simultaneously download the video on another thread (if you are short on time)...
Alternatively, you can create your own video player that handles this function. Application sin the App Store do already do this (check out any video downloader application)
Thanks!

Resources