Replies: 4 comments 2 replies
-
Assuming you really want images vs an mp4, which it sounds like you do, you probably want to transcode into png or jpg images. To do this you really don't need to do much more than set the frequency of how often you want to write an image file, you don't really need to use video filters for setting fps, etc, although that should work. I would suggest something simple like:
The -r option sets the rate, so, for example, 1 = 1 frame per second, while -r .5 would produce one image every 2 seconds and -r 2 would produce 2 images every second. The I know that method works because I previously used a similar approach in ring-mqtt to get snapshot images from battery cameras since they are unable to take snapshots while recording. If ffmpeg is exiting and you don't know why you can include |
Beta Was this translation helpful? Give feedback.
-
Ahhh, thanks @tsightler.
(i did try with I managed to get the ffmepg log working. I used |
Beta Was this translation helpful? Give feedback.
-
Ahhhh, got it! Had to set
|
Beta Was this translation helpful? Give feedback.
-
I did, here's the little rodent being captured. Now to look for rats. |
Beta Was this translation helpful? Give feedback.
-
Long story short i'm trying to use my ring cam to do some image detection to see if my cat has a rat in its mouth (at which point i'll lock/unlock the cat flap)! haha.
I wanted to leverage my ring cam, and this library gets me so close (thank you).
I successfully subscribe to the motion notification and get the last snapshot, but what i really need to do at that point is start a live stream and write an image out every say, 1 or 2 seconds, so i can run that through my model.
The example here:
ring/packages/examples/stream-example.ts
Line 27 in ea472dd
I was reading a blog here about the
fps=1
option, but can't get it to work:https://www.bannerbear.com/blog/how-to-extract-images-from-a-video-using-ffmpeg/
I've tried a few combinations of flags and it just seems to fail silently. I've added
debug: true
to the Ring client but don't get any debug logs.I'm no ffmpeg expert, so any help would really be appreciated, as i'm tantalisingly close to having a rodent free house.
Beta Was this translation helpful? Give feedback.
All reactions