Skip to navigation

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 VariableDefaultGuidance
NIM_DISABLE_MODEL_DOWNLOAD1Keep the default. The released image is configured to start with its packaged model assets.
NIM_DISABLE_GRPC_STARTUP1Keep 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 VariableDefaultDescription
NIM_GRPC_API_PORT8001gRPC inference API port.
NIM_HTTP_API_PORT8000HTTP control-plane port for health endpoints.
NIM_MODEL_PROFILEAuto-selectedOptional model-profile override. Leave this variable unset unless NVIDIA documentation or support provides a profile ID for your release.
MY_POD_IP0.0.0.0RTP input address returned to the sample client. For same-host Docker bridge quickstarts, set this variable to 127.0.0.1 so that the client sends RTP input through the published UDP ports.
VSR_GRPC_WORKERS4gRPC server worker thread count.
VSR_MAX_STREAMS4Maximum 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

FieldRequirement
model_config.target_resolution.widthMust be non-zero.
model_config.target_resolution.heightMust be non-zero.
input_config.codecRequired for RTP/UDP input. Recommended for all compressed-video workflows.

Stream Types

Stream TypeDescription
STREAM_TYPE_GRPCMedia buffers are transferred over the gRPC stream.
STREAM_TYPE_UDPMedia is transferred over RTP/UDP and controlled through gRPC.
STREAM_TYPE_FILEInput and output are identified by presigned cloud or object storage URLs.

Codecs

Compressed-video workflows support the following codec enum values:

  • VIDEO_CODEC_H264
  • VIDEO_CODEC_HEVC
  • VIDEO_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

PresetDescription
VIDEO_QUALITY_HIGHHighest visual quality, with higher processing cost.
VIDEO_QUALITY_MEDIUMBalanced quality and speed.
VIDEO_QUALITY_LOW_LATENCYLower latency path.
VIDEO_QUALITY_LOSSLESSLossless encoding mode.

If the quality preset is not specified, VSR defaults to VIDEO_QUALITY_HIGH.

Resolution Limits

  • Input width: 192 to 4096.
  • Input height: 128 to 4096.
  • Maximum scale ratio: 4x per dimension.
  • H.264 output: up to 4096 x 4096.
  • HEVC and AV1 output: up to 8192 x 8192.