Jetson AGX h.265 encode latency

Thanks, @DaneLLL. A couple of follow-up questions:

  1. Is the VIC freq tied to NVENC freq, i.e., assigning maxfreq to vicfreqctrl will also maximize the nvenc encoder freq on the Jetson AGX Xavier? Or are there different parts in the /sys/devices tree to write to to maximize performance of the nvenc encoder specifically?
  2. How many streams can be processed truly in parallel by the hardware encoder engines? Is that two, because of the two engines, or can each engine also encode multiple streams truly in parallel?
  3. We ran 15_multivideo_encode with the default ULTRAFAST encoder preset, followed by another run with the SLOW encoder setting, and measure execution time with the time tool, like this:
$ time multivideo_encode num_files 4 ~/file.yuv 1920 1080 H265 ~/file1.h265 ~/file.yuv 1920 1080 H265 ~/file2.h265 ~/file.yuv 1920 1080 H265 ~/file3.h265 ~/file.yuv 1920 1080 H265 ~/file4.h265

For different values of num_files, the results are below:

Ultrafast, num_files=1: real 0m12.918s
Ultrafast, num_files=2: real 0m10.291s
Ultrafast, num_files=3: real 0m12.071s
Ultrafast, num_files=4: real 0m12.295s

Code changed to preset “slow”, and re-ran multivideo_encode as above:

Slow, num_files=1: real 0m25.962s
Slow, num_files=2: real 0m26.466s
Slow, num_files=3: real 0m35.490s
Slow, num_files=4: real 0m47.256s

It appears that the SLOW preset is not able to process more than 2 streams in parallel. Are there specific reasons (HW chokepoints) for the SLOW versus ULTRAFAST setting that would explain this behavior?

  1. For the ULTRAFAST, FAST, MEDIUM, and SLOW presets, are you able to share what these settings individually enable/disable for the encoder?
  2. Should the FAST & MEDIUM settings have better parallel performance? What do you lose with those compared to SLOW?

Thanks!