iOS requirement for live steaming - ios

I'm working on the live streaming app like Periscope and doing research on requirement and restriction on iOS.
I found out that Apple only allows HLS (Http Live Streaming) for certain conditions. I found such conditions below from apple site.
If your app delivers video over cellular networks, and the video exceeds either 10 minutes duration or 5 MB of data in a five minute period, you are required to use HTTP Live Streaming.(https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html#//apple_ref/doc/uid/TP40008332-CH102-SW5)
But I'm not sure that HLS should be used for both publishing and watching video or only for watching is acceptable? Because i thinking of using RTMP for publishing and HLS for watching.

I wrote an app similar to periscope that is on the app store now and it can use 2Mbps and connects via RTMP protocol to send the data. So my guess is they no longer enforce it. I also beleive that at the time that that was written cell service load was possibly to high and they were hoping that HLS would help with that would be my guess. Now with 4gLTE it can handle the loads a little better. Again that is just a guess. My app went up with no problem or mention of that and the review team was more than aware what the app did.

Related

How to upload video chunks to server and download them in real time in iOS

I'm creating an iOS app where I want a user to be able to live stream a video, however, users who join the live stream after it starts, start watching the stream from the beginning instead of live (I will also add functionality that allows the user watching to skip ahead and then be able to watch live).
I have looked at many third party streaming options such as Agora, Twilio, Vimeo, etc, however, I don't believe they meet my needs as I need users who join the live stream to start watching from the beginning and not live.
I have explored continuously uploading small video chunks to something like firebase storage, and then continuously reading those chunks for users watching the stream. However, as explained here: https://stackoverflow.com/a/37870706/13731318 , this is to very efficient and leads to a substantial lag.
Does anyone have any idea how to go about doing this that leverages third parties?
I think you can use the HLS protocol to implement this.
HLS allows starting to watch from the beginning or not. That is controlled by the settings.
I am not sure about uploading because I think it has to be implemented on the server-side more.

Streaming live video from iOS using HTTP

I have read about HTTP Live Streaming from Apple. So far I understand that it was created for streaming video to iOS devices. But is it possible to use this approach to stream from iOS device while recording on camera? If so can you give me a clue or tell how to do it?
It is possible, yes. But I would not recommend it. HLS is a pull based protocol. Good for delivering to clients, but bad for ingesting. Would need to run a web server on the device, and package the media into a transport stream. Its a lot of effort that is easier to handle on the server.

Playing youtube videos with progressive downloading

My application has a custom video player which should be played with youtube links (just to save me the hassle and money from making my own server side and stream videos from there).
Here are some facts that I believe are true:
Youtube prohibits any use of custom players except UIWebView and MPMoviePlayerController.
Youtube doesn't share rtsp links for iOS devices, so I'm left with progressive downloading.
Apple clearly states in the documentation that progressive downloading is possible only for small clips (under 10 minutes or 5MB/5min ratio).
I've downloaded the application 'iTube' which allows you to watch youtube links with playlist control in the device. I was wondering how did they make it work for them. The app obviously uses progressive download as it downloaded 30MB after I've watched ~1 minute of the video (over 3G).
Question: Does Apple allow applications to break the policy of progressive download when youtube links are involved (because youtube doesn't offer any alternative)? or is this application just went under Apple's radar?
Thank you
OK as it turns out, this application just slipped under Apple's radar.
I've asked this question in the developer's forum and got the answer from one of Apple's employees:
You would have to disable downloading over cellular if the clip is over 10 minutes.
I'll forward this to the app review people.
The question I've asked is here: https://devforums.apple.com/message/966814#966814
(You need developer account to get in there)
Thanks all
If your video longer than 10 minutes, you need to use HLS streaming for your apps. For example you can upload your videos to http://int10h.com get HLS link and stream. Good luck

Is RTSP allowed on iOS or one MUST use Http Live Streaming instead?

Apple Http Live Streaming Overview document clearly states that streaming videos exceeding 10 minutes cannot be downloaded progressively and MUST be transferred using Http Live Streaming(HLS). It also states that the latency of HLS is in the neighbourhood of 30 seconds.
In my case, I am building an app that needs to receives live steaming videos in almost real-time. So on one hand I must use HLS for real time streaming but it is not fast enough. On the other hand I can not use anything else because it seems anything other than HLS is not allowed. I know RTSP is possible on iOS but will it be approved by the App Store?
Cheers,
M.
Apple is not transparent. The only way to know if an app will be rejected or accepted is to submit it.

How to use HTTP Live Streaming protocol in iPhone SDK 3.0

I have developed on IPhone application and submitted to App store. But my application got rejected based on below criteria.
Thank you for submitting your yyyyyyyy
application. We have reviewed your
application and have determined that
it cannot be posted to the App Store
at this time because it is not using
the HTTP Live Streaming protocol to
broadcast streaming video. HTTP Live
Streaming is required when streaming
video feeds over the cellular network,
in order to have an optimal user
experience and utilize cellular best
practices. This protocol automatically
determines bandwidth available to
users and adjusts the bandwidth
appropriately, even as bandwidth
streams change. This allows you the
flexibility to have as many streams as
you like, as long as 64 kbps is set as
the baseline feed.
In my apps I have to stream prerecorded m4v and mp3 files from my server. I used MPMoviePlayerController to stream and play those videos / audio.
How to implement the HTTP Live Streaming Protocol in my apps? Also can I get some sample code?
Thanks in advance!
There are many documents about Apple's HTTP Live Streaming:
HTTP Live Streaming Overview
IETF HTTP Live Streaming Internet-Draft
There are many encoder devices claim to support this protocol e.g.,
Inlet's Spinnaker, acquired by Cisco and renamed to Cisco Media Processor Family.
For a software solution, please give a visit to Wowza
Please check the below notes specified in Apple documentation.
****Important: iPhone and iPad apps that send large amounts of audio or video data over cellular networks are required to use HTTP Live Streaming.****

Resources