Reduced latency to iOS and cupertinoChunkDurationTarget

So like a lot of other people, I’m trying to get the latency down as low as possible on iOS for a live stream (not recorded). I’ve been looking at samples here and understand to this point that the key is messing with cupertinoChunkDurationTarget and the keyframe setting. I’ve read that Apple’s recommendations for the chunk duration is 10 seconds, but I have 2 questions.

  1. What is the downside (what negative results will I see) from setting cupertinoChunkDurationTarget = 1000 and a keyframe of 1 second? Aside from the horsepower for encoding and increased BW needed to provide the source stream, what am I going to see on the viewing side by reducing these values. Is that the reason for the stream sometimes freezing? I guess I’m trying to learn more about the consequences of reducing the chunk duration.

  2. Remeber I am discussing a live (not recorded stream here). I have been able to see latency below 10 seconds as others have mentioned if I start with a source that is 320x240, 10fps, 1 second keyframe. However if I start with a source stream that is 640x480, the latency is up in the 20+ second range. The question is, does it make sense to attempt to have the server transcode the source down to 320x240 and then have it converted to stream to iOS to help keep the latency down? Or is it that by the process of converting it down to 320x240, then chunking it, I’m introducing more delay than I could save by sticking with a source of 640x480? I tried testing this and I think I configured it correctly, but the delay was the same 20-30 seconds. What are my options here if I want to stick with a 640x480 source stream?

Thanks!

Hi

When reading through the article here,

https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming

I noticed this,

Note: Chunks must start on a key frame. So it is best to use a key frame interval that is factor of the cupertinoChunkDurationTarget setting. For instance if cupertinoChunkDurationTarget is set to 10 seconds then use a key frame interval of either 2, 2.5, 5, or 10 seconds.

Its apparent that you have read through this article already, so if you have kept to these recommendation then you should be fine.

  1. I think that your steam freezes because cupertinoChunkDurationTarget isn’t high enough,

  2. The transcoder will add some delay to the to the stream as it needs to process the live stream before sending it out in a lower bitrate.

If you get the same delay results from transcoding the stream as you do when not transcoding the stream then this appears to not be effective for you at this point, However I still don’t know your current configurations.

Could you post the configuration that you have come up with so we can have a look to see if it can be improved…?

Jason

Hi Jason,

I have been trying to get the lowest possible latency for http live stream into iPad. The delay is now below 5 sec for the streams with a frame rate 3 and above. I have set the key frame rate to be 1 in all cases.

The properties I have set are:

cupertinoChunkDurationTarget

1000

Integer

cupertinoMaxChunkCount

4

Integer

cupertinoPlaylistChunkCount

3

Integer

The index file I receive in this case is

#EXTM3U#EXT-X-VERSION:3#EXT-X-ALLOW-CACHE:NO

#EXT-X-TARGETDURATION:1#EXT-X-MEDIA-SEQUENCE:4002

#EXTINF:1,media_4002.ts?wowzasessionid=1339164348

#EXTINF:1,media_4003.ts?wowzasessionid=1339164348

#EXTINF:1,media_4004.ts?wowzasessionid=1339164348

and the video is fine.

However, when the frame rate of the stream is below 3, the video get stuck and some times go back and forth in time

The index file in this case (frame rate 1) is

#EXTM3U#EXT-X-VERSION:3#EXT-X-ALLOW-CACHE:NO#EXT-X-TARGETDURATION:3#EXT-X-MEDIA-SEQUENCE:5552

#EXTINF:3,media_5552.ts?wowzasessionid=22787889

#EXTINF:1,media_5553.ts?wowzasessionid=22787889

#EXTINF:3,media_5554.ts?wowzasessionid=22787889

Similar output is observer even if I set cupertinoChunkDurationTarget to 10 secs.

How can I get good video quality in lower frame rates?

Regards,

Manu