livestream and motion detection?

October 31, 2023, 20:59

itsrocketman.

Hello, so I have a question and need a little help/ inspiration please. 🙏 Can I livestream and perform motion detection at the same time on the Raspberry Pi 4? My plan is to use a Raspberry Pi 4 with the Pi camera to send a livestream to an app and also run a program that detects motion, recognizes it, and provides the appropriate output. For example when the cat moves I get a message „hey cat is moving“ idk. However, I've encountered some difficulties. After researching extensively, I came across a post where someone mentioned that it might not be possible because these are two separate programs. Live-streaming and motion detection. Thought I could do all in one but doesn’t seem like that. Now, I have another idea. Can I send my livestream to an online server (idk which one would be the best yet) and run my motion detection program over the server? or should I continue trying to handle everything on the Raspberry Pi alone? What would be the best practice in this case? I‘m so overwhelmed with these. It’s my first raspberry pi project and I thought I can handle it with tutorials and docs but most of them are already out of date 🥲👋 Thanks in advance! 🙏💯

k9t33n

ok well you can do both, the first would be easier

k9t33n

but this is an very advanced project i recomend trying one other related project first

k9t33n

like live streeming in the first place

k9t33n

i recomend using a already built service

k9t33n

also whats your experience in programming like?

k9t33n

theres loads of services already made so all you have to do is put in a command and it will livestream the camera to the website, just a quick question, whats your camera?

_krazy.

He sounds like he can program

_krazy.

A Python script is so simple to make, take the output of the camera, and from here you can detect motion and also live stream it to any platform

_krazy.

And also libcamera and OpenCV cannot be used together?

itsrocketman.

Here’s the link to the raspberry forum where he told me that: https://forums.raspberrypi.com/viewtopic.php?p=2150373#p2150373

k9t33n

i use a website called https://remocon.tv which is a service thats made to live stream bots to the website and allow people to control it there

k9t33n

you could try that, you just dont have to add the controlling bit

itsrocketman.

Thank you both!! 🙏 I give it another try the next days and hope it works