rtconfig.json File¶
CVEDIA-RT global parameters can be configured through the rtconfig.json
(formerly global.config
on 2023.5.x
and older) file present in the root folder (or files
folder on Windows).
This file is a valid JSON formatted file and can be edited before booting the application.
Available properties to edit:
auto_device_list¶
The auto_device_list
property allows setting which inference hardware device to use for loading inference AI models.
This is used only when the URI of the model to load uses the auto
scheme. CVEDIA-RT will choose the first compatible hardware starting from the top of the list.
For more information, check the Modelforge documentation.
"auto_device_list": [
"blaize.1",
"hailo.1",
"cavalry",
"snpe.aip",
"snpe.dsp",
"openvino.VPU",
"tensorrt.1",
"tensorrt.2",
"openvino.GPU",
"openvino.CPU",
"mnn.auto",
"armnn.GpuAcc",
"armnn.CpuAcc",
"armnn.CpuRef"
]
modelforge_url¶
URL of the Modelforge server.
"model_forge": "http://mf.cvedia.com"
If your device has an accurate clock you can use https
instead.
system_cameras¶
Array that stores the current system cameras configuration. This property doesn't need to be edited directly in the JSON as CVEDIA-RT UI also allows configuring cameras.
For more information, check the Camera Discovery documentation.
web_server¶
Configuration for CVEDIA-RT Rest API Server. It allows configuring IP address, server port, enabling/disabling the server, and CORS settings.
"web_server": {
"enabled": true,
"ip_address": "0.0.0.0",
"port": 3546,
"cors": {
"enabled": false
}
}
CORS Configuration¶
CVEDIA-RT supports configurable Cross-Origin Resource Sharing (CORS) to allow web applications from different domains to access the REST API. When CORS is enabled, the server uses sensible defaults that can be overridden as needed.
Default CORS Settings:
When enabled: true
is set, CVEDIA-RT uses these permissive defaults:
allowed_origins
:["*"]
(allows requests from any origin)allowed_methods
:["GET", "POST", "PUT", "DELETE", "OPTIONS"]
allowed_headers
:["Content-Type", "Authorization", "x-timestamp", "x-is-compressed", "x-is-raw"]
allow_credentials
:true
Custom CORS Configuration:
You can override any of the default settings by specifying custom values:
"web_server": {
"enabled": true,
"ip_address": "0.0.0.0",
"port": 3546,
"cors": {
"enabled": true,
"allowed_origins": ["http://localhost:3000", "https://myapp.com"],
"allowed_methods": ["GET", "POST"],
"allowed_headers": ["Content-Type", "Authorization"],
"allow_credentials": false
}
}
Configuration Options:
enabled
: Boolean to enable/disable CORS supportallowed_origins
: Array of allowed origin URLs (defaults to["*"]
for all origins)allowed_methods
: Array of allowed HTTP methods (defaults to common REST methods)allowed_headers
: Array of allowed request headers (defaults to CVEDIA-RT specific headers)allow_credentials
: Boolean to allow credentials in cross-origin requests (defaults totrue
)
Proxy setup¶
CVEDIA-RT requires one-time internet access for downloading AI models. In case your system cannot reach the internet directly, you can tell it to use a proxy with the following options:
"proxy_host": "127.0.0.1",
"proxy_port": 8888
You can also configure CVEDIA-RT to use authentication:
"proxy_basic_user": "myuser",
"proxy_basic_pass": "mypass"
Using digest:
"proxy_digest_user": "myuser",
"proxy_digest_pass": "mypass"
Using a token:
"proxy_bearer_token": "mytoken"
remote¶
For edge devices without a monitor, or for cloud servers, it's possible to connect remotely to the UI. To optimize the performance and reduce bandwidth you can set the following options:
"remote": {
"texture_update_delay": 500,
"grayscale_textures": true,
"downscale_factor": 4,
"max_side": 512
}
For more information, please check the Remote UI documentation.
gstreamer¶
You can define custom ranks for different plugins, this defines the order in which gstreamer will try to use certain plugins.
The default configuration sets high priority to nvidia encoding / decoding:
"plugin_rank": {
"nvv4l2decoder": "-257",
"nvjpegdec": "-257",
"nvjpegenc": "-257",
"qsv": "300",
"qsvh265dec": "300",
"qsvh264dec": "300",
"qsvh265enc": "300",
"qsvh264enc": "300",
"nvh264dec": "257",
"nvh265dec": "257",
"nvh264enc": "257",
"nvh265enc": "257",
"nvvp9dec": "257",
"nvvp9enc": "257",
"nvmpeg4videodec": "257",
"nvmpeg2videodec": "257",
"nvmpegvideodec": "257",
"mpph264enc": "257",
"mpph265enc": "257",
"mppvp8enc": "257",
"mppjpegenc": "257",
"mppvideodec": "257",
"mppjpegdec": "257"
}
The possible rank values can be:
- "primary" (255)
- "secondary" (128)
- "marginal" (64)
- "none" (disables the plugin)
- "a number" (defined as a string, from 0 to 32768)
The plugins referred in this config don't need to be available, so defining a plugin that doesn't exist doesn't break the system.
You can list all available / loaded gstreamer plugins by defining list_features
to true
:
"list_features": true
When gstreamer module is initialized it will print a long list of all available plugins.