Camera stream failed to start error - Virtual Stereo Camera Setup w/ 2 ZED Xone GS 4mm

I was able to complete calibration, but can’t seem to open the virtual stereo camera in my code. It returns an error “camera stream failed to start.”

The calibration file was copied to the Zed Settings folder, and the number generated during calibration is what I used as the virtual stereo number in the code which is attached here.
vstereo_test2.py (1.6 KB)

Hardware

Jetson Xavier AGX.

2x ZED X One SG with 4mm lens.

Duo capture card

Software
ZED SDK 5.2.3
driver 1.4.1
Jetpack 5.1.2
Ubuntu 20.04

Diagnostic checks
Ran ZED_Explorer -all in terminal.

trackernano@ubuntu:~$ ZED_Explorer -all

Cam 0

Model : “ZED XOne GS”
S/N : 305072903
State : “AVAILABLE”
Path : /dev/i2c-9
ID : 0
Port : 0
Type : “GMSL”


Cam 1

Model : “ZED XOne GS”
S/N : 307352076
State : “AVAILABLE”
Path : /dev/i2c-10
ID : 1
Port : 1
Type : “GMSL”


Ran diagnostic check. Results are here.
ZED_Diagnostic_Results.json (23.2 KB)

Hi @ravishing833
Welcome to the StereoLabs community.

Can you please verify if it works using the C++ code of the stereo_reprojection_viewer application?

Yes. It said it detected the virtual camera and opened it!
Here is the terminal printout.
tracker1@xavieragx:~/Downloads/zed-opencv-calibration/build/stereo_reprojection_viewer$ ./zed_reprojection_viewer --virtual --left_sn 305072903 --right_sn 307352076

  • Virtual Stereo Camera mode enabled.
  • Using serial numbers for left and right cameras: 305072903, 307352076
  • Unique Virtual SN: 115258193 (Generated by the ZED SDK)
  • ZED X One GS Virtual Stereo Camera detected.
    Distortion Coefficients:
    [-3.654500007629395, 5.207950115203857, 0.0007962050149217248, -0.0006751129985786974, -1.698539972305298, -3.578690052032471, 4.964210033416748, -1.406489968299866, 0, 0, 0, 0]

I also attached a screen shot.

We also could not get it working with Python and pyzed with the same error. The cameras are Zed X One 4K in our case.

[2026-04-27 10:12:39 UTC][ZED][ERROR] CAMERA STREAM FAILED TO START in sl::ERROR_CODE sl::Camera::open(sl::InitParameters)

The C++ example in /usr/local/zed/samples/virtual stereo/cpp works fine though. For “virtual stereo” there is also no python example provided.

The ZED SDK team is verifying if this is a problem affecting the Python API for Virtual Stereo Cameras.

Hey! I confirm that it is a problem in the python sdk. I tried running the same in cpp, and it does not fail at activating camera, the way it does in python, giving the same error as the post, and works smoothly.
However, CameraOne works, so its a problem when they are set as stereo cameras.
Calibration works, as well as the reprojection code in the same github repo

My setup:

SDK version: 5.2.3
Device: Jetson Orin AGX, with Quad card installed
Jetpack version: 6.1.1
Zed driver version: RT for 6.1.1 for quad card
Pytho version: 3.10.12

$ ZED_Explorer -all :

Cam 0

Model : “ZED XOne GS”

S/N: 305006499

State : “AVAILABLE”

Path: /dev/i2c-13

ID : 0

Port: 0

Type : “GMSL”

**

## Cam 1 ##

Model: “ZED XOne GS”

S/N: 303850153

State : “AVAILABLE”

Path : /dev/i2C-13

1D: 1

Port : 3

Type : “GMSL”

****

Hi @jazzslaya
Thank you for the feedback.
The ZED SDK team is working on a fix.

The ZED SDK team detected the cause of the problem. The fix will be available in one of the next patch releases.

Meanwhile, you can use a workaround:

input_t = sl.InputType()
err = input_t.set_virtual_stereo_from_serial_numbers(left_sn, right_sn, virtual_sn)
init_params.input = input_t 

You can also use set_virtual_stereo_from_camera_id in the same way.

What’s important is that you initialize sl.InputType() object before assigning it to init_params.input, because Python does not create a reference as C++ does, and the object is lost, causing the opening error.

1 Like