Skip to content

Configuration through URL parameters

The optional Datastead parameters (see Parameter identifiers) can be:

  • either set programmatically through the IDatasteadRtspSourceConfig interface,
  • either passed at the end of the URL, if possible (so the filter can be configured without writing code).

Note

This is the method used to pass non-default settings to the filter when it is driven by the TVideoGrabber SDK: see Using from TVideoGrabber.

Syntax

Most of the configuration parameter identifiers can be passed as extra parameters at the end of the URL, by adding a ">" (or "!") character followed by the parameter name, a "=", and the value.

The parameter identifiers are not case-sensitive.

E.g.:

onvif://user:pass@192.168.2.55:8080>timeout=3000
onvif://user:pass@192.168.2.55:8080>buffer=50
onvif://user:pass@192.168.2.55:8080>buffer=50>timeout=3000

or

rtsp://root:admin@192.168.0.24/axis-media/media.amp!timeout=3000
rtsp://root:admin@192.168.0.24/axis-media/media.amp!buffer=50
rtsp://root:admin@192.168.0.24/axis-media/media.amp!buffer=50!timeout=3000

Example with a full RTSP URL with filter settings added at the end:

rtsp://root:admin@192.168.0.25/axis-media/media.amp?videocodec=h264>Buffer=0>DestIPAddress=192.168.0.231>DestIPPort=30000>DestBitRate=1500>DestKeyFrameInterval=15

Note: the standard ? is reserved for the camera's own RTSP query string (e.g. ?videocodec=h264&audio=1) and is passed through to the camera unchanged; the Datastead parameters use > or ! only.

The settings that can be passed at the end of the URL are listed as "url param" below the name of each setting in the Parameter identifiers section.

Multi-line URLs

For readability it is also possible to pass the URL with parameters as a multi-line string, each line being separated by CR/LF characters, e.g.:

rtsp://root:admin@192.168.0.25/axis-media/media.amp?videocodec=h264
>Buffer=0
>DestIPAddress=192.168.0.231
>DestIPPort=30000
>DestBitRate=1500
>DestKeyFrameInterval=15

Specifying the video pin format beforehand

By default, the filter obtains the video width, height and frame rate required for the video pin format after connecting to the URL.

If the video frame rate of the source is known, it is possible to specify the pin format parameters:

  • either programmatically by invoking, e.g. for 1920x1080 25 fps:
IDatasteadRTSPSourceConfig.SetInt (RTSP_VideoStream_Width_int, 1920);
IDatasteadRTSPSourceConfig.SetInt (RTSP_VideoStream_Height_int, 1080);
IDatasteadRTSPSourceConfig.SetDouble (RTSP_Source_FrameRate_double, 25.0);
  • either at the end of the URL by specifying, e.g.:
rtsp://192.168.1.33/Streaming/Channels/101/>width=1920>height=1080>srcframerate=25

It is also possible to specify additionally the RGB format at the same time, e.g.:

IDatasteadRTSPSourceConfig.SetInt (RTSP_VideoStream_Width_int, 1920);
IDatasteadRTSPSourceConfig.SetInt (RTSP_VideoStream_Height_int, 1080);
IDatasteadRTSPSourceConfig.SetDouble (RTSP_Source_FrameRate_double, 25.0);
IDatasteadRTSPSourceConfig.SetStr (RTSP_VideoStream_PinFormat_str, "RGB32");

or at the end of the URL:

rtsp://192.168.1.33/Streaming/Channels/101/>width=1920>height=1080>srcframerate=25>videopinformat=RGB32