2024-01-26 05:19:24 -08:00
# rocDecode Test Scripts
2023-12-05 05:43:33 -08:00
## Pre-requisites to run python script
2024-01-26 05:19:24 -08:00
* Install [rocDecode ](../../README.md#build-and-install-instructions )
2023-12-05 05:43:33 -08:00
2024-01-26 05:19:24 -08:00
* [FFMPEG ](https://ffmpeg.org/about.html )
2023-12-05 05:43:33 -08:00
2024-01-26 05:19:24 -08:00
* On `Ubuntu`
```shell
2025-01-02 06:42:31 -08:00
sudo apt install libavcodec-dev libavformat-dev libavutil-dev
2024-01-26 05:19:24 -08:00
` ``
* On ` RHEL`/` SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script
* Python3 and pip packages - ` pandas`, & ` tabulate`
` ``shell
python3 -m pip install pandas tabulate
2023-12-05 05:43:33 -08:00
` ``
2024-01-26 05:19:24 -08:00
## Scripts
2023-12-05 05:43:33 -08:00
2024-01-26 05:19:24 -08:00
**Usage:**
2023-12-05 05:43:33 -08:00
2024-01-26 05:19:24 -08:00
* **run_rocDecodeSamples.py**
` ``shell
2023-12-05 05:43:33 -08:00
usage: run_rocDecodeSamples.py [--rocDecode_directory ROCDECODE_DIRECTORY]
[--gpu_device_id GPU_DEVICE_ID]
[--files_directory FILES_DIRECTORY]
[--sample_mode SAMPLE_MODE]
[--num_threads NUM_THREADS]
optional arguments:
-h, --help show this help message and exit
--rocDecode_directory ROCDECODE_DIRECTORY
2023-12-12 07:34:31 -08:00
The rocDecode Directory - required
2023-12-05 05:43:33 -08:00
--gpu_device_id GPU_DEVICE_ID
The GPU device ID that will be used to run the test on it - optional (default:0 [range:0 - N-1] N = total number of available GPUs on a machine)
--files_directory FILES_DIRECTORY
The path to a dirctory containing one or more supported files for decoding (e.g., mp4, mov, etc.) - required
--sample_mode SAMPLE_MODE
The sample to run - optional (default:0 [range:0-1] 0: videoDecode, 1: videoDecodePerf)
--num_threads NUM_THREADS
2024-08-12 09:39:43 -04:00
The number of threads is only for the videoDecodePerf sample (sample_mode = 1) - optional (default:1)
--max_num_decoded_frames MAX_NUM_DECODED_FRAMES
The max number of decoded frames. Useful for partial decoding of a long stream. - optional (default:0, meaning no limit)
2023-12-15 15:54:05 -05:00
` ``
2024-01-26 05:19:24 -08:00
* **run_rocDecode_Conformance.py**
` ``shell
2023-12-15 15:54:05 -05:00
usage: run_rocDecode_Conformance.py [--rocDecode_directory ROCDECODE_DIRECTORY]
[--gpu_device_id GPU_DEVICE_ID]
[--files_directory FILES_DIRECTORY]
optional arguments:
-h, --help show this help message and exit
--rocDecode_directory ROCDECODE_DIRECTORY
The rocDecode Directory - required
--gpu_device_id GPU_DEVICE_ID
The GPU device ID that will be used to run the test on it - optional (default:0 [range:0 - N-1] N = total number of available GPUs on a machine)
--files_directory FILES_DIRECTORY
The path to a dirctory containing one or more supported files for decoding (e.g., mp4, mov, etc.) and their corresponding reference MD5 digests - required
` ``