Файли
rocm-systems/samples/videoDecodeBatch/README.md
T
Lakshmi Kumar ce3ebadaab Samples - Multi Threaded Multi FIles (#255)
* adding new sample for decoding mulitple files on multiple threads

* threads work ; no decoding yet

* working version

* code clean up

* review comments

* removing spaces

* review comments

* fps cal + name changes for files

* code clean up

* update readme

* update readme

* remove spaces

* change to lambda functions

* changes for using reconfig

* adding dumping of yuv frames + review comments

* review comments

* remove extra lines/spaces

* adding struct for decoder info

* make separate decoders for 8 & 10bit

* code clean up

* addign reset for Saving frames

* review comments

* fixes dump issue for new file

* cmake update for threads

* support for avc

* name change for sample

* cmake soource name change

* readme update

* fixing typo in readme

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
2024-03-07 20:29:14 -05:00

1.2 KiB

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