Hi,
I have ONVIF RTSP only camera. Sadly it does not provide snapshot function, confirmed with manufacturer.
My question is - is there a better hack to get it running under Domoticz?
Today I'm converting each minute (using vlc) the rtsp stream to a jpeg still frame and did a very dirty hack to "trick" domoticz into using a fake raspistill command - and replacing the tempcam.jpg as immune file to "raspberry.cgi" way. It works, but it's lousy hack, but it all works in RAM so it doesn't kill my SD or SSD.
I don't want to install external program with database dependencies (MySQL) - i.e. motion, or PHP - just use the minimum changes to RPi's capabilites. A "fake" URL handler would be great. I don't need the constant refresh - 1 minute interval stills are OK.
Anyone doing it differently - but in a simple way ?
RTSP camera only in Domoticz (no snapshot, no jpg) - better way for simple hack??
Moderator: leecollings
-
- Posts: 660
- Joined: Thursday 10 November 2016 9:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RTSP camera only in Domoticz (no snapshot, no jpg) - better way for simple hack??
Hello,BronxCruz wrote: ↑Thursday 29 April 2021 14:28 I don't want to install external program with database dependencies (MySQL) - i.e. motion, or PHP - just use the minimum changes to RPi's capabilites. A "fake" URL handler would be great. I don't need the constant refresh - 1 minute interval stills are OK.
Anyone doing it differently - but in a simple way ?
Even if I have a snapshot URL on mines, this is not very useful as videos display attached to switches are really small. I rarely use it.
So on my side I only use cameras internal motion detection that feeds a FTP sever on the PI (1 FTP subdir per camera). A python service monitors FTP every 5s and, if some file captures are there, process them. In the processing (there is also emailing/integration in my alarm management to feed virtual PIR switches etc...), images are downsized if needed (to 720p), date is overlayed in 1st image of the batch and they are all assembled as one vertically (to better fit on smartphones) and a "lastImageCamXXX.jpeg" is updated. These files are referenced in a Domoticz custom page: Very simple stuff (I'm not really a web site creation expert!), autogenerated by python (using yattag module) at init, with only a "resfresh" button on top.
So after refresh, you always have the latest useful information to identify what triggered motion detection.
This only use 2 features that comes with 99% IP cams on the market: Internal motion detection and ability to send capture snapshots on a FTP server.
FTP server I use on PI side is proftpd, because of it's HiddenStores feature that allows to workaround a FTP problem: No way to know a file transfer ended, so your service getting files asynchronously on the server side may sometime get partially downloaded files & try to assemble them, with visual artifacts or even python errors making the process fail.
This is not very heavy on processing + assembled image files are on a tmpfs in ram, so this does not wear the SD storage. Custom page reference the files through symbolic links that are updated when image change to new file, before removing old one on the tmpfs. So that's only a few link metadata that changes in the custom www directory on the SD.
To better group images, if their current number is < 10, up to 3 time slices can be skipped before processing them. Thus the delay is 15s, worst case, to get up to date data when refreshing page. This is acceptable for me.
-
- Posts: 1
- Joined: Monday 09 November 2020 8:56
- Target OS: Windows
- Domoticz version:
- Contact:
Re: RTSP camera only in Domoticz (no snapshot, no jpg) - better way for simple hack??
The only thing is when I execute the script from the CLI the *.jpg will we Another question: how can I email this *.jpg to my email address within Domoticz I had a IP cam which I could add to a switch and in Domoticz the jpg will be send Like i said you can change the path where the image will be stored.
Who is online
Users browsing this forum: Google [Bot] and 1 guest