Not sure if there are work around for an IP cam. https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian
Dave-KB1PVH
Sent from my Samsung S4
tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=30m 0 0
##Get the image from my security camera and save to /var/tmp which is a ram disk. I had to play around with the url to get it correct.
wget http://192.168.1.200/img/snapshot.cgi?size=3 --output-document=/var/tmp/image.jpg --timeout=20 -q
###wait just a bit
sleep 10
### Put the image on wunderground. This is the user for your WU weather cam and your usual WU password
lftp -e ' set net:timeout 10 ; put /var/tmp/image.jpg ; exit ' -u USER,PASSWORD webcam.wunderground.com &>/dev/nullNow comes the rub, I have no idea what I am doing or even how to start. I have an ONVIF compatible IP camera that captures video. Does anybody out there know how I get this working or can anybody point me in the right direction to get started?
ffmpeg -i rtsp://as_above -f image2 -q:v 5 /var/lib/weewx/backup/image.jpg
I have a RPi webcam taking stills with the Rapsberry Pi Camera onboard, configured as instructed in
Every night a timelapse video is created from the stills with gst-launch with a commandgst-launch-1.0 multifilesrc location=wcimage-%06d.jpg index=100001 caps="image/jpeg,framerate=8/1" ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! theoraenc bitrate=768 ! oggmux ! filesink location=rpwc_tl-${PVM}.ogv
Examples are on http://www.skahan.net/weewx if you wanted to take a peek - current snap is in the top left, link to the historical timelapse bottom left
(and yes, I have a bug - forgot to update my rsync script to push 2016 movies up to the ISP. Fortunately I have a local copy on the LAN at home)
I can post the config file/scripts/readme up to github if anybody cares......
Re: reading a stream from a network-enabled camera, I do that too in a VM that runs zoneminder as a security camera app under ubuntu. The key for zm in connecting to a network stream is getting the URL right. Most of these cameras expect something for the user and/or password, and it's sometimes hard to pass a value of "no value here" in a config file. My camera is a Hootoo (an unbranded Foscam) but it configured just like the Foscam examples for zoneminder that are all over the 'net. Google was my friend there.
Motion had some forks that supported rtsp streams as of late 2014 according to google, but I didn't look to see if the current official version has been updated or not. Nice thing about using zm or motion is they hide all that ffmpeg stuff that they use behind the scenes, and all you need to do is cook up the right app-level config file and it does the rest.
wow - you are working very hard to do that, especially on a model-B.....I've been doing the same thing for a couple years on my model-B using 'motion' as the app software with a plugged in Logitech USB webcam,
- one cleans up the tmpfs dir based on age, so I don't fill it up
- one scp's the snapshot to my weewx system so it's integrated into my local skin
Examples are on http://www.skahan.net/weewx if you wanted to take a peek - current snap is in the top left, link to the historical timelapse bottom left
keskiviikko 2. maaliskuuta 2016 18.10.21 UTC+2 vince kirjoitti:The python 'motion' sw is not so heavy and the RPi graphic processor which does the timelapse encoding is quite powerful, and during the night no photos taken, time to encode:)
What are the 'Console battery' and 'ISS battery' entries on the weewx page?
#!/bin/bash
# grab new image.jpg from rtsp stream and save to mounted usb stick
avconv -loglevel panic -i rtsp://192.168.1.10:554/user=admin_password=asdafoo_channel=1_stream=0.sdp?real_stream -f image2 /var/lib/weewx/backup/image.jpg
# pause for breath
sleep 10
# upload file to wunderground
lftp -e "set net:timeout 10 ; put /var/lib/weewx/backup/image.jpg ; exit" -u USER,PASSWORD webcam.wunderground.com
I have one worry. If the camera stops working, then the cron will fail to grab an image, but the old file will still exist and will be (re)uploaded every five minutes.Can anybody suggest a simple/elegant way of stopping the upload until a new image file has been written?
This was the solution that I had worked out:
- Check if image file exists, if so, delete it
- Save new image from rtsp stream
- check if image file exists, if so upload it
It just seems 'ugly' and I wondered if there was a 'prettier' way!
I suppose I should also check to see what happens if there is no stream to grab from!!!
Since my camera points outside and it is dark at night, I would like to add something that stops getting the image at dusk and starts up at dawn. This would avoid uploading many black images.