I use three different cameras, one Chinese brand PTZ PoE camera (H.View) and two German products (Lupus). They all save a pic every 60 seconds (as part of their security camera feature) to my NAS - the PTZ via NFS, the others via FTP.

On the NAS the (files of the) latest pictures (showing an in-picture time stamp) are converted into a common file name like camera1.jpg, camera2.jpg, camera3.jpg and then sent, copied via FTP to the weather sites where the picture(s) are to be displayed (as the display programs cannot handle changing file names).
It works perfectly.

So per picture it's a little batch job which converts the file name into a generic copy and then sends it via ftp to the destination site. it's a Windows batch job with separate ftp inputs for each picture/site - run every minute via Windows Scheduler (could of course also be a Linux shell script doing the same job and then run via CRONTAB) One of my weather templates shows all three pictures in a row giving a 270° sky and ground view.

As for weewx skins, the pictures can be used like any other picture to be displayed in a skin. For one template (Meteotemplate) I use the live camera feed picking up the http stream from the camera.

You can look the result(s) up at http://meshka.eu <http://meshka.eu>
the 270° pictures are with the pwsWD template
the live camera with the Meteotemplate

So far I don't display a picture in a weewx skin (still to come)

So, in my solution, the camera model doesn't really matter - it's the camera features which matter
- sufficient resolution 😁
- ability to save snapshots in a common graphic format (jpg, png, ...) every (to be customized:) 1-3600 seconds to a (NAS) server
(- reasonable price 😉 )

On 04.07.2021 01:05, Greg from Oz wrote:
I use this command on a generic webcam:
ffmpeg -i "rtsp://admin:[email protected]:554/mpeg4" -vf fps=1/60 -s 960x480 -strftime 1 $WEBCAMFILES/$DATEFOLDER/tmp/"%Y%m%d-%H%M%S.jpg" -hide_banner &

It runs in the background and generates a still every 60 seconds and I use those pictures to make a time plase.

I use a program called inoticoming that you can set up to do things when a file is created in a folder.
For example:
inoticoming  $WEBCAMFILES/$DATEFOLDER/tmp/ --suffix .jpg /usr/local/sbin/weather-realtime.sh {} \;

The above says if a picture is created then run /usr/local/sbin/weather-realtime.sh and use the generated photo as a parameter.
I create a webm movie so if you are viewing on an iphone it won't work.

https://weather.ubeaut.work/webcam.html



On Sunday, 4 July 2021 at 05:30:33 UTC+10 dvdhns wrote:

    To grab single frames, this is what I use. I haven't had a problem
    with having to wait 10 seconds to get the image. It seems
    immediate. I'm using a cheap Jidetech IP Cam with POE. I wouldn't
    recommend it as it seems to lose network connectivity occasionally.

    /Applications/ffmpeg -i "rtsp://192.168.0.185:554/1/h264major
    <http://192.168.0.185:554/1/h264major>" -frames:v 1 img.jpg

    On Friday, July 2, 2021 at 9:48:33 PM UTC-6 Eric K wrote:

        Long ago I played with a dlink camera and as was able to
        figure out a
        URL that would get a single frame.

        Me too!  I had a Dlink DCS-900 and I could get a single camera
        image from the URL line.
        But, I bricked it trying to update its firmware.
        Oh well, it was early-2000s vintage and had a pretty crappy
        image sensor, compared to what's on the market today.
        I'm looking for a modern, functional replacement for it.

        I would not be surprised if you can find into for your camera
        on the web
        someplace.

        The camera with rtsp streaming that I was playing with can
        only deliver an rtsp stream via it's Ethernet port (no wifi).
        I know because it is made by the company I work in.
        I asked some of our software people about grabbing a single
        image for a webpage, and they said, nope, only rtsp via the
        Ethernet port.
        It's primary function is to create full motion video for video
        conferencing, so delivering still frames for webpages was not
        on the required features list.

        Eric

        On Friday, July 2, 2021 at 5:52:03 PM UTC-5 Greg Troxel wrote:


            Eric K <[email protected]> writes:

            > Based on first hand experience, can people recommend
            various IP cameras
            > (ideally an Ethernet or wifi camera) with a focus
            towards ease of grabbing
            > a single frame from a Linux command line?
            > I'd like to be able to grab single frames to use in the
            weewx webpage.
            >
            > I've tested am Ethernet-connected camera that puts out
            an rtsp stream. I
            > successfully used an ffmpeg command line to start the
            stream, wait 10
            > seconds and then grab a frame. Sometimes 10 seconds
            isn't enough and I
            > have to try 12-15 seconds.
            > *ffmpeg -loglevel info -rtsp_transport tcp -i
            > "rtsp://192.168.7.51/rtsp-stream
            <http://192.168.7.51/rtsp-stream>" -ss 00:00:10 -r 1
            -vframes 1 -y
            > /home/weewx/Pictures/image.jpg*
            > It works, but I don't think rtsp is the ideal transport
            method for grabbing
            > a single frame, because you have to wait about 10+
            seconds for the stream
            > to fully form a valid image.

            Long ago I played with a dlink camera and as was able to
            figure out a
            URL that would get a single frame. You might log into the
            https
            interface and look at the html on the live view page. Also
            check out
            the zoneminder wikis and similar for the access methods.

            I would not be surprised if you can find into for your
            camera on the web
            someplace.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/138ab928-0b89-4f60-98bc-1cbb2a5428aan%40googlegroups.com <https://groups.google.com/d/msgid/weewx-user/138ab928-0b89-4f60-98bc-1cbb2a5428aan%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f35f7ee7-1093-0dc5-2a4c-19a1be03bfbc%40gmail.com.

Reply via email to