HLS M3U8 and iOS9

Hello, I have a problem with playing M3U8 streams in a new iOS 9 Swift project. I developed app for Windows and Android and all streams work normally, but all these streams do not work using AVPlayer, because these streams are 3rd party streams I can't change any settings from server side. I decided to find 3rd party library and found Vitamio. But it is not easy to add Vitamio library to Swift project, as a warkaround I added via Cocoapods player called DFVideoPlayer with Vitamio. This DFVideoPlayer with Vitamio can play M3U8 streams but not all and this player have very poor performance, CPU load at 60-70% and video and audio out of sync and dropped frames.


So my findings:

AVPLayer can play this test stream http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 but can't play all other streams which I use in my win and android app, for example http://tv.life.ru/lifetv/720p/index.m3u8,http://j.mp/B_RTDOCHD_sly?.m3u8


DFVideoPlayer plays this test stream http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8with poor quality and plays http://tv.life.ru/lifetv/720p/index.m3u8 with video and audio out of sync and dropped frames and with very high load of CPU 60-70% and can't play this stream http://j.mp/B_RTDOCHD_sly?.m3u8


So there is on iOS 9 no good solutions to play all M3U8 HLS streams or may be I do not know, please give my advise.

I was able to play these streams on OS X and on an Apple TV (3rd Gen), so I don't understand why you say they won't play. Perfhaps you were trying to play back on an older devices that doesn't support the resolution?


I would not advise using a third-party client on iOS. If the stream doesn't play with the native support then there is something wrong with the stream or with your code.


If someone is providing a playlist like these that is a single bitrate, a useful thing to do is to create a master playlist that refers to the playlist. This is a tiny load on the server providing the master playlist, since that will be fetched only once per playback. It also allows you to specify the CODEC, RESOLUTION and BANDWIDTH which enable devices to make more sensible decisions about what they can play.

HLS M3U8 and iOS9
 
 
Q