Files
rocm-systems/samples/videoDecode/README.md
T

36 lines
954 B
Markdown
Raw Normal View History

# Video Decode Sample
2023-11-06 08:51:47 -08:00
This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded on AMD hardware using VAAPI.
2023-11-06 08:51:47 -08:00
This sample supports both YUV420 8-bit and 10-bit streams.
## Prerequisites:
* Linux distribution
+ Ubuntu - `20.04` / `22.04`
* [ROCm supported hardware](https://rocm.docs.amd.com/en/latest/release/gpu_os_support.html)
* Install [ROCm 5.5 or later](https://rocmdocs.amd.com/en/latest/deploy/linux/installer/install.html) with `--usecase=graphics,rocm --no-32`
* rocDecode
* CMake `3.5` or later
* [FFMPEG](https://ffmpeg.org/about.html)
```
sudo apt install ffmpeg libavcodec-dev libavformat-dev libswscale-dev
```
## Build
```
mkdir build
cd build
2023-11-06 08:51:47 -08:00
cmake ../
make -j
2023-11-06 08:51:47 -08:00
```
# Run
```
./videodecode -i <input video file [required]>
-o <output path to save decoded YUV frames [optional]>
-d <GPU device ID - 0:device 0 / 1:device 1/ ... [optional - default:0]>
```