How to use all of encoder Instances 0, 1, 2 for encoding on Nvidia Drive AGX Orin

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.3.10904
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hello Nvidia support team,
We are trying to encode 8 gmsl2 cameras (4x8mp IMX728 gmsl2 cameras and 4x3mp IMX623 gmsl2 cameras).
With camera sample application and by using Driveworks’s Serialization API, we can encode all of the 8 cameras into h264 bitstreams and transfer them over network.
However, we cannot maintain the framerate of 30fps. In the rig file, we can specify the number of encoder-instance for encoding. For this we used encoder-instance 0, it works. But when we tried to use other encoder-instances such as encoder-instance 1 for serialization, we have the following errors while running the application.

“[15-05-2024 12:41:59] Driveworks exception thrown: DW_NVMEDIA_ERROR: SyncNvMediaEncoder::getEOFFence::NvMediaIEPGetEOFNvSciSyncFence: failed to get EOFNvSciSyncFence : 7”

We don’t know why this error occurs,
We would like to understand why only encoder-instance 0 can be used? Is it possible to use encoder instance 1, or 2 for encoding as well?

thank you for your response in advance!

Could you please provide the complete command used for encoding the 8 GMSL2 cameras, along with the files used and the output generated?

Dear @buva5871,
We would like to understand why only encoder-instance 0 can be used? Is it possible to use encoder instance 1, or 2 for encoding as well?

Orin has only one NVENC engine. Please see instanceId in NVIDIA DRIVE OS Linux SDK API Reference: Image Encoder | NVIDIA Docs .

From DriveWorks SDK Reference: Configuration Reference encoder-instance parameter selects the NVENC engine. Hope this clarifies.

Hi SivaRamaKrishnaNV,
thank you for your response.
we are trying to downsample them camera’s images before encoding them using serialization api. Is it possible to do that?

1 Like

Could you please elaborate on your specific use case for downsampling the camera images before encoding them using the serialization API?

We are facing some issues while trying to encode 4x8mp and 4x3mp gmsl2 cameras into h264 format using hardware encoder. We cannot maintain 30fps while encoding. We think the hardware encoder already reaches the throughput limit. The idea was to reduce the resolution of the camera’s raw image before feeding them to the h264 serialization api to maintain constant 30fps for each cameras.
How can we do rescale the image before feeding them into the driveworks’s serialization api for encoding?

Please refer to the following sensor parameters used in our data collection to see if they can assist with your use case:

quality=20,gop-length=5,bitrate=50000000,slave=0,ref-frames=1,entropy=cavlc

Additionally, you may find related documentation on sensor configuration in the Configuration Reference page which Siva provided earlier.

Dear @buva5871,

Could you try using isp0-res=widthxheight -output-format=processed . Please see
DriveWorks SDK Reference: Camera for details.

Please share the used right parameters and observation details for further guidance.

1 Like

Hi SivaRamaKrishnaNV,

thank you for your guidance!
we can now reduce the resolution of raw image before feeding them to the h264 serialization api.
best regards,
Bui