In the docs it was mentioned that we can connect 4 Zed x cameras to a Zed box orin and stream at HD1200@30fps. But empirically we only measured 14-16 fps when streaming from four cameras (depth disabled). According to the docs we attach two zed x cameras per group and still 30fps@HD1200, so in total that is 4 cameras per box. As another test we only connected 2 cameras to the box. we are able to stream at 30fps @hd1200
Hi @narsimha
Welcome to the StereoLabs community
How did you measure this?
Are you using a custom software?
Have you tried to use the ZED Studio application?
Is the ZED Box running in MAXN power mode with the jetson_clocks script running?
I was using this custom script to check fps for each camera along with different combination of cameras. Device was set to max power mode (0), but I haven’t used any jetson_clocks scripts in background.
import time
import itertools
import pyzed.sl as sl
SERIALS = {0: 40966563, 1: 42533328, 2: 43221759, 3: 49402962}
RESOLUTIONS = [(“HD1200”, sl.RESOLUTION.HD1200), (“SVGA”, sl.RESOLUTION.SVGA)]
FPS_TARGETS = [30, 60]
DURATION_S = 6.0
COMBOS = (
[(i,) for i in range(4)] +
list(itertools.combinations(range(4), 2)) +
[(0, 1, 2, 3)]
)
results =
for res_label, res in RESOLUTIONS:
for fps in FPS_TARGETS:
for combo in COMBOS:
zeds =
ok = True
for idx in combo:
z = sl.Camera()
init = sl.InitParameters()
init.set_from_serial_number(SERIALS[idx])
init.depth_mode = sl.DEPTH_MODE.NONE
init.camera_resolution = res
init.camera_fps = fps
st = z.open(init)
if st != sl.ERROR_CODE.SUCCESS:
print(f"[{res_label}@{fps} cams={combo}] cam{idx} OPEN FAILED: {st}“, flush=True)
ok = False
for _, zz in zeds:
zz.close()
break
rec = sl.RecordingParameters(f”/tmp/matrixtest_cam{idx}.svo2", sl.SVO_COMPRESSION_MODE.H264)
rst = z.enable_recording(rec)
if rst != sl.ERROR_CODE.SUCCESS:
print(f"[{res_label}@{fps} cams={combo}] cam{idx} RECORDING FAILED: {rst}", flush=True)
ok = False
z.close()
for _, zz in zeds:
zz.close()
break
zeds.append((idx, z))
if not ok:
results.append((res_label, fps, combo, None))
continue
rt = sl.RuntimeParameters()
grabs = {idx: 0 for idx, _ in zeds}
t0 = time.time()
while time.time() - t0 < DURATION_S:
for idx, z in zeds:
if z.grab(rt) == sl.ERROR_CODE.SUCCESS:
grabs[idx] += 1
elapsed = time.time() - t0
for idx, z in zeds:
z.disable_recording()
z.close()
per_cam_fps = {idx: c / elapsed for idx, c in grabs.items()}
avg_fps = sum(per_cam_fps.values()) / len(per_cam_fps)
combo_str = ",".join(str(i) for i in combo)
fps_str = ",".join(f"{per_cam_fps[i]:.1f}" for i in combo)
print(f"[{res_label}@{fps}fps req] cams=({combo_str}) -> per-cam fps=[{fps_str}] avg={avg_fps:.1f}", flush=True)
results.append((res_label, fps, combo, per_cam_fps))
print(“\n=== SUMMARY ===”)
for res_label, fps, combo, per_cam_fps in results:
combo_str = “,”.join(str(i) for i in combo)
if per_cam_fps is None:
print(f"{res_label}@{fps}fps cams=({combo_str}): FAILED")
else:
avg = sum(per_cam_fps.values()) / len(per_cam_fps)
print(f"{res_label}@{fps}fps cams=({combo_str}): avg {avg:.1f} fps")
Is there any end-end guide that explains the setup of multiple cameras across different zed orin boxes and syncing them? If so that would be greatly appreciated.
Yes sure: