kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.89k stars 488 forks source link

libcamera livestream on mycodo #1328

Open Abrio97 opened 11 months ago

Abrio97 commented 11 months ago

I've connected my Raspberry Pi camera module 3 to my raspberry pi and added it into mycodo as a libcamera, but I can't create a livestream for my dashboard. I tried to add my module 3 camera as a picamera or opencv but it didn't work either. I assume that wouldn't work anyway since it's a libcamera. Can someone help me out on how to create a livestream with my camera module 3 on mycodo?

kizniche commented 11 months ago

Have you been able to acquire an image (by any means) to verify you have the hardware connected and the Linux software set up properly?

LucidEye commented 11 months ago

I seriously doubt that the V3 camera, which is 12 megapixels, is going to give you a stable live video stream.... it's simply trying to process too much data. A 12MP file is typically around 4mb per image. Even a V1 camera, which is only 5 megapixels, has a hard time streaming live video in Mycodo at anything over 1-2 FPS. The first thing I would try is setting the frame rate to 1 frame per second and then setting the camera video resolution WAY down to something like 800x400 and then test if you can stream video. Also keep in mind that the libcamera library is still under development, so it may not work as well as the older legacy libraries yet. I am running a V2 camera (8MP) and I have to set the resolution to about half to keep the image file sizes below 1MB for compiling time lapse vids.