Event video folder name

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
ocascante
Posts: 11
Joined: Mon Mar 11, 2013 5:33 pm

Event video folder name

Post by ocascante »

Is there a way to record all device videos in a single folder, and name this folder with the device name and directory events wth the date as the folder name?
Thanks
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Event video folder name

Post by bbunge »

That is the way it is done, sort of.

The default directory path is /var/cache/(Monitor Number)/(date)/(event number)

If what you want to do is specify a specific directory for each monitor you can do that.
Create a directory /monitor1
In Zoneminder - Options - Storage add a storage location for /monitor1
When you set up Monitor 1 tell it to use storage location monitor1 but remember to create a filter to purge the folder when it is full.
ocascante
Posts: 11
Joined: Mon Mar 11, 2013 5:33 pm

Re: Event video folder name

Post by ocascante »

I'm going to be more specific, if I have 1 cameras named "Garage", create a single folder called "Garage" where all the videos with the name "<date-time>" are stored, the same for camera 2 and others. Not to have 1, 2, 3 folders.
I am not talking about the device where the videos are saved, neither about the default directory
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Event video folder name

Post by bbunge »

ocascante wrote: Sat Jul 31, 2021 8:21 pm I'm going to be more specific, if I have 1 cameras named "Garage", create a single folder called "Garage" where all the videos with the name "<date-time>" are stored, the same for camera 2 and others. Not to have 1, 2, 3 folders.
I am not talking about the device where the videos are saved, neither about the default directory
OK, create the directory /Garage and etc. There is no restriction on what you name the storage directory as long as it is given write permissions for Apache2 (www-data). However, you may still get a sub directory /1, /2 and etc. which will contain the rest of the directories. Each storage folder will need a filter to clean it out when it gets full.

I suppose you have a reason to organize the directories thusly? There might be a better way to do what you want to do. I suppose in the coding there is a way to change the monitor name from "1" to Garage. But as the cams are added sequentially by number it may break the system.
ocascante
Posts: 11
Joined: Mon Mar 11, 2013 5:33 pm

Re: Event video folder name

Post by ocascante »

Ok, could you tell me what is the file that creates the folders? I understand Zoneminder is written in Perl lenguage. Thanks
Post Reply