Arquivos
rocm-systems/samples/videoDecode
Aryan Salmanpour 851c537904 code cleanup - use google style for videodecode sample and RocVideoDecoder class - no functional change (#65)
* code cleanup - use google style for videodecode sample and RocVideoDecoder class - no functional change

* rename SaveSurfToFile to SaveFrameToFile
2023-11-15 15:49:16 -05:00
..
2023-11-06 11:51:47 -05:00
2023-11-06 11:51:47 -05:00

Video Decode Sample

This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded on AMD hardware using VAAPI.

This sample supports both YUV420 8-bit and 10-bit streams.

Prerequisites:

  • Linux distribution

    • Ubuntu - 20.04 / 22.04
  • ROCm supported hardware

  • Install ROCm 5.5 or later with --usecase=graphics,rocm --no-32

  • rocDecode

  • CMake 3.5 or later

  • FFMPEG

    sudo apt install ffmpeg libavcodec-dev libavformat-dev libswscale-dev
    

Build

mkdir build
cd build
cmake ../
make -j

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