BlueWave Studio forum
Rear camera freezing after 5 seconds - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html)
+--- Forum: Installation and Upgrades Support (https://bluewavestudio.io/community/forum-93.html)
+--- Thread: Rear camera freezing after 5 seconds (/thread-2877.html)



Rear camera freezing after 5 seconds - Splewi - 08-17-2021

Hey there,
I have my setup mostly worked out, but I'm having issues with the camera freezing the system after 5 seconds of use. 
Toggling the pins for the camera, pressing Ctrl+c, signaling the pins attached to the shutdown script, and anything else I try is futile. 

I'm running a rpi4 with openauto pro 13.2
Using the MakerFocus Raspberry Pi4 Camera... https://www.amazon.com/dp/B07DPNDP6R
And Arducam CSI to HDMI Cable... https://www.amazon.com/dp/B06XDNBM63

The camera doesn't seem to work with the V4L2 backend, but will on finder when set to 1080(at least for 5 seconds when it freezes)

Running raspivid -t 0 works just fine for up to 5 minutes when I stopped it. And this is repeatable for me. (I saw "script" as a backend type, is it possible to just use something akin to raspivid -t 0 when I trigger the rear cam?) raspivid also has a LOT less delay on screen.

I'm new to the pi and this one has me stumped and my google-fu didn't cut it. 
Any suggestions or ideas would be deeply appreciated.


RE: Rear camera freezing after 5 seconds - BlueWave - 08-17-2021

How much ram your Pi4 has? It looks like video memory is leaking somewhere (maybe in the driver?).


RE: Rear camera freezing after 5 seconds - Splewi - 08-17-2021

(08-17-2021, 03:32 PM)BlueWave Wrote: How much ram your Pi4 has? It looks like video memory is leaking somewhere (maybe in the driver?).

It's the 4gb version.
How would I go about checking that out/rectifying memory leakage? 
Thanks for the reply!


RE: Rear camera freezing after 5 seconds - Splewi - 08-19-2021

I found where I can set the path for the "script" backend. In /home/pi/.openauto/config/openauto_system.ini 

I tried pointing it to a shell script with "raspivid -t 0" just for a test and that worked. As you can imagine, however, switching out of reverse doesn't end the script. 

So I'm wondering what a decent way to go about it would be. 
I imagine python? Never worked with it before tho. 
I'd like something like this 
If [gpio 5 is shorted] {
Activate camera (raspivid) 

Else
If [video feed running]{
Kill feed
Else 
End program }}
But I don't know where to start or what examples would be relevant. 

I do have a concern with this script, pressing the " rear camera" button probably won't play well. But I'm not sure. 
Any input would be great! 
Thanks!


RE: Rear camera freezing after 5 seconds - wkl3968 - 04-26-2022

mine reverse camera freezes too and I cannot do anything beyond this. can I run the reverse video command outside of OPA as in not using openauto_system.ini? like triggering using canbus services that directly run the cvlc instead using canbus to trigger gpio to tell OPA to trigger the reverse camera script?
ScriptPath=cvlc v4l2:///dev/video0 --fullscreen --no-audio --no-video-title-show --aspect-ratio 1920:720