I noticed that when I play the same stream in live or in DVR mode (with or without ?DVR parameter in the streaming url), the latency is higher in DVR than in live.
In live, the latency is around 30 seconds, which is what I expect since I have a playlist with 3 chunks of 10 seconds each.
When I read the same stream in DVR, the latency is around 50 seconds (same chunk duration :
dvrChunkDurationMinimum = 10000).
When I compare the 2 chunklists at the same time, I see that the last sequence number in the DVR chunklist is lower of 2 than in the live chunklist. The DVR chunklist seems to have a delay of 2 chunks compared to the live chunklist !
Is there a way to get the same latency in DVR than in live ?
Live content heads through the network directly to the player. nDVR has to write the live content to disk, ensure that enough content is there to create an HLS chunk list, and then read from it. nDVR will always be behind live.
If you have not done so already, please take a look at our article on advanced nDVR configuration. You have already looked at at “dvrChunkDurationMinimum.” Make sure that value is the same as your “cupertinoChunkDurationTarget” is, that your keyframe distance is always the same from your encoder, and that you have your chunk durations equal to at least 2x your keyframe distance.
That value controls how many chunks to hold back putting in the chunklist. You can set it to a minimum of one. The default value is 3 and then when it creates the chunklist, it holds back 1 less (so 2). By setting it to 1, it will hold back 0.
We also have an article on how to lower HLS latency which should help with latency from nDVR.