简体   繁体   中英

Can I stream an MP4 video of duration > 10 minutes on 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 :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM