Current experiments show that sometimes assembling key frames can take ~0.5 size of the jitter buffer size (~80ms in case of 150ms jitter buffer for HD-video streaming). This results in buffer underruns, missing key frames (which results in video tearing) or even rebufferings.
Current version is designed with issuing ahead 20 interests for each frame, regardless of its' actual size. In case of HD-video, key frames were ~30 segments and this mean that assembling time for keyframes will be even larger, as pipeliner not getting all the necessary interests for the first interests' bulk.
In order to deal with this problem, the following approach is proposed:
- choose dedicated namespace prefix for key frames;
- calculate the average size of key frames (in segments number);
- issue ahead 1.25*average_keyframe_size interests for each keyframe;
- in order to issue interests ahead of time, numeration for key frames should not be coupled with delta frames numeration (though it should be possible to map key frame number onto regular key number scale);
- fetching can now always start with the key frame.