DIY VR headset for the StereoPi. 10 ms latency for just $135

Share your projects and ideas with the community!
Post Reply
User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

DIY VR headset for the StereoPi. 10 ms latency for just $135

Post by Realizator »

Here is a step-by-step guide in our blog on Medium:
https://medium.com/stereopi/diy-vr-helm ... 42eb60c6dc
Eugene a.k.a. Realizator

stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: DIY VR headset for the StereoPi. 10 ms latency for just $135

Post by stereomaton »

Filming a timer and a screen which displays it through the camera... It reminds me a similar latency test I did on an endoscope several years ago.
However, I am surprised by the measure you give. Standard 60fps is about 16ms, thus anything under 32ms (Shannon frequency) or even 0.1s (realistic error interval) sounds like optimistic value.

Nice project nonetheless and useful application.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

SachMach
Posts: 1
Joined: Tue Apr 14, 2020 6:17 pm

Re: DIY VR headset for the StereoPi. 10 ms latency for just $135

Post by SachMach »

Hi all,

I like that project. I am starting my a project based on this one.

I ordered a display:
https://de.aliexpress.com/item/32820986 ... 4c4dgu49eI
using a higher resolution of 1440x2560 pixel.
I could make it work using HD resolution as you described it.

It does not work at it's natural resolution giving me that message:

bin root$ ./raspivid -3d tb -w 1440 -h 2560 -fs -t 1000
Too many macroblocks/s: Increasing H264 Level to 4.2
mmal: mmal_vc_port_enable: failed to enable port vc.ril.video_encode:in:0(I420): EINVAL
mmal: mmal_port_enable: failed to enable connected port (vc.ril.video_encode:in:0(I420))0x2aad30 (EINVAL)
mmal: mmal_connection_enable: output port couldn't be enabled
mmal: main: Failed to connect camera video port to encoder input
mmal: Argument is invalid
mmal: Failed to run camera app. Please check for firmware updates

Is there a given limit or can this be overcome?

stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: DIY VR headset for the StereoPi. 10 ms latency for just $135

Post by stereomaton »

The H264 encoder is limited in definition (I found about 2048×1350) and you exceed it with your configuration. Since you do not save the file, you can try to use the mjpeg encoder (-cd mjpg). Also check the camera modes, because you may have a trade off to do between fps and definition.
Note: this proposition is based on readings, not tried.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

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

Re: DIY VR headset for the StereoPi. 10 ms latency for just $135

Post by Realizator »

SachMach, Stereomaton is right. You set a resolution, which exceeds resolution limits.
Try to use lower resolution (closer to 1920x1080, but where height is dividable by 16 and width is dividable by 32) - these limits are from h264 encoder.
If you will set MJPEG compression, there are no such a limits. But you need to check appropriate video resolutions, supported by the cameras you use (V1 or V2).
You can set a sensor mode using '-md' option for the raspivid. Available options you can find here, in a camera documentation:
https://www.raspberrypi.org/documentati ... /camera.md
(search for "-md" on this page)
Eugene a.k.a. Realizator

Post Reply