rtsp-client-android icon indicating copy to clipboard operation
rtsp-client-android copied to clipboard

Verry high video latency

Open MrGaintsquirrel opened this issue 1 year ago • 3 comments
trafficstars

Hi Alexeyvasilyev,

Currently I am working on a project where I need a low latency (less than 200ms) video connection to a IP camera so I thought of using this library because it sayed that it can do that. However when I use the rtspsurfaceview with the kotlin code below it like in the example in the readme I get a latency of roughly 2 seconds. Am I doing something wrong or are there more settings that I can do to get a lower latency?

Kind regards,

MrGaintsquirrel avatar Apr 23 '24 19:04 MrGaintsquirrel

@MrGaintsquirrel any luck with it? I'm looking at the same issue.

doron2402 avatar Jun 27 '24 11:06 doron2402

@doron2402 no unfortunately not. I did confirm that changing the android device to a more modern one doesn't fix the issue. at some point i got the latency down to 500ms but that was using vlclib.

MrGaintsquirrel avatar Jun 27 '24 12:06 MrGaintsquirrel

Latency can be caused by hardware decoder and can be Android device specific.

  1. Try to use another Android device model.
  2. Try to use software decoder instead. In VideoDecodeThread.kt change to var decoder = try { createVideoDecoderAndStart(DecoderType.HARDWARE) ...

alexeyvasilyev avatar Jun 28 '24 05:06 alexeyvasilyev