Is there a way to start a virtual stream without ZED_Media_Server or via the CLI?

I have two Zed X One cameras and i want to stream them in a way that they are synchronized, so i can start a VirtualCameraStream, grab from it, and get the synchronized left and right images. How can I start the stream without ZED_Media_Server?

Hi @adinesh

You can use the new ZED SDK API introduced with version 5.1:

You can use also the new calibration tool for a good custom calibration:

I’m a little confused here. If I am on the same machine, and I am testing a sender and a receiver for a network stream, are they both supposed to use the same ports?

i have attached my sender and receiver code.

main.cpp (2.9 KB)

reciever.py (3.6 KB)

as you can see they are both trying to use port 34000, `[Streaming] Warning : receiving port 34000 is not available (already used)… switching to port 34002. Retrying…

should i program them to both use 34000 or no?

also, im getting this error: INVALID CALIBRATION FILE in sl::ERROR_CODE sl::camera::open(sl::InitParameters).

what should the calibration file be for a virtual camera? can you stream a virtual camera or no? streaming does not mean simply getting images from the cameras, but streaming it over a network.

full receiver output
(edgeTAM) jetson@503-abinaya-jetson:~/perception$ python3 reciever.py
[2025-11-12 01:52:43 UTC][ZED][INFO] Logging level INFO
[Streaming] Warning : receiving port 34000 is not available (already used)… switching to port 34002. Retrying…
[Streaming] No backward compatibility required.
[Streaming] Warning: Corrupted frame chunk received (recv: 196 / expect 16100) from ip : 127.0.0.1 at ts 1762912363725(ms)
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 279
NvMMLiteBlockCreate : Block : BlockType = 279
[2025-11-12 01:52:44 UTC][ZED][INFO] [Init] Serial Number: S/N 115047324
[2025-11-12 01:52:44 UTC][ZED][INFO] [Init] Fail to load valid Camera calibration, opening the camera in “uncalibrated mode”. Depth and most module are disabled, only recording, streaming and access to unrectified images are possible
[2025-11-12 01:52:44 UTC][ZED][INFO] [Init] Depth mode: NONE
[2025-11-12 01:52:44 UTC][ZED][ERROR] INVALID CALIBRATION FILE in sl::ERROR_CODE sl::camera::open(sl::InitParameters)
Camera Open : INVALID CALIBRATION FILE. Exit program.

The stream is open. But you are not providing a valid calibration file, so the application exits.

My question still stands: what should the calibration file be for a virtual camera? I have the extrinsic parameters between the two cameras, but would you just make another file with SNxxxx.conf with the serial number for the virtual camera? What format do you write the extrinsic parameters as?

Please send an example of a correct calibration file here.

You can use this package to calibrate the custom stereo device:

Hi! I understand! We use a different software to get very accurate calibration on our cameras. Could you please just send me an example`zed_calibration_[serial].yml` so i can see if we can plug and play with our derived extrinsics?

This is an example generated with the zed-opencv-calibration software.

zed_calibration_116090100.yml (1.1 KB)

Thank you so much!

I have a multi-sending and multi-receiving example working, and I’m seeing that a lot of the images are getting dropped, corrupted, or are empty. Do you have any settings you recommend me looking into to see why some frames are corrupted?

errors.txt (7.4 KB)

What application is generating that log? I cannot recognize it.

Here is the program! Nothing too crazy, just a multi-threading application to receive data on two cameras.

multi_receiver.py (5.0 KB)

But upon send look, I think I understand what is going wrong! right_cv_image never gets populated because there are already two threads running, that only need to grab one image each. Apologies for the confusion!

what path does the calibration file need to be saved in? if i am running the virtual stereo streaming script? should it be in /usr/local/zed/settings, or in the cwd? and do I need to anything like rename it to SN.conf? what information would that contain if so?

do i need to explicitly import it via init_parameters.optional_opencv_calibration_file?
i keep getting the ‘[2025-11-12 21:20:18 UTC][ZED][ERROR] INVALID CALIBRATION FILE in sl::ERROR_CODE sl:Camera:open(sl::InitParameters)’

here is my calibration file for reference:

zed_calibration_115047324.yml (1.2 KB)

In ZED SDK format: /usr/local/zed/settings.
In OpenCV format, wherever you like. You must set the correct FULL path to the file here:

Hi! Thank you Walter.

I have tried that already. Could you please look through my calibration files to see if there is something incorrect in the formatting? I have tried both the ZED SDK version and the OpenCV version, but I keep getting the error.

‘[2025-11-12 21:20:18 UTC][ZED][ERROR] INVALID CALIBRATION FILE in sl::ERROR_CODE sl:Camera:open(sl::InitParameters)’