Performance of recording (encoding) while rendering at the same time


Platform: Jetson AGX Orin 32GB.
Task: rendering and recording 4K60FPS.

Right now I’m doing some estimation tasks of encoding. Our use case is, we will render a 4K video in 60 FPS while doing the recording (as request) in the background at the same time. I have tested the 4K60 performance separately for rendering and encoding, no issues at all. Next, I revised the 10_argus_camera_recording by adding another consumer called “PreviewConsumer”, and subscribed it to the streamer, but however the frame rate dropped significantly, to 8FPS only. I enclosed the revised code in the attachment.

It would be great if anyone can give a suggestion on the feasibility of this task on Jetson Orin platform (AGX, or NX), and if it’s feasible, is the frame-drop caused by the streamer-consumer workflow that I had written, or else? Thanks in advance!

argus_recording_rendering.cpp (34.5 KB)


Please check the argus_camera if the same result.


Hi Shane,

Sorry for my late reply. Is this repo the argus_camera sample you suggested? Or where does it locate in multimedia API?


Have below command to get correspond version.

sudo apt list -a nvidia-l4t-jetson-multimedia-api
sudo apt install nvidia-l4t-jetson-multimedia-api=35.xxxxx


Thanks for reply! I have installed the API version 35.4.1, but where is the argus_camera sample you mean? Is it “09_argus_camera_jpeg” and “10_argus_camera_recording”?

It’s the apps instead of any of in the samples.

ls /usr/src/jetson_multimedia_api/argus/
apps  cmake  CMakeLists.txt  docs  include  LICENSE.TXT  README.TXT  RELEASE.TXT  samples

Understood, thanks for suggesting! I almost ignored this folder…

Hi Shane,

I took the argus camera as a reference, and now I can manage to do rendering and recording at the same time without scarifying performance, but I still have some further questions to bother you for suggestions.

  1. For the Encoding, I found in the Jetson Orin NX datasheet, the performance is reported based on different profiles, UHP, HP and HQ. My understanding they are High performance and High quality, but when I implement the H264, and H265 encoding using NvVideoEncoder, how do I set the profile to encoder? For H264, the profile in the code is like V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, Main or Baseline etc., and there is also a method called “setHWPresetType”, how do I correctly setup a “profile” for UHP, HP and HQ respectively?

  2. I have another requirement which is to enable the recording function as needed while rendering. I have two EGLOutputStreams, one for rendering, and another one for encoding. In the beginning, only the Rendering outputstream is enabled in iRequest, and when the recording is needed, I have to stopRepeat(), and enabled the recording outputstream to the same iRequest, and repeat(request.get()) again. Is this a correct way to do this? Could you pls give your suggestion if there’s any better way?


For the 2.
Suppose don’t need stopRepeat() if you launch argus_camera in video mode.
Please confirm by argus_camera GUI for video mode for recording.


For hardware encoding, please refer to the sample:


And check the part about this option:

        -p <profile>          Encoding Profile [Default = baseline]

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