Filter to convert event to video and remove JPEGs?
-
- Posts: 20
- Joined: Mon Sep 17, 2007 5:48 pm
Filter to convert event to video and remove JPEGs?
I have Zoneminder currently running in continuous record mode. It creates a new event every 10 minutes. For every 10-minute event, I'd like to convert the JPEGs (from the MJPEG stream off my cameras) to a video file, and remove the individual JPEG image files (this should reduce my disk usage by about 90% for each event). In the Filter setup window I can set up a filter to match all events >=600sec, and there are checkboxes for "Create video for all matches" and "Delete all matches"...however, I suspect that the delete all matches option will delete the event entirely, converted video and all. I could execute "rm %EPI%/*.jpg" for all matches as well as create video for all matches, but I don't know what order it executes these in, and if it does execute the video creation first, I don't know if it waits for ffmpeg to return a successful exit code before moving on to the custom command. Any thoughts?
Re: Filter to convert event to video and remove JPEGs?
I've no idea if the delete and video creation will work in the way you say, in that delete will blow away the newly made video (or delete the JPGS and then fail to make a video!)
What I do know is this: If you force the videos to be created OUTSIDE the usual ZM event directories, it doesn't get deleted.
This is what I do :-
I have a rule that takes "archived" events and makes videos of them (7 days after they originally happened, giving a 7 day opportunity to realise i want to keep something).
I have a rule that says if it's NOT "archived" and 7 days old, delete it.
I have a rule that says if it's "archived" and 14 days old, delete it.
The events disappear and my videos are left behind where I want them.
Configure Options/Images/FFMPEG_OUTPUT_OPTIONS and set (was just "-r 25" here)
# Comments added by me
-r 25 -q:v 1 -f avi -vtag XVID -g 30 -bf 2 # File type formatting
-vf "hqdn3d,lutyuv=y=gammaval(1.4),unsharp" # Image improvements
/mnt/point/for/cctv/zoneminder/videos/`date -d "-7 days" +"%Y%m%d-%H%M%S-%N"`.avi # Full Path with filenamed by date of "7 days ago from now"
The important thing there is I specify the path where I want the video to end up.
Now, you can use whatever naming convention you want after "videos/ .... .avi" but I can assure you the videos created "over there" don't get deleted even when ZM cleans up.
What I do know is this: If you force the videos to be created OUTSIDE the usual ZM event directories, it doesn't get deleted.
This is what I do :-
I have a rule that takes "archived" events and makes videos of them (7 days after they originally happened, giving a 7 day opportunity to realise i want to keep something).
I have a rule that says if it's NOT "archived" and 7 days old, delete it.
I have a rule that says if it's "archived" and 14 days old, delete it.
The events disappear and my videos are left behind where I want them.
Configure Options/Images/FFMPEG_OUTPUT_OPTIONS and set (was just "-r 25" here)
# Comments added by me
-r 25 -q:v 1 -f avi -vtag XVID -g 30 -bf 2 # File type formatting
-vf "hqdn3d,lutyuv=y=gammaval(1.4),unsharp" # Image improvements
/mnt/point/for/cctv/zoneminder/videos/`date -d "-7 days" +"%Y%m%d-%H%M%S-%N"`.avi # Full Path with filenamed by date of "7 days ago from now"
The important thing there is I specify the path where I want the video to end up.
Now, you can use whatever naming convention you want after "videos/ .... .avi" but I can assure you the videos created "over there" don't get deleted even when ZM cleans up.
-
- Posts: 20
- Joined: Mon Sep 17, 2007 5:48 pm
Re: Filter to convert event to video and remove JPEGs?
That's not quite what I'm looking for, because I want the video files to stay with the events, and get cleaned up by Zoneminder when it's time to expire them, or the disk gets full. All I want is for each event to create an MPEG or AVI and drop the JPEGs after Zoneminder has moved on to recording in the next event.
Re: Filter to convert event to video and remove JPEGs?
Hi guys, I need the exact same thing requested by the user "ExplodingLemur".
I want is for each event to create an MPEG or AVI and drop the JPEGs after Zoneminder has moved on to recording in the next event.
I use ZoneMinder v1.37.5
Thanks for support.
Fabio
I want is for each event to create an MPEG or AVI and drop the JPEGs after Zoneminder has moved on to recording in the next event.
I use ZoneMinder v1.37.5
Thanks for support.
Fabio
Re: Filter to convert event to video and remove JPEGs?
Stick some money behind the request and you might get it. Necro posting in some obsolete version, probably not.
I expect most are happy saving the MP4 and there's the option to save JPEGs or not.
I expect most are happy saving the MP4 and there's the option to save JPEGs or not.
-
Re: Filter to convert event to video and remove JPEGs?
Is there a buffer solution at the moment?
-
- Posts: 1322
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Filter to convert event to video and remove JPEGs?
Also, you might get better answers if you post on the v1.37 board.