How to speed up 15_multivideo_encode encode delay

I use 32G AGX Orin, jetpack 5.0.2.
I need use AGX Orin to encode 4 1080p camera to h265 in parallel, and average encode delay must small than 10ms for every frame.
So I add time delay measurement code in 15_multivideo_encode:

And use command below to speed up nvcode and vic frequency:

echo "793600000" > /sys/class/devfreq/154c0000.nvenc/userspace/set_freq
echo "userspace" > /sys/class/devfreq/15340000.vic/governor
echo "729600000" > /sys/class/devfreq/15340000.vic/userspace/set_freq

Then use command below to run multivideo_encode

./multivideo_encode num_files 4 ./video_test.yuv 1920 1080 H265 sample_outdoor_car_1080p_10fps.h265 ./video_test.yuv 1920 1080 H265 sample_outdoor_car_1080p_10fps_second.h265 ./video_test.yuv 1920 1080 H265 sample_outdoor_car_1080p_10fps_third.h265 ./video_test.yuv 1920 1080 H265 sample_outdoor_car_1080p_10fps_forth.h265 -br 2000000 -hpt 1 -p main -l high4.0

Then print log below:

From the log, it shows all thread delay is much more than 10ms. And seems I frame encode cost maximum delay.
So if it possible to speed up encode process? What is the banchmark of nvenc in 32G AGX Orin? Will 64G AGX Orin will better?

The capability is listed in

And the power modes are listed in
Jetson Orin Nano Series, Jetson Orin NX Series and Jetson AGX Orin Series — Jetson Linux Developer Guide documentation

Maximum clock of NVENC is 793.6MHz on AGX Orin 32GB, and 998.4MHz on AGX Orin 64GB. Ideally encoding performance is better on AGX Orin 64GB.

Hi @DaneLLL ,
Thanks for reply. I found the delay should come from jtop tool. When I open jtop, it will increase delay, do you know why?

The tool may consume certain CPU usage. You may use sudo tegrastats for checking system status.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.