Use the nvcr command to discover the installed codec and provider, then
encode or decode planar 8-bit YUV420 video. Install a compatible engine first:
commands that run the codec use that local engine and never download or build
one automatically.
nvcr --help
nvcr --version
nvcr-artifacts --versionBoth version commands print the software version from the release's canonical
version.txt identity and exit without selecting a GPU, engine, or model.
Continue to retain the package manifest, source commit and dirty state, or
container digest when exact build provenance matters.
A CPU-only build includes nvcr for help, version, and portable discovery
commands. Encode and decode still require a supported execution provider and do
not perform neural inference in that build.
nvcr codec list
nvcr codec describe dcvc-rt
nvcr provider list
nvcr provider describe tensorrt
nvcr compatibility check --codec dcvc-rt --provider tensorrtThe lists include the dcvc-rt codec and tensorrt provider. The provider
description reports the TensorRT version compiled into that build; do not infer
it from an example or image name.
The compatibility command checks only that the registered IDs can be paired.
It does not query a GPU, select or validate a bundle, compare CUDA/TensorRT
versions, or deserialize an engine. Catalog compatibility is evaluated by
nvcr-artifacts install. The CLI resolves the installed bundle and enforces
runtime compatibility when the encode backend is initialized.
Provider descriptors report general capabilities. The supported DCVC-RT execution mode is FP16 even if a descriptor exposes a broader vocabulary.
The public catalog uses anonymous access:
nvcr-artifacts install --profile qcif
nvcr-artifacts install --profile 360p 720p 1080p
export NVCR_ENGINE_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/nvcr/engines"
nvcr-artifacts inspect \
"$NVCR_ENGINE_ROOT/profiles/dcvcrt/qcif" --json--profile accepts one or more values and may be repeated. Omitting it
installs every compatible catalog profile. For each profile, the installer
prefers exact, then same_compute_capability, then ampere_plus.
Same-compute matching compares the numeric major and minor (for example,
SM 8.9 matches only SM 8.9), and Jetson is exact-only. Every class still
requires the TensorRT major.minor.patch recorded in the bundle.
inspect reports the installed manifest without running a TensorRT plan.
validate checks the bundle schema, file inventory, and digests:
nvcr-artifacts validate \
"$NVCR_ENGINE_ROOT/profiles/dcvcrt/qcif" --jsonThe final compatibility check occurs during backend initialization and frame processing. A successful inspection or registry check is not execution evidence.
Engine selection precedence is:
--engine-dir, a direct bundle;NVCR_ENGINE_DIR, a direct bundle;NVCR_ENGINE_ROOT, a catalog-style collection;$XDG_DATA_HOME/nvcr/engines;$HOME/.local/share/nvcr/engines; then./engines.
Within a collection, installed profiles live under
profiles/dcvcrt/<profile>. Dimensions map to qcif, cif, exact
360p, exact 540p, 720p, or 1080p; larger input requires an
explicit compatible bundle.
Source users can generate deterministic raw input with the repository helper. Packaged users may supply any headerless planar YUV420P8 input with matching dimensions and frame count:
python3 scripts/generate_sample_yuv.py \
--output nvcr-example/input.yuv \
--width 176 --height 144 --frames 4Encode:
nvcr encode \
-i nvcr-example/input.yuv \
-o nvcr-example/output.nvcr \
-s 176x144 -r 30 \
--frames 4 --gop-size 2 --qp 32 --verboseFor encode, --frames N limits the number of input frames submitted.
--frames 0 processes complete frames to end of input. --gop-size 1
explicitly selects all-intra development mode. Normal operation uses I/P
coding. --codec, --provider, --device-id, --engine-profile, and
--engine-dir override their defaults.
--codec mlvc selects the experimental MLVC codec. It needs --engine-dir
pointing at an extracted MLVC ONNX bundle and defaults to --provider onnxruntime-cpu. Without --gop-size it keeps the bundle's own I period. See
MLVC integration.
Each successful encoder submission consumes that frame. The CLI then receives
every access unit currently available and treats receive-side try_again as a
request for more input. At end of input it flushes only the encoder and
receives through end_of_stream, including access units created from delayed
or short final groups.
The final payload-byte total is the complete packet payload passed by the
runtime—currently a bounded NVAU access unit. It excludes the outer
NVCS record bytes but is not an entropy-only byte count.
nvcr decode \
-i nvcr-example/output.nvcr \
-o nvcr-example/reconstructed.yuv
nvcr decode \
-i nvcr-example/output.nvcr \
-o nvcr-example/reconstructed.yuv \
--quality-metrics nvcr-example/input.yuvDecode reads dimensions from the first access unit and rejects resolution changes in raw output. The quality option reports per-plane and weighted YUV PSNR against a raw reference with matching frames and dimensions.
For decode, --frames N limits decoded output frames, not input access units.
If one access unit contains more outputs than remain under the limit, decode
writes the requested outputs and stops without reading more input. With
--frames 0, decode reads every access unit exactly once. Each successful send
consumes that unit; receive-side try_again requests another unit. Decode then
flushes only the decoder and receives through end_of_stream.
--verbose prints the chosen TensorRT bundle before backend initialization,
then reports submitted input frames, emitted access units, submitted access
units, emitted output frames, and directional flush output without assuming
one-to-one cardinality. Treat successful frame processing, not the selection
line alone, as execution evidence. --profile prints TensorRT/CUDA stage
counters and adds synchronization, so do not use profiling repetitions for
throughput.
CLI codec time covers session calls that may perform codec work: input sends, all receive attempts, and final directional flush/drain when the input is read to completion. Packet serialization, raw file I/O, process startup, and the full subprocess boundary are excluded. This boundary supersedes the pre-1.1 one-call-per-frame timing description, so do not compare the values directly unless the measurement boundaries match. Use Performance and benchmarking when comparing end-to-end workflows.
The .nvcr file is an application sequence wrapper (NVCS records
containing NVCR packets and NVAU access units), not a standard media
container or an upstream Python DCVC-RT file.