Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timelapse has no disk space limits, it will fill up the SD card. #449

Open
ikout opened this issue Jan 16, 2025 · 11 comments
Open

Timelapse has no disk space limits, it will fill up the SD card. #449

ikout opened this issue Jan 16, 2025 · 11 comments

Comments

@ikout
Copy link

ikout commented Jan 16, 2025

If you only enable timelapse, and not have Video Recording enabled, there is no "monitor/limit" for the disk space and it fills the SD card....

Can this be added?

And potentially it will need to be either aligned with the limit of the Video Recording or have separate values for each.
i.e.
Timelapse: 5GB
Video Recording: 10 GB

@themactep
Copy link
Owner

timelaps implies that you retain all frames before you combine them into a timelapse clip. having a timelapse that deletes older files sounds silly. use a larger card or a network share.

@ikout
Copy link
Author

ikout commented Jan 16, 2025

Even if I use a network share I don't want it to take over all the share space, it would be best that there is an option to say keep the last 5 days and delete them automatically if no action is made at them. And since the firmware itself is actually building the timelapse but expects a 3rd party to do that, it should protect itself from running out or resources.

BTW, I can't find at the wiki how it's supported by Thingino, I've seen the U-Boot section but it's mentioning "how to boot a device using U-Boot over NFS".

What kind/type of network shares are supported by Thingino?

@gtxaspec
Copy link
Collaborator

NFS is supported out of the box. You can add CIFS if you compile your own build.

@themactep
Copy link
Owner

i like the idea to limit the depth in full days. i will add that.

@ikout
Copy link
Author

ikout commented Jan 16, 2025

i like the idea to limit the depth in full days. i will add that.

That will be great!

@wltechblog
Copy link
Contributor

fixed in 6c9ecb0, can we close?

@themactep
Copy link
Owner

Test in the new build.

@ikout
Copy link
Author

ikout commented Jan 22, 2025

I'll upgrade to the latest build and get back to you in 1-2 days, I have about 10 days worth of folders so let's see.
At the moment with the f2cd8ca the old folders are not deleted.

I'll test the new one and let you know.

@ikout
Copy link
Author

ikout commented Jan 23, 2025

It works for removing the images but it seems that it can't delete the directory because the "convert2video.sh" is still at the folder so the "-empty" term is not matched and the directory is not deleted

Thu Jan 23 10:22:49 EET 2025
/mnt/nfs-share/Cinnado-01/timelapses/20250110:
total 4K
-rwxrwxrwx    1 root     root          97 Jan 10 00:00 convert2video.sh

/mnt/nfs-share/Cinnado-01/timelapses/20250111:
total 4K
-rwxrwxrwx    1 root     root          97 Jan 11 00:00 convert2video.sh

/mnt/nfs-share/Cinnado-01/timelapses/20250112:
total 4K
-rwxrwxrwx    1 root     root          97 Jan 12 00:00 convert2video.sh

A side note, this may be due to wireless connection to a NFS share, but it seems that sometime the find on the NFS may get stuck and I see that I have now 3 "timelapses", it started with 2 and now is 3. I'll reboot the camera and watch this.
Maybe optimize the way the find is done and just look up for the directories and delete them with all their contents is a better/faster option?

root@Cinnado-01 ~# date ; ps -wl | grep time | grep -v grep
Thu Jan 23 10:40:24 EET 2025
S     0  4439  1635  1892   524 0:0   10:31 00:00:00 {timelapse} /bin/sh /sbin/timelapse
D     0  4449  4439  1884   388 0:0   10:31 00:00:00 find /mnt/one/Cinnado-01/timelapses -type f -name *.jpg -mtime +7 -exec rm {}
D     0  4535 31479  1884   376 0:0   10:33 00:00:00 find /mnt/one/Cinnado-01/timelapses -empty -type d -mindepth 1 -exec rm -r {}
S     0 31479  1635  1892   524 0:0   10:21 00:00:00 {timelapse} /bin/sh /sbin/timelapse
root@Cinnado-01 ~# 

root@Cinnado-01 ~# date ; ps -wl | grep time | grep -v grep
Thu Jan 23 10:47:18 EET 2025
S     0  4439  1635  1892   524 0:0   10:31 00:00:00 {timelapse} /bin/sh /sbin/timelapse
D     0  4449  4439  1884   388 0:0   10:31 00:00:00 find /mnt/one/Cinnado-01/timelapses -type f -name *.jpg -mtime +7 -exec rm {}
D     0  4535 31479  1884   376 0:0   10:33 00:00:00 find /mnt/one/Cinnado-01/timelapses -empty -type d -mindepth 1 -exec rm -r {}
S     0  4931  1635  1892   524 0:0   10:41 00:00:00 {timelapse} /bin/sh /sbin/timelapse
D     0  4941  4931  1884   384 0:0   10:41 00:00:00 find /mnt/one/Cinnado-01/timelapses -type f -name *.jpg -mtime +7 -exec rm {}
S     0 31479  1635  1892   524 0:0   10:21 00:00:00 {timelapse} /bin/sh /sbin/timelapse
root@Cinnado-01 ~#

I don't know if for this "multiple" timelapses I should file a new issue, not at this stage at least.

@themactep
Copy link
Owner

does it still create convert files? i thought i removed that, lol.

@ikout
Copy link
Author

ikout commented Jan 23, 2025

You're right, it's not anymore I didn't noticed that...

They were still created because I had not upgraded to a recent version. So once I delete that file the removal of the dirs it should work fine. I'll let you know in a couple of days that it will move to the recent dirs.

If we can optimize the find command it will be a bonus...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants