Hi all,
I have a new Foscam bullett IP3M-954E.
I configure the snapshot every 10 seconds on FTP account.
The directory that is created is out of hand!
Naming convention is this:
WEBCAMCODE/day/001/jpg/hour/minute/nameoffile.jpg
example:
WEBCAMCODE/2016-07-21/001/jpg/19/45/17[R][0@0][0].jpg
I think it is absurd that a new folder is created every minute and every hour!
In the old foscam I had a folder where there were all snapshots, all together.
Can I change this naming convention?
The archive of the snapshot is crazy
Re: The archive of the snapshot is crazy
Hello wakk3r ,
Unfortunately these are the default settings and there is no option to change it. We do apologize for any inconvenience this might have caused.
Unfortunately these are the default settings and there is no option to change it. We do apologize for any inconvenience this might have caused.
Re: The archive of the snapshot is crazy
Not trying to be argumentative, but what folder structure would you propose, if not every minute or hour? Now before you answer the question, ponder this--
Assuming the storage location (whether SD card, NAS, FTP) is formatted in FAT32 (no way around that if snapshots are stored to SD), then keep in mind that the maximum number of files that can be in a single folder is 65,534; if you were to delineate folders by Month, and for the sake of argument an average of one snapshot per minute was being generated--that would result in 31 days * 24 hours * 60 minutes = 44640 (43200 if 30 days), which would be below the FAT32 max files limit and would be a reasonable number of snapshots, assuming that your motion/event capture isn't set up to go hog wild on taking a ton of snapshots.
OTOH if the folder delineation was based on per Day and the snapshot average was one per second, then you'd have 24 hours * 60 minutes * 60 seconds = 86400 which would exceed the FAT32 max files limit.
In your case, you can count the number of files that are in each of your folders and extrapolate from there as to how many files are there in total for each day and each month; depending on the total, perhaps a folder breakdown by month would be sufficient, assuming you're okay with a monthly folder structure. Now if you were looking for some other folder structure entirely, then again keep in mind the FAT32 max files limitation.
Assuming the storage location (whether SD card, NAS, FTP) is formatted in FAT32 (no way around that if snapshots are stored to SD), then keep in mind that the maximum number of files that can be in a single folder is 65,534; if you were to delineate folders by Month, and for the sake of argument an average of one snapshot per minute was being generated--that would result in 31 days * 24 hours * 60 minutes = 44640 (43200 if 30 days), which would be below the FAT32 max files limit and would be a reasonable number of snapshots, assuming that your motion/event capture isn't set up to go hog wild on taking a ton of snapshots.
OTOH if the folder delineation was based on per Day and the snapshot average was one per second, then you'd have 24 hours * 60 minutes * 60 seconds = 86400 which would exceed the FAT32 max files limit.
In your case, you can count the number of files that are in each of your folders and extrapolate from there as to how many files are there in total for each day and each month; depending on the total, perhaps a folder breakdown by month would be sufficient, assuming you're okay with a monthly folder structure. Now if you were looking for some other folder structure entirely, then again keep in mind the FAT32 max files limitation.
Re: The archive of the snapshot is crazy
tonester I write the snapshot on FTP server, not in SD with a scheduled backup every 3 days.
I created a live direct system that takes the last snapshot in the folder and sends live "streaming" with PHP.
If the webcam creates a folder each minute I found 1440 directory per day!!!!
I think it is an unnecessary management.
This type of management forces me to sell the webcam and change it.
I created a live direct system that takes the last snapshot in the folder and sends live "streaming" with PHP.
If the webcam creates a folder each minute I found 1440 directory per day!!!!
I think it is an unnecessary management.
This type of management forces me to sell the webcam and change it.
Re: The archive of the snapshot is crazy
I agree that having that many (1440) subdirectories, with each directory representative of one minute out of a day can become a bit unwieldy to manage; having said that, my original question still applies--how would you like the folders to be delineated by? Perhaps one daily folder containing 24 hourly folders, with each hourly folder containing all snapshot files taken during that hour? That way, each day/date folder would contain only at most 24 folders instead of 1440 folders.
Re: The archive of the snapshot is crazy
For what I have to do I need one directory where to find all snapshots.
Then I'll take to store with my crontab.
It's also more comfortable and fast for me to create timelapse video.
Then I'll take to store with my crontab.
It's also more comfortable and fast for me to create timelapse video.
Re: The archive of the snapshot is crazy
I second this. At the very least, maybe one folder per day, but ideally they'd work like my Foscams used to work and just throw them in the directory I have indicated in the ftp setup. Why create non unique files within? I can't even search for jpgs and move them to a common directory because they are all named [M][0@0][0].jpg or something close.wakk3r wrote:For what I have to do I need one directory where to find all snapshots.
Then I'll take to store with my crontab.
It's also more comfortable and fast for me to create timelapse video.
Totally useless for anything I use them for. For that reason, I have held off on buying more Amcrests.
Re: The archive of the snapshot is crazy
Going to chime in here and say that one folder a day is more than enough.
-
- Posts: 4
- Joined: Mon Oct 17, 2016 3:02 pm
Re: The archive of the snapshot is crazy
@wakk3r: why not use a shell script via crontab to pull any JPGs out of a folder and move them somewhere else?
There's no single solution that's going to work/be acceptable for everyone, so they picked a solution that's not going to break under *any* configuration and went with that (trying to make paths configurable is both a UX challenge and a coding challenge, especially in the oft-limited capacity of the firmware's Flash ROM.
I whipped this up in about two minutes... it iterates through all the folders, and for each of them (except the current hour and minute) it moves all the .jpg files to the desired destination and deletes any folders after it's done with them.
It might take a while on the first run, since it has to iterate through all the files currently there, but if you run it on an hourly or even daily basis, it should go much quicker on subsequent runs.
Naturally this code is not tested, use at your own risk
There's no single solution that's going to work/be acceptable for everyone, so they picked a solution that's not going to break under *any* configuration and went with that (trying to make paths configurable is both a UX challenge and a coding challenge, especially in the oft-limited capacity of the firmware's Flash ROM.
I whipped this up in about two minutes... it iterates through all the folders, and for each of them (except the current hour and minute) it moves all the .jpg files to the desired destination and deletes any folders after it's done with them.
It might take a while on the first run, since it has to iterate through all the files currently there, but if you run it on an hourly or even daily basis, it should go much quicker on subsequent runs.
Naturally this code is not tested, use at your own risk
Code: Select all
#!/bin/sh
CAMDIR=~/WEBCAMCODE
DEST=~/MyCamFiles
DATE=`date %Y-%m-%d`
HR=`date +%H`
MIN=`date +%M`
for day in ${CAMDIR}/*; do
for num in ${day}/*; do
for h in ${num}/jpg/*; do
for m in ${h}/*; do
if [[ $day != $DATE || $h != $HR || $m != $MIN ]]; then
mv ${m}/*.jpg ${DEST}
rm -rf ${m}
fi
done
[[ $h != $HR || $day != $DATE ]] && rm -rf ${h}
done
done
[[ $day != $DATE ]] && rm -rf ${day}
done
Re: The archive of the snapshot is crazy
I finally found a way to handle this in Windows with a combination of a batch file and a program called 'antrenamer'. Ant is a pretty simple program. Once you have it installed, using a 'date & time' rename with this mask: yyyy'-'mm'-'dd'-'hhmmsse works the best for me. This renamer every file in the directory structure in yyyy-mm-dd-hhmmss.jpg format. I then saved that preset as an arb file in the antrenamer directory I then created a batch script as follows:
where c:\folder\folder2 is where my antrenamer program is installed
and f:\ftp\AMCREST\ is where my ftp files are stored for this camera and AMC000DE_X7SXT7\ is the automatic folder created by the camera.
echo
C:
cd C:\folder\folder2\
C:\folder\folder2\renamer.exe -b c:\folder\folder2\amcrestrenamer.arb -afr f:\ftp\AMCREST\AMC000DE_X7SXT7\*.* -g -x
f:
cd f:\ftp\AMCREST\AMC000DE_X7SXT7
FOR /R "f:\ftp\AMCREST\AMC000DE_X7SXT7\" %%i in (*.jpg) DO MOVE /Y "%%i" "f:\inetpub\wwwroot\ftp\AMCREST\"
RMDIR /S /Q f:\ftp\AMCREST\AMC000DE_X7SXT7\
This batch renames all of the files, then moves them to the root of the amcrest directory and deletes the convoluted folder structure created by the camera once they are moved.
I put this into the task scheduler and now the files are easily view-able in order using irfanview.
Man, what a pain.
where c:\folder\folder2 is where my antrenamer program is installed
and f:\ftp\AMCREST\ is where my ftp files are stored for this camera and AMC000DE_X7SXT7\ is the automatic folder created by the camera.
echo
C:
cd C:\folder\folder2\
C:\folder\folder2\renamer.exe -b c:\folder\folder2\amcrestrenamer.arb -afr f:\ftp\AMCREST\AMC000DE_X7SXT7\*.* -g -x
f:
cd f:\ftp\AMCREST\AMC000DE_X7SXT7
FOR /R "f:\ftp\AMCREST\AMC000DE_X7SXT7\" %%i in (*.jpg) DO MOVE /Y "%%i" "f:\inetpub\wwwroot\ftp\AMCREST\"
RMDIR /S /Q f:\ftp\AMCREST\AMC000DE_X7SXT7\
This batch renames all of the files, then moves them to the root of the amcrest directory and deletes the convoluted folder structure created by the camera once they are moved.
I put this into the task scheduler and now the files are easily view-able in order using irfanview.
Man, what a pain.