H.265 and H.264 Encoding Issues with ZED 2 Camera on Nvidia Jetson Orin Nano
Issue Overview
Users of the Nvidia Jetson Orin Nano development board are experiencing difficulties when attempting to record video from a ZED 2 camera using H.265 or H.264 encoding. The problem occurs during the execution of a Python script designed to record data from the camera. When running the script, users encounter an error message indicating that H.265 is not supported, followed by a "SVO RECORDING ERROR".
This issue is observed on a system running nvidia-l4t-core 35.4.1-20230801124926 with the ZED SDK version ZED_SDK_Tegra_L4T35.4_v4.1.3.zstd. The error persists despite the presence of H.265-related components in the system, as evidenced by the output of the gst-inspect-1.0
command.
Possible Causes
-
Hardware Limitation: The primary cause of this issue is a hardware limitation of the Nvidia Jetson Orin Nano. Unlike some other models in the Jetson family, the Orin Nano does not have dedicated hardware encoders for H.264 and H.265.
-
Software Configuration: The Python script may be configured to use hardware encoding by default, which is not available on the Orin Nano.
-
Incompatible SDK Settings: The ZED SDK might be set to use hardware encoding without checking for its availability on the specific Jetson model.
-
Driver or Firmware Issues: Although less likely, there could be inconsistencies between the installed drivers, firmware, and the SDK expectations.
Troubleshooting Steps, Solutions & Fixes
-
Use Software Encoding:
The most direct solution is to switch from hardware to software encoding. This can typically be done by modifying the recording parameters in your Python script.Update the
RecordingParameters
initialization in your script:recording_param = sl.RecordingParameters(opt.output_svo_file, sl.SVO_COMPRESSION_MODE.H264) recording_param.video_filename = opt.output_svo_file recording_param.compression_mode = sl.SVO_COMPRESSION_MODE.H264 recording_param.use_hardware_encoding = False
-
Check ZED SDK Compatibility:
Ensure that you are using the latest version of the ZED SDK that is compatible with your Jetson Orin Nano and L4T version. Visit the Stereolabs website to download the appropriate SDK version. -
Verify System Configuration:
Double-check your system configuration to ensure all necessary components are correctly installed:dpkg -l | grep nvidia-l4t-core dpkg -l | grep zed-sdk
-
Update L4T and Drivers:
Ensure you have the latest L4T (Linux for Tegra) version installed on your Jetson Orin Nano. Check for updates and install them if available. -
Alternative Recording Formats:
If H.264/H.265 encoding is not critical for your application, consider using alternative compression modes supported by the ZED SDK, such as LOSSLESS or H264_LOSSLESS. -
Hardware Upgrade Consideration:
For applications requiring hardware-accelerated H.264/H.265 encoding, consider upgrading to a Jetson model that supports these features, such as the Orin NX or Xavier NX. -
Environment Variable Setting:
If you encounter issues with SVO version compatibility, you can set an environment variable to revert to the original SVO version:export ZED_SDK_SVO_VERSION=1
Run this command before executing your Python script.
-
Debug Mode:
Enable debug logging in your ZED SDK application to get more detailed information about the encoding process:init = sl.InitParameters() init.sdk_verbose = True
-
Community Support:
If the issue persists, consider reaching out to the Nvidia Developer Forums or the Stereolabs support channels for more specialized assistance.
By implementing these solutions, particularly switching to software encoding, users should be able to successfully record video from their ZED 2 camera on the Nvidia Jetson Orin Nano development board.