Rtsp encoding issue (failing to create encoder)

I am using 5.1.2 on an x86 running Ubuntu 24.04 (cuda 13.1) with a 4070 GPU. When I try the streaming_sender.py example, I get the following:

python3 ./streaming_sender.py
[Sample] Using default resolution
[2026-02-07 14:46:03 UTC][ZED][INFO] Logging level INFO
[2026-02-07 14:46:03 UTC][ZED][INFO] Using USB input… Switched to default resolution HD720
[2026-02-07 14:46:04 UTC][ZED][INFO] [Init] Camera successfully opened.
[2026-02-07 14:46:04 UTC][ZED][INFO] [Init] Camera FW version: 1523
[2026-02-07 14:46:04 UTC][ZED][INFO] [Init] Video mode: HD720@30
[2026-02-07 14:46:04 UTC][ZED][INFO] [Init] Serial Number: S/N 16871106
[2026-02-07 14:46:04 UTC][ZED][INFO] [Init] Depth mode: NONE
[2026-02-07 14:46:04 UTC][ZED][WARNING] [Init] Self-calibration skipped. Scene may be occluded or lack texture.
Streaming on port 30000
[Streaming] Use Transport layer mode : 0
[ZED][SLHW] Failed to create encoder. Err : CreateEncoder : m_nvenc.nvEncInitializeEncoder(m_hEncoder, &m_initializeParams) returned error 8 at ../src/sl_input/NVCompression/NvCodec/NvEncoder/NvEncoder.cpp:275

[ZED][Streaming] Failed to create encoder [0.0] at resolution 1280x720
[2026-02-07 14:46:04 UTC][ZED][ERROR] [Streaming] Cannot enable streaming: Err Code -4

ZED_Diagnostics says everything is fine. I also note that running getpythonapi.py seems to produce a 5.1 version not a 5.1.2 version of the api because a software version of the H264 encoder isn’t available

Hi @bblumberg
Please test your software with the just-released ZED SDK v5.2.

Same issue even persists after updating to 5.2.0. my env is

ZED SDK 5.2.0

CUDA 12.0.76

RTX 5090, Intel(R) Core™ Ultra 9 285K

Please run the ZED Diagnostic tool and share the content of the report that it generates.

I recommend that you upgrade CUDA to a newer version.

@waystogetthere @bblumberg can you please check the version of the NVIDIA Drivers installed on your machines?

We are tracking a potential bug in a newer version of the NVIDIA Drivers, which is preventing the usage of the hardware encoding required by the Streaming module and the SVO recording module.

I confirm using the driver v581.80 fixed my issue

Hi Myzhar,

Thanks for your feedback. This is the logging of Zed Diagnosis

ZED_Diagnostic_Results.json (20.1 KB)

Best regards,

waystogetthere

Hi @waystogetthere
You are using the NVIDIA "driverVersion": "591.55", which is the version that is causing this type of issue.

We recommend that you downgrade to the validated v581.80

1 Like

Hi @Myzhar

Thanks! After I roll back to 581.80 it works now. I can do some recording via H265 H264 H265.lossless, H264.lossless. Before that I can only do it with Lossless