Files
rocm-systems/samples/videoDecodeBatch
Pavel Tcherniaev 1b9dd60837 Fixed bug with videoDecodeBatch (#375)
* fixed bug with videoDecodeBatch

* changed if statement to check n_frame_returned
2024-07-09 10:59:41 -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]>