rocDecode is a high-performance video decode SDK for AMD GPUs. Using the rocDecode API, you can access the video decoding features available on your GPU.
Linux distribution
20.04
/ 22.04
8
/ 9
15 SP5
[!IMPORTANT]
gfx908
or higher GPU required
Install ROCm 6.1.0
or later with amdgpu-install: Required usecase - rocm
[!IMPORTANT]
sudo amdgpu-install --usecase=rocm
Video Acceleration API Version 1.5.0
or later - Libva
is an implementation for VA-API
sudo apt install libva-dev
[!NOTE] RPM Packages for
RHEL
/SLES
-libva-devel
AMD VA Drivers
sudo apt install mesa-amdgpu-va-drivers
CMake Version 3.5
or later
sudo apt install cmake
Clang Version 5.0.1
or later
sudo apt install clang
sudo apt install pkg-config
FFmpeg runtime and headers - for tests and samples
sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev
[!IMPORTANT]
On
Ubuntu 22.04
- Additional package required:libstdc++-12-dev
sudo apt install libstdc++-12-dev
On
RHEL
/SLES
- Additional packages required:libdrm-amdgpu
andmesa-amdgpu-dri-drivers
sudo yum install libdrm-amdgpu mesa-amdgpu-dri-drivers
[!NOTE]
- All package installs are shown with the
apt
package manager. Use the appropriate package manager for your operating system.- To install rocDecode with minimum requirements, follow the quick-start instructions
For your convenience, we provide the setup script, rocDecode-setup.py, which installs all required dependencies. Run this script only once.
python3 rocDecode-setup.py --rocm_path [ ROCm Installation Path - optional (default:/opt/rocm)]
--runtime [ Setup runtime requirements - optional (default:ON) [options:ON/OFF]]
--developer [ Setup Developer Options - optional (default:OFF) [options:ON/OFF]]
The installation process uses the following steps:
ROCm-supported hardware install verification
Install ROCm 6.1.0
or later with amdgpu-install with --usecase=rocm
Use either package install or source install as described below.
To install rocDecode runtime, development, and test packages, run the line of code for your operating system.
rocdecode
only provides the rocdecode library librocdecode.so
rocdecode-dev
/rocdecode-devel
provides the library, header files, and samplesrocdecode-test
provides CTest to verify installation sudo apt install rocdecode rocdecode-dev rocdecode-test
sudo yum install rocdecode rocdecode-devel rocdecode-test
sudo zypper install rocdecode rocdecode-devel rocdecode-test
[!NOTE] Package install auto installs all dependencies.
[!IMPORTANT]
RHEL
/SLES
package install requires manualFFMPEG
dev install
To build rocDecode from source and install, run:
git clone https://github.com/ROCm/rocDecode.git
cd rocDecode
python3 rocDecode-setup.py
mkdir build && cd build
cmake ../
make -j8
sudo make install
make test
[!IMPORTANT] make test requires
FFMPEG
dev install[!NOTE] To run tests with verbose option, use
make test ARGS="-VV"
.
sudo make package
The installer copies:
/opt/rocm/lib
/opt/rocm/include/rocdecode
/opt/rocm/share/rocdecode
/opt/rocm/share/doc/rocdecode
To verify your installation using a sample application, run:
mkdir rocdecode-sample && cd rocdecode-sample
cmake /opt/rocm/share/rocdecode/samples/videoDecode/
make -j8
./videodecode -i /opt/rocm/share/rocdecode/video/AMD_driving_virtual_20-H265.mp4
To verify your installation using the rocdecode-test
package, run:
mkdir rocdecode-test && cd rocdecode-test
cmake /opt/rocm/share/rocdecode/test/
ctest -VV
You can access samples to decode your videos in our GitHub repository. Refer to the individual folders to build and run the samples.
FFmpeg is required for sample applications and make test
. To install
FFmpeg, refer to the instructions listed for your operating system:
Ubuntu:
sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev
RHEL/SLES:
Install ffmpeg development packages manually or use rocDecode-setup.py
script
You can find rocDecode Docker containers in our GitHub repository.
Run the following code to build our documentation locally.
cd docs
pip3 install -r sphinx/requirements.txt
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
For more information on documentation builds, refer to the Building documentation page.
20.04
/ 22.04
8
/ 9
15 SP5
6.2.0.60200-66
1:6.2.60200-2009582
2.7.0-2
/ 2.14.0-1
1:24.2.0.60200-2009582
24.1.0.60200
4.2.7
/ 4.4.2-0
V2.2.0