Hi Brothers in arms 🙂,
issue:
I have to improve the start delay of a live hls stream.
I currently use MPMoviePlayerController and tested the stream with AVPlayer, and several other third party players as well...
(I know the that i should use AVPlayer since iOS 9.0 but i currently like the MPMoviePlayer and am using iOS 7... but i'll get to the AVPlayer soon... )
The stream starts after 12 - 17 sec. and runs normally, the problem is, I need it to start it in 2s - 4s, that would be great.. 😁
... thats the delay i get from a Browser on my MAC starting the same hls stream.
The problem is, when the user starts the stream, the .m3u8 playlist will be than generated (real-time) with curerrently 2s .ts segments.
(and of course I (tried to) improve(d) the generated .m3u8 playlist with various target durations/ encodings/ different Bitrates/ etc. etc.)
While observing event logs and KVO (AVPlayer) I realized that both the AVPlayer and the MPMediaPlayer need to buffer at least 10 sec. of video material in order to start streaming ... (...that 10s are available when 10s in realTime pass... )
... but using a LIVE Video and seeing always the past is some kind of annoying to the users ... (I know that some delay is ok, but up to 17 sec. is too much)
question:
1)
So my question is, can I somehow force one of that great Stream Players to start the stream immediately (after a timeout of 2 - 4 sec.)?
Bypass the buffering process of the Player itself... etc...
(Yes i also tried to load the .m3u8 playlist asyncron with AVPlayerItem/ AVAssetResourceLoader and than start when ready ... same delay.
... the player needs his 10sec... 😝 )
2)
Or do I have to change my strategy and switch to RTP/RTSP streaming techniques ... but than I'd be forced to use a third party Player, right?
Do I have to face a App rejection if I use another streaming technique like RTSP with a third party player, or will that app still bw approved without any problems on that part?
3)
Do you have some tip or advices... I'm all ears!
Thank you for your time! 🙂