asmirnou / watsor

Object detection for video surveillance
MIT License
252 stars 32 forks source link

running on snap images #19

Closed scipioni closed 3 years ago

scipioni commented 3 years ago

How to grab still images from camera ?

It is interesting to run on grabbed jpeg single images, not stream video. Every (configured) step in seconds ffmpeg can grab an image from camera using http protocol. For example unifi cameras has http://192.168.2.43/snap.jpeg grabbing url

asmirnou commented 3 years ago

To make a video from a single image config FFmpeg slideshow using loop option. Set input framerate to specify a delay to read the subsequent image.

      width: 1280
      height: 720
      input: "http://192.168.2.43/snap.jpeg"

      ffmpeg:
        decoder:
          - -hide_banner
          - -loglevel
          -  error
          - -nostdin
          - -loop
          -  1
          - -framerate
          -  1/5
          - -i                   
          - -f
          -  rawvideo
          - -pix_fmt
          -  rgb24