Running Inference
VSR NIM exposes a bidirectional streaming gRPC API. The quickstart bundle includes a reference client and JSON request configurations for gRPC, RTP/UDP, and Cloud File workflows.
Run the gRPC Sample
Download the VSR compressed-video quickstart resource from NGC and extract it:
From the extracted VSR quickstart folder, build the reference client image:
The packaged quickstart includes a sample H.264 elementary stream for the bundled gRPC and RTP/UDP clients:
To use your own MP4 input instead, convert it to H.264 Annex B before updating input_video_file in config/client_config.sh:
Run the gRPC sample:
By default, the sample client does the following:
- Connects to
127.0.0.1:8001. - Reads
/host/media/input.h264. - Reads
samples/client/vsr/grpc_vsr.json. - Uses the input codec, target resolution, and quality preset from the JSON file.
- Writes the upscaled result to
output_vsr_grpc.h264.
For best results, choose an input resolution lower than the target resolution, such as 720p input for 1440p or 4K output.
RTP/UDP Sample
To use the RTP/UDP sample:
- Start VSR NIM with the RTP/UDP launch command in Getting Started.
- In
config/client_config.sh, setsample_apptortp_udp. - If the client is not running on the Docker host, edit
samples/client/vsr/rtp_udp_vsr.json. - Run
./vsr_client.sh.
The RTP/UDP workflow is controlled by the gRPC API, but media is transferred over RTP/UDP ports.
The Dockerfile-built RTP/UDP sample client is intended for H.264 and H.265 RTP streams from Ubuntu-packaged GStreamer plugins. Use the default H.264 sample config and packaged media/input.h264 for the quickstart path.
AV1 RTP requires rtpav1pay and rtpav1depay GStreamer Rust RTP elements, which are not available from stock Ubuntu 24.04 packages.
Cloud File Sample
To use the Cloud File sample:
-
Set
sample_apptocloud_fileinconfig/client_config.sh. -
Upload an input video to object storage.
-
Create a readable presigned URL for the input object and a writable presigned URL for the output object.
-
Export both URLs and run
./vsr_client.sh.The wrapper passes these values to
cloud_file_vsr_clientas--input_presigned_urland--output_presigned_url, overriding the placeholder URIs insamples/client/vsr/cloud_file_vsr.json.
For container output, use an input container supported by the Support Matrix. If you upload the packaged media/input.h264, use an elementary-bitstream output object such as output.h264.
Build a Custom gRPC Client
Protocol buffer definitions live in samples/protos/video_processing/. Generate language stubs with your own protoc toolchain, and invoke nvidia.video_processing.v1beta1.VideoSuperResolutionService/ProcessVideo against the VSR NIM gRPC endpoint.
For example, to generate Python stubs with grpcio-tools:
API Summary
The VSR gRPC API uses the following:
The gRPC, RTP/UDP, and Cloud File examples all use the same VSR request configuration model.