We are using four cameras with a resolution of 2592×1944 at 30 fps on Jetson AGX Orin. The video streams are encoded using H.264.
However, when H.264 encoding is enabled for all four streams, the output frame rate drops to about 14 fps per stream.
If we disable encoding, or enable encoding for only two streams, all four camera outputs can maintain 30 fps normally.
We would like to understand why enabling four simultaneous H.264 encoders causes the frame rate to drop significantly, and whether this is related to the NVENC throughput limitation or configuration.
Could you please help analyze this issue and advise if there are recommended configurations or optimizations to achieve 4× 2592×1944 @ 30 fps H.264 encoding on Jetson AGX Orin?
— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —
To analyze the issue of the frame rate drop when enabling four simultaneous H.264 encoders on Jetson AGX Orin, let’s consider the following factors:
- NVENC throughput limitation: The NVENC encoder on Jetson AGX Orin has a limited throughput, which can be a bottleneck when encoding multiple streams simultaneously. According to the documentation, the NVENC encoder can handle up to 4K resolution at 60 fps for a single stream. However, when encoding multiple streams, the throughput is divided among them, which can lead to a decrease in frame rate.
- Configuration and optimization: The encoding configuration and optimization can also impact the performance. The H.264 encoding settings, such as bitrate, GOP size, and profile, can affect the encoding speed and quality. Additionally, the system configuration, including CPU, memory, and GPU utilization, can also impact the performance.
To achieve 4× 2592×1944 @ 30 fps H.264 encoding on Jetson AGX Orin, consider the following recommendations:
- Optimize encoding settings: Experiment with different encoding settings, such as bitrate, GOP size, and profile, to find the optimal balance between quality and performance.
- Use a more efficient encoding profile: Consider using a more efficient encoding profile, such as H.264 Main or High profile, which can provide better compression efficiency and faster encoding speeds.
- Adjust system configuration: Ensure that the system configuration is optimized for encoding performance. This includes adjusting CPU, memory, and GPU utilization to minimize resource contention.
- Consider using a hardware-accelerated encoder: If the Jetson AGX Orin has a hardware-accelerated encoder, consider using it instead of the software-based encoder. Hardware-accelerated encoders are often optimized for low-latency applications and can provide better performance.
- Monitor system resources: Monitor system resources, including CPU, memory, and GPU utilization, to ensure that they are not being bottlenecked. Use tools like
htop, nvidia-smi, or jetson_stats to monitor system resources.
In summary, the frame rate drop when enabling four simultaneous H.264 encoders on Jetson AGX Orin is likely due to the NVENC throughput limitation and configuration. By optimizing encoding settings, using a more efficient encoding profile, adjusting system configuration, considering hardware-accelerated encoders, and monitoring system resources, you can achieve better performance and potentially reach 4× 2592×1944 @ 30 fps H.264 encoding on Jetson AGX Orin.
Note: The provided context does not specify the exact JetPack or L4T version used on the Jetson AGX Orin. Ensure that the recommendations are compatible with the version used in your setup.
— We support team will also look into your issue to have further suggestions soon. please stay tuned. —
Hello @lvjianming1
Could you please share the commands or GStreamer pipelines that you are using for simultaneous capturing?
Best regards!
Eduardo Salazar
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com
Hi,
Please apply this to fix NVENC at maximum frequency:
Making sure you're not a bot!
[gstreamer/MMAPI] cannot run hardware encoder in maximum performance mode
Hi,
We followed the suggestion to set the NVENC frequency to the maximum:
sudo su
cd /sys/devices/platform/bus@0/13e00000.host1x/154c0000.nvenc/devfreq/154c0000.nvenc
cat available_frequencies
echo maximum_frequency > min_freq
After setting the NVENC frequency to the maximum, we tested again, but the issue remains the same. The encoding frame rate did not improve.
We are wondering if this behavior might be related to the H.264 encoding capability or throughput limitation of the AGX Orin NVENC, especially when running multiple high‑resolution streams.
Hi,
Please run $ sudo tegrastats to check if NVENC is at full loading.
hi,DaneLLL
Hi,
We checked the system status using tegrastats during the test. The NVENC engine is almost fully utilized:
NVENC 99%@998
Hi,
This is constraint of NVENC engine since it is at full loading.
Hi,
Thanks for the clarification.
Since the NVENC engine is already at full load, could you please advise on possible ways to mitigate this issue?
For example:
- Would switching from H.264 to H.265 encoding help reduce the NVENC load in this scenario?
- Are there any recommended encoder configurations (preset, profile, bitrate control, etc.) that could improve the throughput?
- Is there a recommended maximum number of streams or resolution/fps combination for AGX Orin NVENC?
Any suggestions or best practices would be appreciated.
Hi,
H265 has slightly better throughput when comparing to H264, so you may try H265. And if you don’t set preset to ultrafast, please set to ultrafast.
H265 + ultrafast is maximum throughput of NVENC.