Can I stream an MP4 video of duration > 10 minutes on iOS - ios

I'm building an app that is playing different streaming videos. The file that I'm playing in my AVPlayer object is an MP4 file.
Reading through the App Store Review Guidelines I just noticed that the rule 2.5.7 says:
Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 192 kbps HTTP Live stream.
What does this mean exactly? Can I stream an MP4 video which is longer than 10 minutes?

If your MP4 video is less than 10 minutes then presumably you can just put it on a server somewhere and have the player download the file (progressive download) - you don't need to use a streaming protocol like HLS. However, if your video is more than 10 minutes then you must use HLS. This means segmenting your video into chunks and creating a playlist for them. You can do this with Apple's streaming tools - such as mediafilesegmenter - or you can use ffmpeg to segment your videos.
That guideline is for cellular networks only, so it doesn't apply if the user is connected via wifi. Take a look at Apple's recommendations for encoding your video(s) for HLS.

It explicitly says you CAN play a video longer than 10 minutes. However, the guidelines say your app will be rejected if it doesn't meet the requirements stated.
Admittedly I've never attempted a 10 minute video playback, but from the documentation it seems to imply your media must allow 192 kbps playback (presumably for cellular data plans) and also must conform to the HTTP Live Stream protocol.
Here is the technical documentation Apple provides on HTTP Live streaming
https://developer.apple.com/library/ios/technotes/tn2224/_index.html
Best of luck! Please let me know if I can help with anything more specific :)

Related

Is it necessary to provide "Audio-only" stream when I use HLS(Http live streaming)?

I read this document and I'm not sure I need to add audio only stream.
https://developer.apple.com/library/content/qa/qa1767/_index.html
App store review guideline was changed like following.
Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 64 kbps audio-only HTTP Live stream
=> Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 192 kbps or lower HTTP Live stream
When I have a audio-only stream, and user entered that stream, It looks bug, because there is still image. And It is little bit late recorvered from that stream.
So I just want to prepare minimum bitrate with video(video 100Kbps, audio 92Kbps).
Is it possible to use 192kbps video for minimum bitrate without audio-only bitrate?
Thanks.
Apple basically moved the answer to that into the linked Technical Note TN2224.
If your app uses HTTP Live Streaming over cellular networks, you are required to provide at least one stream at 192 kb/s or lower bandwidth. The low-bandwidth stream may be audio-only, or audio with a still image, but you should strive to have video in your 192kbps stream.
You should be fine now if your lowest stream is according to their restrictions and it must no longer be audio-only.

iOS requirement for live steaming

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.

AVFoundation, limiting video streaming playback to WiFi only

I'm developing a player using AVFoundation. The source videos I have no control over but they certainly violate:
https://developer.apple.com/streaming/
REQUIREMENTS FOR APPS
...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. (Progressive download may be used for smaller clips.)...
I'm talking mp4 videos that are 100Mb+ for 3 to 5 min clips.
Again, 0 control over the source material but I have to play them.
Looking at AVFoundation, none of the classes I'm using, AVPlayer, AVPlayerItem, AVQueuePlayer and so on have a similar property to a NSURLSessionConfiguration's .allowsCellularAccess (at least that I can see)
So agreement with the client was to limit the streaming to Wifi only, but I see no way around at the moment to force streaming over WiFi only.
Any pointers on how to get around it?
Any help is MUCH appreciate

Streaming audio: HTTP Live Streaming a must for app store approval?

I'm on the eve of submitting an app to the store that streams audio over cellular and Wi-Fi, and realizing that the app may be in danger of getting rejected.
The app is for a radio station with an existing streaming architecture, and setting up the HTTP Live Streaming protocol would add a fifth and sixth stream to the mix -- potentially a very complicated setup. So, to minimize complexity on the station's end, the app code currently uses the iphone_radio open-source library to get the streams to work. According to the creator of that library, it is used in an app that is in the store, Radio Javan.
A quick Google finds many different rejection cases for video streaming, but few if any for audio. Apple's policy on HTTP Live Streaming is not very clear about audio:
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. (Progressive
download may be used for smaller clips.)
If your app uses HTTP Live Streaming over cellular networks, you are
required to provide at least one stream at 64 Kbps or lower bandwidth
(the low-bandwidth stream may be audio-only or audio with a still
image).
These requirements apply to iOS apps submitted for distribution in the
App Store for use on Apple products. Non-compliant apps may be
rejected or removed, at the discretion of Apple.
One line that jumps out, though, is the 64 Kbps. The current streams are 128 Kbps, though dropping them down to 64 Kbps is relatively trivial compared to switching them to HTTP Live Streaming.
Is it even worth submitting the app to the store as-is (128 Kbps streams), or am I pretty much guaranteed to get rejected for not using the Live Streaming protocol? What about if I drop the streams down to 64 Kbps?
From App Store Review Guidelines :
9.3 Audio streaming content over a cellular network may not use more than 5MB over 5 minutes
9.4 Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 64 kbps HTTP Live stream.
https://developer.apple.com/appstore/resources/approval/guidelines.html#media-content
So App Store Guidelines doesn't set requirement for AUDIO stream to have 64 kbps HTTP Live stream.
According to this there is no even requirement to use HLS unless audio stream uses more than 5MB over 5 minutes data.
I have an app in the store with http live streaming for audio only. No problems from apple on approval, but we use 48kbps streams only.

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.

Resources