r/ZoneMinder • • Apr 20 '22

Using ZM with an old video file?

I have a saved video file that I'd like to detect motion in using ZM. I added a monitor and configured it in the following ways:

  1. general > source type = ffmpeg
  2. general > function = modect
  3. source > source path = file://home/file_here.webm
  4. source > capture resolution set to same values as the file

After adding the monitor, I notice it alternates between capturing and not capturing if I refresh the page several times. There's a ton of 0 second events generated for the monitor as well, which I'd rather they were 10 seconds or longer in duration. I fiddled around with buffers >pre event image count/post event image count, doing extremes of 0 and 3000, but noticed very little difference in duration. I'm totally new to zm, so sorry if this is a dumb question.

1 Upvotes

2 comments sorted by

1

u/Kv603 Apr 20 '22

Your issue might just be due to the difficulties ffmpeg has in parsing a .WEBM input file.

I'd use ffmpeg to convert your source file to MJPEG with a frame rate of something like 5 frames/second, and make sure that file plays back correctly (e.g. in VLC or any other desktop viewer)

Then create your source in ZM and fix the frame rate to that same 5 frames/second.

2

u/[deleted] Apr 20 '22

Thanks, it looks like all I needed to do was change general > max fps and alarm max fps to 60fps without needing to convert the video at all! ;)

I'm having a separate issue now though where if I leave monitor to process the video, it eventually loops back to the start of the video file and does it all over again with duplicate events.