Encoder max-perf isn't working

Hi. I’am porting our application to JP38.2.0 and found an issue: max-perf mode is broken for Jetson Thor encoders. It is able to reproduce with 01_video_encode example:

nvidia@jetson:/usr/src/jetson_multimedia_api/samples/01_video_encode$ sudo ./video_encode ~/test.nv12 1920 1080 H264 ~/test.h264 --stats --copy-timestamp 1 --blocking-mode 0 --max-perf
Creating Encoder in non-blocking mode 
Opening in O_NONBLOCKING MODE 
875967048
842091865
[ERROR] (NvV4l2Element.cpp:186) <enc0> Error setting controls: Invalid argument
[ERROR] (NvVideoEncoder.cpp:463) <enc0> Enabling Maximum Performance : failed: Invalid argument
Error while setting encoder to max perf
App run failed

Hi,
Could you try blocking mode?

Is this still an issue to support? Any result can be shared?

No, because we are porting application from previous JP and it is already designed to work in non-blocking mode.

With mmapi example it is possile to reproduce too:

nvidia@jetson:/usr/src/jetson_multimedia_api/samples/01_video_encode$ sudo ./video_encode ~/test.nv12 1920 1080 H264 ~/test.h264 --stats --copy-timestamp 1 --blocking-mode 1 --max-perf
Creating Encoder in blocking mode 
Opening in BLOCKING MODE 
875967048
842091865
[ERROR] (NvV4l2Element.cpp:186) <enc0> Error setting controls: Invalid argument
[ERROR] (NvVideoEncoder.cpp:463) <enc0> Enabling Maximum Performance : failed: Invalid argument
Error while setting encoder to max perf
App run failed

Hi,
You are right. The max-perf option is not supported on Jetpack 7 Thor and Jetpack 6 Orin.
On AGX Thor, please use nvpmodel.conf:
Jetson Thor Product Family — NVIDIA Jetson Linux Developer Guide

Please modify VIDEO MIN_FREQ to be same as MAX_FREQ, and reboot the system to take effect.