Note
The published documentation is available at rocPyDecode in an organized, easy-to-read format, with search and a table of contents. The documentation source files reside in the 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.
The rocDecode Python Binding, rocPyDecode, is a tool that allows users to access rocDecode APIs in both Python and C/C++ languages. It works by connecting Python and C/C++ libraries, enabling function calling and data passing between the two languages. The rocpydecode.so library is a wrapper that facilitates the use of rocDecode APIs that are written primarily in C/C++ language within Python.
-
Linux distribution
- Ubuntu -
20.04
/22.04
- Ubuntu -
Important
gfx908
or higher GPU required
- Install ROCm
6.2.0
or later with amdgpu-install: Required usecase - rocm
Important
sudo amdgpu-install --usecase=rocm
-
CMake
3.5
or highersudo apt install cmake
-
Python3 and Python3 PIP
sudo apt install python3-dev python3-pip
-
sudo pip3 install pybind11
-
sudo apt install rocdecode-dev
-
sudo apt install pkg-config
-
FFmpeg runtime and headers - for tests and samples
sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev
-
sudo apt install libdlpack-dev
Note
- All package installs are shown with the
apt
package manager. Use the appropriate package manager for your operating system.
For your convenience, we provide the setup script, rocPyDecode-requirements.py, which installs all required dependencies.
Run this script only once on bare metal, if using docker please see below instructions.
python3 rocPyDecode-requirements.py
git clone https://github.com/ROCm/rocPyDecode.git
cd rocPyDecode
sudo pip3 install .
Note
sudo
access is needed
# the generated .whl file will be located under subfolder ./dist/
git clone https://github.com/ROCm/rocPyDecode.git
cd rocPyDecode
# Create/Build the wheel and install it
sudo python3 build_rocpydecode_wheel.py
# alternative method
sudo python3 setup.py bdist_wheel
Note
sudo
access is needed
git clone https://github.com/ROCm/rocPyDecode.git
cd rocPyDecode
python rocPyDecode-docker-install.py
Note
Do NOT use sudo
- Information on how to create and install rocPyDecode conda package is located here.
This will run python samples and show pass/fail.
python3 -m pip install --upgrade pip
python3 -m pip install -i https://test.pypi.org/simple hip-python
cd rocPyDecode
cmake .
ctest -VV
- Sample scripts and instructions to run them can be found here
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.
- Linux
- Ubuntu -
20.04
/22.04
- Ubuntu -
- ROCm:
- rocm-core -
6.2.0.60200-crdnnh.14042
- amdgpu-core -
1:6.2.60200-1778439.22.04
- rocm-core -
- rocdecode -
0.6.0.60200-crdnnh.14042
- FFmpeg -
4.2.7
/4.4.2-0