> This page is for NVIDIA Video Super Resolution NIM, version 1.0.10 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 1.0.10 (Latest) (default): https://docs.nvidia.com/nim/maxine/vsr/1.0.10/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/maxine/llms.txt.

# 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 |
|---|---|---|
| `NIM_DISABLE_MODEL_DOWNLOAD` | `1` | Keep the default. The released image is configured to start with its packaged model assets. |
| `NIM_DISABLE_GRPC_STARTUP` | `1` | 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 |
|---|---|---|
| `NIM_GRPC_API_PORT` | `8001` | gRPC inference API port. |
| `NIM_HTTP_API_PORT` | `8000` | HTTP control-plane port for health endpoints. |
| `NIM_MODEL_PROFILE` | Auto-selected | Optional model-profile override. Leave this variable unset unless NVIDIA documentation or support provides a profile ID for your release. |
| `MY_POD_IP` | `0.0.0.0` | RTP 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_WORKERS` | `4` | gRPC server worker thread count. |
| `VSR_MAX_STREAMS` | `4` | Maximum concurrent inference sessions. |

When overriding the HTTP or gRPC port, publish the matching container port:

```bash
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:

```json
{
  "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 |
|---|---|
| `model_config.target_resolution.width` | Must be non-zero. |
| `model_config.target_resolution.height` | Must be non-zero. |
| `input_config.codec` | Required for RTP/UDP input. Recommended for all compressed-video workflows. |

## Stream Types

| Stream Type | Description |
|---|---|
| `STREAM_TYPE_GRPC` | Media buffers are transferred over the gRPC stream. |
| `STREAM_TYPE_UDP` | Media is transferred over RTP/UDP and controlled through gRPC. |
| `STREAM_TYPE_FILE` | Input 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

| Preset | Description |
|---|---|
| `VIDEO_QUALITY_HIGH` | Highest visual quality, with higher processing cost. |
| `VIDEO_QUALITY_MEDIUM` | Balanced quality and speed. |
| `VIDEO_QUALITY_LOW_LATENCY` | Lower latency path. |
| `VIDEO_QUALITY_LOSSLESS` | Lossless 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`.