rocDecode samples#
2026-07-01
1 min read time
Applies to Linux
rocDecode samples are available in the rocDecode GitHub repository.
To run the samples, you’ll need to set the ROCM_PATH to point to the location of your ROCm installation, and set LD_PRELOAD and LIBVA_DRIVERS_PATH to point to the ROCm systems libraries and drivers:
export LD_PRELOAD=$ROCM_PATH/lib/rocm_sysdeps/lib/librocm_sysdeps_va.so.2:$ROCM_PATH/lib/rocm_sysdeps/lib/librocm_sysdeps_va-drm.so.2
export LIBVA_DRIVERS_PATH=$ROCM_PATH/lib/rocm_sysdeps/lib/
FFmpeg development libraries must be installed to build and run samples that use FFmpeg for either demultiplexing or decoding:
sudo apt install libavcodec-dev libavformat-dev libavutil-dev
You can find a walkthrough of the videodecode.cpp sample at Understanding the videodecode.cpp sample.