Streaming iDFace
Streaming RTSP
The iDFace access controller is capable of streaming video from its camera via the RTSP protocol. Once the feature is enabled, to access the stream it is necessary to configure an RTSP client (such as VLC Media Player or Windows Media Player) to access the device at the /main_stream endpoint. It is important to note that the feature comes, by default, disabled and without credentials. To enable it, follow the configuration instructions that will be shown below.
URL for service access
If no username and password are registered, you can use the URL pattern shown below to access iDFace camera video streaming:
rtsp://device.ip.network.address:port/main_stream
If username and password are registered, the URL pattern is:
rtsp://username:password@device.ip.network.address:port/main_stream
Streaming RTSP parameter settings
Attention: all configuration changes listed below will only take effect after restarting the device
If the user wants to use the video streaming from the camera, it is necessary to enable it in the GUI, WEB interface or via API. The parameter that allows enabling (1) or disabling (0) is the rtsp_enabled
of the onvif
module.
Request example
This request enables video transmission via RTSP.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"rtsp_enabled": "1"
}
}
)
});
Port configuration
It is also possible to configure the port used for transmission. The default port used is "554". To change it, use the rtsp_port
parameter of the onvif
module.
Request example
This request changes the port of video transmission via RTSP.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"rtsp_port": "556"
}
}
)
});
Credential configuration
Likewise, it is possible to register a username and password so that the transmission is only enabled after providing the correct username and password. For this you must use the rtsp_username
and rtsp_password
parameters of the onvif
module. By default, no username and password are registered in these parameters.
Request example
This request enters a username and password to activate video transmission via RTSP.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"rtsp_username": "admin",
"rtsp_password": "admin",
}
}
)
});
Camera setup
In addition, you can change the camera used to transmit video. The default camera is RGB, but over API request it is possible to change it to the infrared (IR) camera as well. The parameter responsible for this configuration is the rtsp_rgb
of the onvif
module, and there are two valid entries for it: "0" (IR) or "1" (RGB).
Request example
This request changes the camera from the video stream to the IR camera.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"rtsp_rgb": "0"
}
}
)
});
Codec setup
In addition, you can change the video codec used to transmit video. The default codec is MJPEG, but over API request it is possible to change it to H.264 codec. The parameter responsible for this configuration is the rtsp_codec
of the onvif
module, and there are two valid entries for it: "mjpeg" (MJPEG) or "h264" (H.264).
Request example
This request changes the codec video to the H.264 codec.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"rtsp_codec": "h264"
}
}
)
});
Streaming ONVIF
The iDFace Access Controller is also able to transmit the video stream from your camera through the ONVIF (Open Network Video Interface Forum) standard, recognized and used worldwide by several manufacturers of surveillance cameras and recorders.
Streaming ONVIF parameter settings
Attention: all configuration changes listed below will only take effect after restarting the device
First of all, note that ONVIF standard transmissions are performed using the RTSP protocol on its background, so remember to configure RTSP properly and enable it to ensure that the ONVIF transmission works without any error. ONVIF transmission will only work if the RTSP is active and operating correctly.
Also, it is important to know that ONVIF uses its default credentials, i.e. the value of "admin" for both login and password.
If the user wants to enable the ONVIF feature, it is necessary to enable it in the GUI, WEB interface or via API. The parameter that allows enabling (1) or disabling (0) is the onvif_enabled
of the onvif
module.
Request example
This request enables video transmission via ONVIF.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"onvif_enabled": "1"
}
}
)
});
Port configuration
It is also possible to configure the port used for transmission. The default port used is "8000". To change it, use the onvif_port
parameter of the onvif
module.
Request example
This request changes the port of video transmission via ONVIF.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"onvif_port": "8001"
}
}
)
});
Viewing Parameterizations
The iDFace access controller is also capable of transmitting video from its camera in 360x640 resolution, with the possibility of mirroring the image being transmitted.
Screen transmission parameter settings
In addition, it is possible to change the orientation of the video stream to either original or flipped. The parameter responsible for this setting is rtsp_flipped
of the onvif
module, and there are two valid entries for it: "0" for original or "1" for flipped.
Request Example
This request switches to the flipped screen.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"onvif": {
"rtsp_flipped": "1"
}
}
)
});