view/export/create videos and/or events later on

Forum for questions and support relating to the 1.27.x releases only.
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

view/export/create videos and/or events later on

Post by rodeored »

If I have recorded images but no events I would like to be able to view and export videos by StartTime and EndTime. Is there a way to do that?

One possible way to do that would be to create an event long after the video has been captured. If I can to that, I can then view or export the event as I would normally do it.
Is there a way to create events using StartTime and EndTime?
mikb
Posts: 585
Joined: Mon Mar 25, 2013 12:34 pm

Re: view/export/create videos and/or events later on

Post by mikb »

rodeored wrote:If I have recorded images but no events
That's not normal. How have you managed to do that, as an "event" is an entry/some entries in a database, plus a load of images on the filesystem?
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

Re: view/export/create videos and/or events later on

Post by rodeored »

You are correct. When I have the function set to record, it does make events, but they are not the events I want. I'll give you a scenario that is similar to what I am trying to do.

Suppose I set zoneminder to record and I do have images on the disk. I want to see the images of someone opening my garage door. I have a way of finding out exactly what time the door was opened, but I have no way of triggering an event at the time. I would like to be able to set zoneminder to record and then call up a one minute video by telling zoneminder to get the video from StartTime to EndTime. As that possible?

If it can't be done directly without using an event is there a way to create the event at the time the video is requested?
hesral
Posts: 44
Joined: Sun Apr 06, 2014 12:11 pm

Re: view/export/create videos and/or events later on

Post by hesral »

I'm not quite sure what your problem actually is, but here are some suggestions.

Events are, as far as I understand only made in zoneminder when you use motion detection, use triggers, use constant record, or start a manual alarm while viewing the video. This means that events are only created as the event is happening. I don't know of any way to split existing events into new events.

If you want to record all the time, but also create events when the garage door opens, then set your monitor to mocord.
http://www.zoneminder.com/wiki/index.ph ... onitor_Tab

If you just want to make events when the garage door opens, then set your monitor to modect.

If you want to extract recorded images in a time range, from one or several "record" mode events, things get tricky. I have not found a way to do this in zoneminder, but it should be easy enough to program. I hope the coding guys will bless us with this functionality someday. I do it manually so far, by exporting the event, or events that have the images I am interested in. Then I extract the image files, open the deepest folder, and delete the image files I'm not interested in. I will now have one or more folders, one for each event, with image files called "###_capture.jpg" or somenting like that. ### being a number. You can view these in pretty much any image viewer, and watch them in sequence by using arrow keys.

If you want to make a movie, like an .mp4 file, spanning more than one folder, there are several ways to do this. You can load them in gimp, avidemux, windows movie maker etc., or do it with ffmpeg on the command line. Just google "mp4 image sequence" or something like that, and you should get some interesting results.
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

Re: view/export/create videos and/or events later on

Post by rodeored »

From what you've told me, it sounds like each folder in the events folder contains the jpegs for that event.
Making a movie across folders sounds interesting. When the functionis set to record, it makes an event every 10 minutes. Is there any way I can change the length of each event, to say 30 seconds, instead of 10 minutes? I looked at the settings but I don't see anything there.
hesral
Posts: 44
Joined: Sun Apr 06, 2014 12:11 pm

Re: view/export/create videos and/or events later on

Post by hesral »

Apparantly the setting "section length" in the moniotr settings, changes the length of "record" events. I found this in the wiki. Never tried it myself.
http://www.zoneminder.com/wiki/index.ph ... n#Misc_Tab
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

Re: view/export/create videos and/or events later on

Post by rodeored »

Thanks, that seems to work. I'm wondering why they warn you not to make too many events. Each event creates another folder, and a row in the events table, but its the same number of images as when there are fewer events. I don't see how just folders or rows in a database can take up that much more space. I set it to make 1 minute events, so far no problems.
hesral
Posts: 44
Joined: Sun Apr 06, 2014 12:11 pm

Re: view/export/create videos and/or events later on

Post by hesral »

Depending on your level of logging and database setup, it could have an impact. I lowered my load significantly by only logging warnings and worse, turning on bulk recording, turning off stats and alarm image saving. There are a lot of tweaks in zoneminder that may worsen or improve disk writes or cpu usage. When they actually take the time to warn you, you should think twice about what you are doing.

But i don't think you will have much of a problem with the one minute sequence.
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

Re: view/export/create videos and/or events later on

Post by rodeored »

If I open the filter window, check "make movie for all events" and then execute, it seems like there is a movie being made because my hard drive starts spinning. But there is no indication on the filter page or anywhere else that the movie is being made. Where is the movie?
hesral
Posts: 44
Joined: Sun Apr 06, 2014 12:11 pm

Re: view/export/create videos and/or events later on

Post by hesral »

It is being made in the event image folder. When you click the generate video button, the text generating video should start moving in yellow. When the video is finished, the same window will present you with a link to download the video file. Once created, the video file is kept in the event image folder. So if you open the same event again, and click video, a list of previously created video files wiĺl apear.
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

Re: view/export/create videos and/or events later on

Post by rodeored »

What you describe happens when I generate a video from a single event window. But when I click on the "execute" link in the filter window, it just looks like nothing happens at all. Are you talking about the filter window?

The video wouldn't be in the event image folder because I'm making one video out of multiple events.
hesral
Posts: 44
Joined: Sun Apr 06, 2014 12:11 pm

Re: view/export/create videos and/or events later on

Post by hesral »

When you make video of more than one event, you get one video pr event. A good way to download all the videos, is to open the event list, check the events you are interested in, an click export. When the export window apears, check the download video and images box. I tried it without images once, and the export was unsucessfull. It may be because the folder with the video won't be created by the include video code, just the include images code. It's just how life is when you decide to use unstable versions. You can join the videos with windows movie maker when the export is downloaded.
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

Re: view/export/create videos and/or events later on

Post by rodeored »

When you make video of more than one event, you get one video pr event.
This is only true if you create videos in the export window.

At the top of the events window is a link to open the filters window. If you add a filter your events window will be limited to the matching events. If you export videos from the events window, it will open an export window where you can make a video for each selected event. But I'm not talking about that. If you go back to the filters window, there is an option to "Create video for all matches" found by your filter. If you click execute it does seems to be making a video. the only problem is I don't know where the video is.
hesral
Posts: 44
Joined: Sun Apr 06, 2014 12:11 pm

Re: view/export/create videos and/or events later on

Post by hesral »

No. When you create video with the filter window, it finishes the encoding of each video in the background. It places each video in each event folder in the /var/cache/zoneminder/images/ directory on the server. It will not make one single video for all the events you chose. It is quite possible to make a script or program that combines all events into one video, but zoneminder does not seem to have this functionality. You will either have to make this script yourself, or live with it until someone else makes such a script.
rodeored
Posts: 74
Joined: Wed Apr 30, 2014 7:49 pm

Re: view/export/create videos and/or events later on

Post by rodeored »

When you click on "execute" on the filter page, does it look like it does anythng? Do you see any changes at all?
I don't have any directory at /var/cache/zoneminder/images/
Locked