raspivid exe on SLP image

S.L.P. image questions, stereoscopic video livestream and recording, stereoscopic photo capture etc.
Post Reply
Oddbloke
Posts: 4
Joined: Mon Jun 01, 2020 9:49 am

raspivid exe on SLP image

Post 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.

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: raspivid exe on SLP image

Post 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).
Eugene a.k.a. Realizator

Oddbloke
Posts: 4
Joined: Mon Jun 01, 2020 9:49 am

Re: raspivid exe on SLP image

Post by Oddbloke »

Thanks for your reply! Where can I find the source for the modified version of raspivid?

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: raspivid exe on SLP image

Post 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.
Eugene a.k.a. Realizator

Oddbloke
Posts: 4
Joined: Mon Jun 01, 2020 9:49 am

Re: raspivid exe on SLP image

Post 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?

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: raspivid exe on SLP image

Post 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).
Eugene a.k.a. Realizator

Oddbloke
Posts: 4
Joined: Mon Jun 01, 2020 9:49 am

Re: raspivid exe on SLP image

Post 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!

Post Reply