Does ZM support timelapse?

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

Does ZM support timelapse?

Post by ckilner » Sat Apr 20, 2019 8:08 pm

Is there a way of producing timelapse video from Zoneminder? I read an interesting article by jacomoman (viewtopic.php?f=5&t=6681&p=96337#p96337) who compiled a couple of scripts to select jpg images from the events directory and used these to compile an mpeg. As I understand it, ZM 1.32 now writes directly to mp4 files so jacomoman's method won't work now.
Is there a way to produce timelapse videos in 1.32?

rockedge
Posts: 1114
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Does ZM support timelapse?

Post by rockedge » Sat Apr 20, 2019 8:18 pm

I think if you select in the Storage tab in the monitor configuration the option Save JPEGS and select something like Frames or Frames & Analysis you can use the same method to create time lapse as you did in version 1.30.4

This way ZM will create the mp4 and save the jpegs as well

ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

Re: Does ZM support timelapse?

Post by ckilner » Sun Apr 21, 2019 7:53 am

Thanks. I've now got a bunch of jpegs but the folder structure at 1.32 is different too so the scripts fail.

User avatar
iconnor
Posts: 854
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Does ZM support timelapse?

Post by iconnor » Sun Apr 21, 2019 3:21 pm

You can select DEEP storage method which uses the old method so your scripts should still work. Or it should be pretty easy to update the scripts to use the new directory structure.

ckilner
Posts: 25
Joined: Sun Feb 10, 2019 12:05 pm

Re: Does ZM support timelapse?

Post by ckilner » Tue Apr 23, 2019 11:36 am

For my purposes, I don't need anything too clever so I've ended up with this short script that does the job nicely. I've set the camera to 1fps to keep the volume of data down a bit. I've set ZM to just record frames and no video.
I'm using the camera to record plant growth so I only take one frame every 3 minutes.

Code: Select all

#!/bin/sh
rm -f /mnt/zoneminder/myvideo.mp4
find /mnt/zoneminder/17 -name *.jpg -exec ls -rt "{}" +|awk 'NR==1||NR % 180 == 0'|sed "~s/^/file /" >/mnt/zoneminder/source.txt
ffmpeg -f concat -safe 0 -i /mnt/zoneminder/source.txt /mnt/zoneminder/myvideo.mp4
The good thing is that I preserve the source data so if things don't work out I can always re-run the processing. We'll see how well it performs after a few weeks when the volume of data gets large.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests