GitHub - ROCm/rocDecode: [DEPRECATED] Moved to ROCm/rocm-systems repo (original) (raw)

MIT licensed

Caution

The rocDecode repository is retired, please use the ROCm/rocm-systems repository

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.

Note

The published documentation is available at rocDecode in an organized, easy-to-read format, with search and a table of contents. The documentation source files reside in the rocDecode/docs folder of this repository. As with all ROCm projects, the documentation is open source. For more information on contributing to the documentation, see Contribute to ROCm documentation.

Supported codecs

Prerequisites

Operating Systems

Hardware

Important

Important

sudo amdgpu-install --usecase=rocm

Compiler

Libraries

Note

Note

RPM Packages for RHEL/SLES - libva-amdgpu mesa-amdgpu-va-drivers

Note

FFmpeg libraries are used in samples and tests

sudo apt install libavcodec-dev libavformat-dev libavutil-dev

Important

sudo apt install libstdc++-12-dev

Note

Prerequisites setup script

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]]

Installation instructions

The installation process uses the following steps:

sudo amdgpu-install --usecase=rocm  

Important

Use either package install or source install as described below.

Package install

To install rocDecode runtime, development, and test packages, run the line of code for your operating system.

Ubuntu

sudo apt install rocdecode rocdecode-dev rocdecode-test rocdecode-host

RHEL

sudo yum install rocdecode rocdecode-devel rocdecode-test rocdecode-host

SLES

sudo zypper install rocdecode rocdecode-devel rocdecode-test rocdecode-host

Note

Important

RHEL/SLES package install requires manual FFMPEG dev install

Source 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

Run tests

Important

make test requires FFMPEG dev install

Note

To run tests with verbose option, use make test ARGS="-VV".

Make package

Verify installation

The installer copies:

Using sample application

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

Using test package

To verify your installation using the rocdecode-test package, run:

mkdir rocdecode-test && cd rocdecode-test cmake /opt/rocm/share/rocdecode/test/ ctest -VV

Samples

You can access samples to decode your videos in ourGitHub 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:

Docker

You can find rocDecode Docker containers in ourGitHub repository.

Tested configurations