![]() ![]() ![]() ![]() ![]() Alan numitron clock Clapclap 2313/1386 SNES Pi Webserver USB Volume/USB toys Smokey amp Laser cutter WordClock ardReveil v3 SNES Arcade cabinet Game boy projects cameleon Home Presence Detector ![]() AlanFromJapan ![]() ![]() ![]() Akizukidenshi Elec-lab Rand Nerd Tut EEVblog SpritesMods AvrFreaks Gameboy Dev FLOZz' blog Switch-science Sparkfun Suzusho Datasheet Lib Reddit Elec Ermicro Carnet du maker (fr) |
ipcampy.nocvLast update: Tue Nov 28 13:33:18 2023
This version works and is simpler to setup/develop than original one that was using OpenCV. Check it on GitHub (MASTER branch, not main)! It's Ipcampy if you want. ![]() PresentationPrincipleSee ipCamPy project, but basically present a RTSP (IP Camera) stream flow as stills on a website. Therefore I won't have to give internet access to that suspicious webcam I bought on Amz.Points of interrestDrops the need of OpenCV (a pain to build on small Raspi Zero), and use regular Pillow (for image processing/saving) and av FFmpeg binding lib to be able to read that stream H.264 from the camera via RTSP protocol. Both are standards and the underlying libraries are just an "apt install" away and do not require building for 14h on the row...Acquisition of an image will depend on the server running the app, but on my test we're talking about ~3 sec on a raspi Zero or 1.7s on a Orange Pi 2: connect to the camera, get the stream, take a still, save in memory as JPEG and return to the client. Therefore I set the minimum the page allows as refresh rate to 5 sec. Should you need less, just at init connect to the stream and take a shot on request but I'm not sure how well the camera will handle having a perpetual client, or the raspi. This current method is slower and less efficient but more robust I think. Fun thing, in fact it works better than the OpenCV that was crashing or not updating once every few minutes. This one runs without issue in my (short) tests so far. ImplementationBill of materialsSchematics![]() Source codeOn GitHub https://github.com/AlanFromJapan/ipcampy.nocv Use the MASTER branch not main.Installationgit clone -b master https://github.com/AlanFromJapan/ipcampy.nocv.git #Start the ipcampy web service as "webuser" (NOT ROOT!) /usr/local/websites/ipcampy.nocv/start-service.sh &Using /tmp to store the logs means you'll lose the log file between reboots, something you maybe don't want to maybe, so pick somewhere else (/var/logs/ is usually the consecrated place). Or go to the bitter end and make /tmp in memory with tmpfs. PicturesLinksHelpful sourcesInspiration |
All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated) electrogeek.tokyo ~ Formerly known as Kalshagar.wikispaces.com and electrogeek.cc (AlanFromJapan [2009 - 2025]) |