Page 1 of 1

raspivid exe on SLP image

Posted: Thu Apr 07, 2022 7:57 pm
by Oddbloke
Hi everyone!

The raspivid executable that's in /opt/StereoPI/bin/ ... is it the same one that's here:

https://github.com/raspberrypi/userland ... RaspiVid.c

... or has it been modified to grab two camera feeds?

The reason I ask is that I'm looking to use the cameras for a project of my own, and I was interested to know what method is being used to access them. (For example: is it using v4l, or libcamera, or something else?) I want to look at the raspivid source, but I wanted to check I was looking at the *right* version of the source. I figure you've either modified raspivid to grab two video devices at the same time, or you have a virtual device somewhere which splices them together so that raspivid doesn't know the difference. But here seemed a good place to ask! :)

All the best,

Kris.

Re: raspivid exe on SLP image

Posted: Thu Apr 14, 2022 8:48 pm
by Realizator
Hi Kris,

We are using the modified version, which supports the stereoscopic output to the HDMI. The "stock" raspivid has no this option.

raspivid is built on MMAL subsystem. It's good and polished, but now it is being replaced with libcamera-x libs (starting from Bullseye RaspiOS).

Re: raspivid exe on SLP image

Posted: Sat Apr 16, 2022 8:17 pm
by Oddbloke
Thanks for your reply! Where can I find the source for the modified version of raspivid?

Re: raspivid exe on SLP image

Posted: Sun Apr 17, 2022 7:16 pm
by Realizator
We didn't publish this, since it's very special (and not optimal for all usecases). Our suggestion of adding this to the main app on the github was rejected by Raspberry team, but you can find this issue discussion in this topic on the Raspberry forum.

Re: raspivid exe on SLP image

Posted: Tue Apr 19, 2022 2:24 pm
by Oddbloke
Hmm, that thread seems to suggest that your changes were quite minor - just a flag or two? I'd assumed the work would have been more substantial, to grab images from two devices rather than one. Or is it actually a single media feed with both camera images, side-by-side?

Re: raspivid exe on SLP image

Posted: Wed Apr 20, 2022 2:08 pm
by Realizator
Oddbloke, raspivid supports stereoscopic (dual camera) mode out-of-the-box. It combines two frames into one single image. The only issue for us was the lack of this combined image preview on HDMI, that's why we did this minor patch. :-)

if you add "-3d" key to the raspivid, it will capture stereoscopic mode. If you use "-cs 0" or "-cs 1" - it will grab the frame from the 1st or 2nd camera only (single-camera mode).

Re: raspivid exe on SLP image

Posted: Wed Apr 20, 2022 3:19 pm
by Oddbloke
Ah, so the source for the "standard" raspivid should be enough to get me started then. Thanks for your replies - that's really helpful!