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

Recording does not delete files #2526

Closed
1 of 13 tasks
Ric06 opened this issue Oct 19, 2023 · 4 comments · Fixed by #2673
Closed
1 of 13 tasks

Recording does not delete files #2526

Ric06 opened this issue Oct 19, 2023 · 4 comments · Fixed by #2673
Labels
bug Something isn't working general

Comments

@Ric06
Copy link

Ric06 commented Oct 19, 2023

Which version are you using?

v1.2.0

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

Description

Describe how to replicate the issue

Saved mp4 files are no longer deleted after x hours

My config:

-- Default path settings -> Recording

-- Record streams to disk.
record: yes
-- Path of recording segments.
-- Extension is added automatically.
-- Available variables are %path (path name), %Y %m %d %H %M %S %f (time in strftime format)
recordPath: ./recordings/%path/%Y-%m-%d_%H-%M-%S-%f
-- Format of recorded segments.
-- Available formats are "fmp4" (fragmented MP4) and "mpegts" (MPEG-TS).
recordFormat: fmp4
-- fMP4 segments are concatenation of small MP4 files (parts), each with this duration.
-- MPEG-TS segments are concatenation of 188-bytes packets, flushed to disk with this period.
-- When a system failure occurs, the last part gets lost.
-- Therefore, the part duration is equal to the RPO (recovery point objective).
recordPartDuration: 100ms
-- Minimum duration of each segment.
recordSegmentDuration: 1h
-- Delete segments after this timespan.
-- Set to 0s to disable automatic deletion.
recordDeleteAfter: 4h

Content of .recording
****************************************************************$ date
Thu Oct 19 06:11:18 AM UTC 2023
****************************************************************$ ls -l
total 584
-rw-r--r-- 1 root root 31468 Oct 18 08:56 2023-10-18_08-56-25-489819.mp4
-rw-r--r-- 1 root root 31291 Oct 18 08:58 2023-10-18_08-58-03-484907.mp4
-rw-r--r-- 1 root root 168272 Oct 18 09:01 2023-10-18_09-01-05-515554.mp4
-rw-r--r-- 1 root root 102846 Oct 18 09:02 2023-10-18_09-02-59-454036.mp4
-rw-r--r-- 1 root root 97687 Oct 18 09:10 2023-10-18_09-10-19-486225.mp4
-rw-r--r-- 1 root root 36941 Oct 18 09:10 2023-10-18_09-10-27-457663.mp4
-rw-r--r-- 1 root root 111499 Oct 18 09:10 2023-10-18_09-10-43-466333.mp4
****************************************************************$

  1. start the server
  2. publish with ...
  3. read with ...

Did you attach the server logs?

no

Did you attach a network dump?

no

@progmech
Copy link

I want to add the following: if recordDeleteAfter is set to 0s, a file is deleted immediately. Here is the information from logs:

2023/10/19 17:37:36 DEB [path 192.168.151.12] [record] creating segment /data/mtx/192.168.151.12/20231019T173736.mp4
2023/10/19 17:37:36 DEB [record cleaner]removing /data/mtx/192.168.151.12/20231019T173736.mp4

@aler9
Copy link
Member

aler9 commented Nov 10, 2023

Hello, i found out that the record cleaning system was not working in case of relative paths. This is fixed by #2673

@progmech your issue is fixed by #2671

Copy link
Contributor

This issue is mentioned in release v1.3.0 🚀
Check out the entire changelog by clicking here

Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working general
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants