keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.6k stars 226 forks source link

Snapshots not being cleaned up - disk full #218

Closed psincler closed 1 year ago

psincler commented 2 years ago

Describe the bug Motion snapshots do not get cleaned up. This is filling up storage in /tmp over time. The more motion detected, the faster the disk gets full. I am using both hikvision and dahua cams....the same issue occurs for both. Can the screen.jpg file in the temp folder not be reused as the most current snapshot?

To Reproduce Steps to reproduce the behavior:

  1. Enable motion detection and trigger motion.
  2. Each motion event drops a new temp file in /tmp

Expected behavior Either cleanup /tmp on a regular interval or reuse screen.jpg which gets place in a temp folder on a per camera basis at container startup. If I have 3 cameras, I should have 3 folders in /tmp each with a screen.jpg file that is used as the most current snapshot for that camera.

Camera (please complete the following information):

nxtByte commented 2 years ago

I have the same behaviour, thought it was an issue on my side. As a workaround I set up a Cronjob that runs everyday at 2am and deletes the files in /tmp and also restarts the cam-proxy, as after 24 hours I sometimes got weird glitches in the images (not sure if related to cam-proxy).

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

daltskin commented 2 years ago

I have the same behaviour, thought it was an issue on my side. As a workaround I set up a Cronjob that runs everyday at 2am and deletes the files in /tmp and also restarts the cam-proxy, as after 24 hours I sometimes got weird glitches in the images (not sure if related to cam-proxy).

When you say weird glitches, do you mean this kind of thing? I get this often from one particular camera feed via the Protect app:

Screenshot_20220622-220357_UniFi Protect

nxtByte commented 2 years ago

I have the same behaviour, thought it was an issue on my side. As a workaround I set up a Cronjob that runs everyday at 2am and deletes the files in /tmp and also restarts the cam-proxy, as after 24 hours I sometimes got weird glitches in the images (not sure if related to cam-proxy).

When you say weird glitches, do you mean this kind of thing? I get this often from one particular camera feed via the Protect app:

Screenshot_20220622-220357_UniFi Protect

Yep, things like that. Although I usually don't have the artifacts full-screen, just about the bottom third of the image. As I said this could also be an issue with my camera, as the one I get the "glitches" and artifacts with is connected via Wi-Fi.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.