Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 2.11 KB

File metadata and controls

77 lines (55 loc) · 2.11 KB

Hardware acceleration for transcoding

Proposed setup for hardware-accelerated scaling and encoding:

  • GPU Model: Nvidia Quadro P4000
  • GPU arch: Pascal GP104
  • Centos: 7
  • Kernel + header: 3.10
  • Gcc: 4.8.5
  • Glibc: 2.17
  • CUDA Driver 10.1
  • CUDA Runtime 10.0
  • Nvidia driver: 418.43

Nvidia driver

$ chmod 755 NVIDIA-Linux-x86_64-418.43.run
$ ./NVIDIA-Linux-x86_64-418.43.run -h
$ ./NVIDIA-Linux-x86_64-418.43.run -x
$ cd ./NVIDIA-Linux-x86_64-418.43
$ ./nvidia-installer # can --uninstall

Verify the driver is loaded:

$ lsmod | grep nvidia
$ cat /proc/driver/nvidia/version
$ ./nvidia-smi

Complete install doc

CUDA SDK

Verify that CUDA can talk to GPU card:

~/cuda-10.0-samples/NVIDIA_CUDA-10.0_Samples/1_Utilities/deviceQuery/deviceQuery
[...]
Device 0: "Quadro P4000"
  CUDA Driver Version / Runtime Version          10.1 / 10.0
[...]

Nvidia codec for ffmpeg:

NVENC needs for custom headers maintained outside of ffmpeg sources.

ffmpeg doc for NVENC

This is added in the install script.

Measuring CPU and GPU utilization

$ vmstat -w -n 1 # check "us" (user) column
$ nvidia-smi dmon -i 0 # check "enc" column

Troubleshoot

Got this message after ffmpeg version bumped:

[h264_nvenc @ 0x25d3440] Driver does not support the required nvenc API version. Required: 9.0 Found: 8.1
[h264_nvenc @ 0x25d3440] The minimum required Nvidia driver for nvenc is 390.25 or newer

Version doesn't seem to match anything but bumping the driver from 415 to 418 solved it.