Batch delete generated videos from events?

Forum for questions and support relating to the 1.29.x releases only.
Post Reply
Fressikus
Posts: 7
Joined: Fri Jul 29, 2016 7:51 pm

Batch delete generated videos from events?

Post by Fressikus » Fri Jul 29, 2016 7:56 pm

Is there a way to easily batch delete all generated videos attached to multiple events?

There's an easy way to "Create video for all matches" via the filter system, but I can't find a way to delete already generated videos in a similar fashion while keeping the events (.jpg's). You could manually remove all .avi's via command line, but I don't think that's the proper way to do it.

PacoLM
Posts: 967
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Batch delete generated videos from events?

Post by PacoLM » Sat Jul 30, 2016 12:51 am

Hi,

I believe the videos are not created unless ZM is programmed to do it (using a filter). The events you see are the sequences of images recorded if I'm not wrong.

Hope it helps,

PacoLM

mini-ITX system (6 IPCams - Ubuntu14.04 - ZM1.31.1)

mikb
Posts: 397
Joined: Mon Mar 25, 2013 12:34 pm

Re: Batch delete generated videos from events?

Post by mikb » Sat Jul 30, 2016 6:12 pm

@PacoLM -- you are correct, but I think you have missed the point of the question :)

Given that the videos HAVE been created (easily) by a filter .... how do you delete JUST the generated video (.avi) without blowing away the whole event (DB entry and JPGs too)?

I don't think there's a ZM way to do it, and would be reaching for the "find /path -type f -iname *.avi -delete" kind of answer, if it wasn't for the fact I don't let ZM create the videos in the events directory in the first place -- I hint to FFMPEG that it should use another path totally :)

Fressikus
Posts: 7
Joined: Fri Jul 29, 2016 7:51 pm

Re: Batch delete generated videos from events?

Post by Fressikus » Sat Jul 30, 2016 10:07 pm

mikb wrote:I hint to FFMPEG that it should use another path totally :)
If there's no built-in way in Zoneminder, I think this might be the "cleanest" way to do it. This way, your .avi files to not get split up everywhere, but stay tidy in one directory. Only downside is, that you can't delete those via the web-interface at all any more. Thanks for the suggestion.

mikb
Posts: 397
Joined: Mon Mar 25, 2013 12:34 pm

Re: Batch delete generated videos from events?

Post by mikb » Sun Jul 31, 2016 4:27 pm

In 1.25: Under Options/Images/FFMPEG Output Options I did this ...

-r 25 -q:v 1 -f avi -vtag XVID -g 30 -bf 2 -vf "hqdn3d,lutyuv=y=gammaval(1.4),unsharp" /mnt/place/for/cctv/zoneminder/videos/`date -d "-7 days" +"%Y%m%d-%H%M%S-%N"`.avi

The back-quoted date-time bit forces a filename that closely approximates the time the video was generated (7 days ago) due to the filter that says: If 7 days old AND archived, create a video. Triggering the above. But that's just me, you will have to adapt as you need :)

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests