Configuration#
Compressed-video workflow configuration has two layers:
Container runtime settings, such as ports and concurrency.
Request settings, such as codec, target resolution, stream type, and quality preset.
Container Runtime Settings#
The VSR NIM image includes reserved environment variables that must remain at their default values. You can use other environment variables to tune the container runtime.
Reserved Environment Variables#
The following two variables are part of the released NIM image configuration. Docker permits overriding them with -e VAR=..., but changing either setting can prevent the service from starting. Leave them at their defaults.
Environment Variable |
Default |
Guidance |
|---|---|---|
|
|
Keep the default. The released image is configured to start with its packaged model assets. |
|
|
Keep the default. The released image is configured to expose the VSR gRPC API through its packaged startup path. |
Do not pass -e NIM_DISABLE_MODEL_DOWNLOAD=... or -e NIM_DISABLE_GRPC_STARTUP=... on docker run.
User-Tunable Environment Variables#
The following environment variables can be used when starting the VSR NIM container:
Environment Variable |
Default |
Description |
|---|---|---|
|
|
gRPC inference API port. |
|
|
HTTP control-plane port for health endpoints. |
|
Auto-selected |
Optional model-profile override. Leave this variable unset unless NVIDIA documentation or support provides a profile ID for your release. |
|
|
RTP input address returned to the sample client. For same-host Docker bridge quickstarts, set this variable to |
|
|
gRPC server worker thread count. |
|
|
Maximum concurrent inference sessions. |
When overriding the HTTP or gRPC port, publish the matching container port:
docker run -d --name vsr-nim \
--gpus all \
-e NIM_GRPC_API_PORT=9001 \
-e NIM_HTTP_API_PORT=9000 \
-e VSR_GRPC_WORKERS=8 \
-e VSR_MAX_STREAMS=16 \
-p 9000:9000 -p 9001:9001 \
-p 6600-6603:6600-6603/udp \
nvcr.io/nim/nvidia/vsr-nim:1.0.10
If you use the reference client scripts, update nim_service_host and nim_grpc_port in config/client_config.sh so that the client connects to the right address and port.
Request Configuration#
Edit the JSON files in samples/client/vsr/ to configure each request.
Example gRPC request configuration:
{
"input_config": {
"stream_type": "STREAM_TYPE_GRPC",
"codec": "VIDEO_CODEC_H264"
},
"model_config": {
"target_resolution": {
"width": 2560,
"height": 1440
},
"quality_preset": "VIDEO_QUALITY_HIGH"
},
"output_config": {
"stream_type": "STREAM_TYPE_GRPC"
}
}
Required Fields#
Field |
Requirement |
|---|---|
|
Must be non-zero. |
|
Must be non-zero. |
|
Required for RTP/UDP input. Recommended for all compressed-video workflows. |
Stream Types#
Stream Type |
Description |
|---|---|
|
Media buffers are transferred over the gRPC stream. |
|
Media is transferred over RTP/UDP and controlled through gRPC. |
|
Input and output are identified by presigned cloud or object storage URLs. |
Codecs#
Compressed-video workflows support the following codec enum values:
VIDEO_CODEC_H264VIDEO_CODEC_HEVCVIDEO_CODEC_AV1
The VSR pipeline supports 4:2:0 and 4:2:2 chroma. The actual decodable set depends on the NVDEC capabilities of the host GPU.
Quality Presets#
Preset |
Description |
|---|---|
|
Highest visual quality, with higher processing cost. |
|
Balanced quality and speed. |
|
Lower latency path. |
|
Lossless encoding mode. |
If the quality preset is not specified, VSR defaults to VIDEO_QUALITY_HIGH.
Resolution Limits#
Input width:
192to4096.Input height:
128to4096.Maximum scale ratio: 4x per dimension.
H.264 output: up to
4096 x 4096.HEVC and AV1 output: up to
8192 x 8192.