A program to benchmark the performance of NVIDIA NVDEC (through VideoProcessingFramework), PyAV, and OpenCV (without hardware acceleration) on video decoding operation. The following metrics are observed:
- Frame Processing Time (the time it takes to decode 1 frame)
- CPU Utilization Across All Cores
- Memory Utilization
- GPU Utilization
- GPU Memory Utilization
- Machine with supported NVIDIA GPU
- NVIDIA Driver
- Docker
- Git LFS
- Make sure you got all the prerequisites on your system (see section above)
- Clone the repo
- Download NVIDIA Video Codec SDK and place the zip file in the root directory of this project
- Run
git lfs pull
to download the sample videos from GitHub's Git Large File Storage - Build the docker image
2 build args are available:
docker build -t videc-benchmark .
PROJECT_PATH
, to control where in the image you want this project to be copied to, this arg defaults to/videc-benchmark
.VIDEO_CODEC_SDK_VERSION
, to specify which version of NVIDIA Video Codec SDK that you've downloaded from step 3, this arg defaults to 11.1.5.
- Run the docker image:
docker run --gpus all -it --pid host videc-benchmark bash
- Enter the following command inside the container's terminal:
Notes:
scripts/run-benchmark.sh -i ./videos/45-seconds.mp4 -w $x
- You should replace
$x
with an integer. The program will use the first$x
frames as warmup during the benchmark, meaning it won't collect any data during the processing of the first$x
frames. - The
./videos/45-seconds.mp4
part is the path to input file. You can look into thevideos
directory to see files that are available to be used as input.
- You should replace
- Copy the benchmark result from the container to the host:
docker cp <container ID>:/videc-benchmark/benchmark-results ./<directory name>
I've done the benchmark previously and I've compiled a report document. Click here if you need to read it.