How to setup the Zed2i as a Webcam

Hi there,

I’m currently a bit lost. I have a Zed2i attached to a Jetson NX 16GB. I usually use the camera for navigation, which works quite decent.
Now I have a 2nd use case, where I want the ZED2i as a normal webcam with 30fps and just one lens so that a Firefox website would detect and use it. I thought that this should be easy but I’m absolutely lost here. Can anyone give me a hint? Would some Gstreamer setup be correct?
I’m really thankful for any hint you can give me

Hi @TAlscher ,

Welcome to the community :wave:

I am not sure what you want to do. If you want to stream the ZED camera thanks to gstreamer we provide theses sample that can be useful (This is basically the zed component for gstreamer). However regarding the firefox we cannot provide support for this part.

Regards,
Tanguy

Thanks for your response!

To clarify, I’m trying to use my Zed2i camera as a regular webcam for programs like Teams or Firefox. I don’t need help integrating it directly into Firefox, but I’m struggling to set up my system so other apps can recognize and use the Zed2i.

The main problem is that the video stream from the Zed shows both camera lenses, while I only need one. I’ve experimented with v4l2loopback and gstreamer without success. I’ve also tried using Python’s cv2.VideoWriter to write on a virtual webcam, but that hasn’t worked either.

I think I’m missing something crucial here.

Hi @TAlscher,

We haven’t had users attempt to do this before, but retrieving one camera stream through the SDK and publishing it as a virtual camera seems to be the way to go IMHO.

It works for me now.

If anyone else is having trouble with this, here are some things I learned:

  1. Virtual Camera: I used v4l2loopback to create a virtual camera.
  2. Browser Issues: Browsers often guess camera stats incorrectly. In my case, WebRTC needed 30fps but guessed based on image size (over 800px = 15fps, under 800px = 30fps).
  3. Python Pipeline: I built a Python pipeline using linuxpy.video.device and pyzed.sl libraries. Cropping the image to 799x799 forced WebRTC to detect 30fps.

ZED Problem: I’m encountering a strange issue where zed.retrieve_image(image, sl.VIEW.LEFT) sometimes returns the right image instead.

Hopefully this helps someone else!