Files
rocm-systems/projects/rocdecode/samples/videoDecodeBatch
Kiriti Gowda 021e32bc21 Find rocDecode - Support added (#428)
* Find rocDecode - Support added

* Find rocDecode - Updates

* Find rocDecode - Version fix

* Find rocDecode - Version Var

* Minor cleanup

* Test - Find package updates

* CTest - Upgrades

* CTest - Enhancements

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>

[ROCm/rocdecode commit: befc6f6562]
2024-10-02 17:35:56 -04:00
..
2024-07-26 17:09:58 -04:00

Video decode batch sample

This sample decodes multiple files using multiple threads, using the rocDecode library. The input is a directory of files and an input number of threads. The maximum number of threads is capped to 64. If the number of files is higher than the number of threads requested by the user, the files are distributed to the threads in a round robin fashion. If the number of files is lesser than the number of threads requested by the user, the number of threads created will be equal to the number of files.

Prerequisites:

  • Install rocDecode

  • FFMPEG

    • On Ubuntu
    sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev
    
    • On RHEL/SLES - install ffmpeg development packages manually or use rocDecode-setup.py script

Build

mkdir video_decode_batch && cd video_decode_batch
cmake ../
make -j

Run

./videodecodebatch -i <directory containing input video files [required]> 
                                   -t <number of threads [optional - default:4]>
                                   -d <Device ID (>= 0) [optional - default:0]>