Low Latency mode

You can configure KlvInjector to work in low latency mode.

Here are some recommendation on the configuration parameters that will help you to achieve the best results:

  • Setting LowDelayMode property to true, both in Injector SDK and in Player SDK - this is expected to reduce at least one frame delay end to end (33msec if 30 fps)
  • Encoding parameters should use ProfileWr.Baseline.
  • Scaling (in player and optionally in injector preview) should not add delay. This can be achieved by setting ISTCoreWe.NumberOfScaleCores to 0 (default is 3)

Try to reduce network delay:

  • Reduce encoding bit rate as much as possible
  • Use IntraRefresh if possible (using EncoderConfigParamsWr2 instead of EncoderConfigParamsWr in RawVideoFramePropsWr)

Try to reduce overhead of sync callbacks

If no need to add pids to the encoded video:

  • Avoid from subscribing on SyncFrameEvent or SyncFrameClearEvent
  • VideoCaptureMode.fCompressedVideo should be set to false
  • VideoCaptureMode.uncompressedVideo should be set UncompressedVideoModeWr.UncompressedVideoMode_None

If video is needed for synchronizing with additional pids:

  • VideoCaptureMode.uncompressedVideo should be set UncompressedVideoModeWr.UncompressedVideoMode_Yuv

Demo App

KlvInjectorTestApp has a --lowLatencyMode argument that implements some of the above recommendations.