Posts

Post not yet marked as solved
0 Replies
1.1k Views
I have an app which can play video HLS streams.HLS master playlist contains redundant steams to provide backup serviceLooks like this:#EXTM3U#EXT-X-VERSION:3#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000,RESOLUTION=638x480https://example.com/playlist.m3u8#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1564000,RESOLUTION=638x480https://example.com/playlist.m3u8?redundant=1#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1564000,RESOLUTION=638x480https://example.com/playlist.m3u8?redundant=2#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1564000,RESOLUTION=638x480https://example.com/playlist.m3u8?redundant=3#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=400000,RESOLUTION=638x480https://example.com/playlist_lq.m3u8#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=400000,RESOLUTION=638x480https://example.com/playlist_lq.m3u8?redundant=1....#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=400000,RESOLUTION=638x480https://example.com/playlist_lq.m3u8?redundant=5So, I decided to test out how this setup will fly in case of a bad network scenario. For this, I used network link conditioner's 3G preset, which provides 750kbs of download bandwidth. Naturally I expected relatively smooth playback of 400kbs video but alas, it took 60 seconds to fully load test clip (800kb total size).What I noticed is that AVPlayer sends requests for all listed redundant playlist (and I have 5 for each bandwidth). If I remove them and keep only 1 media-playlist per bandwidth - video loads in 10 seconds and plays without hiccups.It looks like AVPlayer try to process all redundant links in parallel with main video load and chokes hard.Is there any way to restrict this behavior of AVPlayer and force him to go for redundant streams only in case of actual load error?Any idea why it tries to load all of them? Maybe some HLS tags can help?Also it sometimes display errors like this in console:{OptimizedCabacDecoder::UpdateBitStreamPtr} bitstream parsing error!!!!!!!!!!!!!!And I cant find much info about it
Posted
by Yodo.
Last updated
.