When connecting to RTSP URLs, if the connection fails or take too long, the origin of the problem can be default transport mode, retry after specifying the tcp, udp or http transport as follows:
- at the end of the RTSP URL
by adding >rtsp_transport=value as follows, e.g.:
tcp:
rtsp://admin:admin@192.168.0.33>rtsp_transport=tcp
udp:
rtsp://admin:admin@192.168.0.33>rtsp_transport=udp
http:
rtsp://admin:admin@192.168.0.33>rtsp_transport=http
multicast:
rtsp://admin:admin@192.168.0.33>rtsp_transport=udp_multicast
- or programmatically
by invoking IDatasteadRTSPSourceConfig.SetInt (RTSP_Source_RTSPTransport_int, Value).
The possible values are:
0: automatic (default, UDP is tried first)
1: tcp
2: udp
3: http
4: udp_multicast
If the connection to an HTTP URL in JPEG or MJPEG mode fails, specify the MJPEG mode:
- at the end of the RTSP URL, e.g.:
http://192.168.0.24>srcformat=mjpeg
- or programmatically
by invoking IDatasteadRTSPSourceConfig.SetStr (RTSP_Source_Format_str, "mjpeg").
(If the URL is a MXPEG URL, specify "mxg" instead of "mjepg")
The filter includes a low delay mode that is enabled by default under certain conditions.
Enabling it may reduce the latency, but, with some video source it can introduce problems (jerkiness, etc...)
It can be forced enabled (1) or disabled (0) as follows:
- at the end of the RTSP URL, e.g.:
rtsp://192.168.0.24>lowdelay=0
- or programmatically
IDatasteadRTSPSourceConfig.SetInt (RTSP_Source_LowDelay_int, 0).
To minimize the latency, specify a zero buffering, and eventually force the low delay mode and disable the video synchronization:
- at the end of the RTSP URL, e.g.:
rtsp://192.168.0.24>buffer=0
rtsp://192.168.0.24>buffer=0>lowdelay=1
rtsp://192.168.0.24>buffer=0>lowdelay=1>vidsync=0
- or programmatically
IDatasteadRTSPSourceConfig.SetInt (RTSP_Source_BufferDuration_int, 0);
IDatasteadRTSPSourceConfig.SetInt (RTSP_Source_LowDelay_int, 0);
IDatasteadRTSPSourceConfig.SetBool (RTSP_VideoStream_Synchronized_bool, false);