On Wed, 26 Jan 2022 at 20:27, Scott Lamb <
sl...@slamb.org> wrote:
> If you have flush_if_sec set to 0, "very cheap cameras" may matter. Bad camera => more disconnects => more recordings => more flushes.
>
> But once flush_if_sec exceeds the duration at which Moonfire NVR decides to divide a run into recordings on its own (that's 60 seconds mid-run, or 120 seconds for the first recording of a run), the cheapness of the camera shouldn't matter anymore.
>
>>> With the set-up as PI, external HD and three cameras - I get the recording flushing quite often. I tried setting of 0 seconds, 15 seconds, 500 and 900, I still at some point get all previous recording 'flushed' and then only have a few minutes of recording history.
>
>
> Can you show me logs with the 500 or 900 case? I don't know why you'd get frequent flushing with those.
>
I am still getting deletes with 0, 60, 180. Such that after deletes >0
previous all previous recording are deleted. Annoying as I have an
old version on an SD card which works - I must be doing something
wrong.
0 Seconds
I20220126 22:19:15.772 main moonfire_nvr::cmds::run] Starting syncer
for path /home/pi/camera_001/
I20220126 22:19:15.848 main moonfire_db::db] Flush 1 (why: synchronous
deletion):
/home/pi/camera_001/: added 0B in 0 recordings (), deleted 326K 1007B
in 1 (1/0), GCed 0 recordings ().
I20220126 22:19:15.911 main moonfire_db::db] Flush 2 (why: synchronous
garbage collection):
/home/pi/camera_001/: added 0B in 0 recordings (), deleted 0B in 0 (),
GCed 1 recordings (1/0).
I20220126 22:19:15.911 main moonfire_nvr::cmds::run] Starting streamer
for Shed Door-main
I20220126 22:19:15.912 main moonfire_nvr::cmds::run] Starting streamer
for Shed Door-sub
I20220126 22:19:15.912 main moonfire_nvr::cmds::run] Ready to serve
HTTP requests
I20220126 22:19:15.912 s-Shed Door-main moonfire_nvr::streamer] Shed
I20220126 22:19:15.912 s-Shed Door-sub moonfire_nvr::streamer] Shed
W20220126 22:19:16.007 s-Shed Door-main moonfire_ffmpeg::udp]
0x17a1160: attempted to set receive buffer to size 393216 but it only
ended up set as 360448
W20220126 22:19:16.008 s-Shed Door-main moonfire_ffmpeg::udp]
0x17b18c0: attempted to set receive buffer to size 393216 but it only
ended up set as 360448
W20220126 22:19:18.943 s-Shed Door-main moonfire_base::clock] opening
rtsp://
10.3.2.205:554/live/ch00_1 took PT3.030755778S!
W20220126 22:19:19.241 s-Shed Door-sub moonfire_base::clock] opening
rtsp://
10.3.2.205:554/ took PT3.328386011S!
I20220126 22:20:36.011 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 3 (why: 0 sec after start of 1 minute 11 seconds Shed Door-sub
recording 2/0):
/home/pi/camera_001/: added 170K 905B in 1 recordings (2/0), deleted
0B in 0 (), GCed 0 recordings ().
I20220126 22:21:07.238 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 4 (why: 0 sec after start of 1 minute 43 seconds Shed Door-main
recording 1/1):
/home/pi/camera_001/: added 603K 122B in 1 recordings (1/1), deleted
0B in 0 (), GCed 0 recordings ().
I20220126 22:21:31.365 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 5 (why: 0 sec after start of 55 seconds Shed Door-sub recording
2/1):
/home/pi/camera_001/: added 131K 988B in 1 recordings (2/1), deleted
170K 905B in 1 (2/0), GCed 0 recordings ().
I20220126 22:22:02.808 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 6 (why: 0 sec after start of 55 seconds Shed Door-main recording
1/2):
/home/pi/camera_001/: added 332K 529B in 1 recordings (1/2), deleted
603K 122B in 1 (1/1), GCed 1 recordings (2/0).
^CI20220126 22:22:21.807 main moonfire_nvr::cmds::run] Received
SIGINT; shutting down gracefully. Send another SIGINT or SIGTERM to
shut down immediately.
I20220126 22:22:21.807 main moonfire_nvr::cmds::run] Shutting down
streamers and syncers.
I20220126 22:22:21.821 s-Shed Door-main moonfire_nvr::streamer] Shed
Door-main: shutting down
I20220126 22:22:21.822 s-Shed Door-sub moonfire_nvr::streamer] Shed
Door-sub: shutting down
I20220126 22:22:21.933 main moonfire_nvr::cmds::run] Waiting for HTTP
requests to finish.
I20220126 22:22:21.933 main moonfire_nvr::cmds::run] Waiting for
TEARDOWN requests to complete.
I20220126 22:22:21.933 main moonfire_nvr::cmds::run] Exiting.
I20220126 22:22:22.000 main moonfire_db::db] Flush 7 (why: drop)
60 seconds
I20220126 22:23:24.955 main moonfire_nvr::cmds::run] Starting syncer
for path /home/pi/camera_001/
I20220126 22:23:25.007 main moonfire_db::db] Flush 1 (why: synchronous
deletion):
/home/pi/camera_001/: added 0B in 0 recordings (), deleted 259K 695B
in 2 (1/3, 2/2), GCed 0 recordings ().
I20220126 22:23:25.086 main moonfire_db::db] Flush 2 (why: synchronous
garbage collection):
/home/pi/camera_001/: added 0B in 0 recordings (), deleted 0B in 0 (),
GCed 4 recordings (2/1, 2/2, 1/2, 1/3).
I20220126 22:23:25.087 main moonfire_nvr::cmds::run] Starting streamer
for Shed Door-main
I20220126 22:23:25.087 main moonfire_nvr::cmds::run] Starting streamer
for Shed Door-sub
I20220126 22:23:25.087 s-Shed Door-main moonfire_nvr::streamer] Shed
I20220126 22:23:25.088 main moonfire_nvr::cmds::run] Ready to serve
HTTP requests
I20220126 22:23:25.088 s-Shed Door-sub moonfire_nvr::streamer] Shed
W20220126 22:23:25.134 s-Shed Door-main moonfire_ffmpeg::udp]
0x1632830: attempted to set receive buffer to size 393216 but it only
ended up set as 360448
W20220126 22:23:25.135 s-Shed Door-main moonfire_ffmpeg::udp]
0x1642f90: attempted to set receive buffer to size 393216 but it only
ended up set as 360448
W20220126 22:23:28.176 s-Shed Door-main moonfire_base::clock] opening
rtsp://
10.3.2.205:554/live/ch00_1 took PT3.088138384S!
W20220126 22:23:28.178 s-Shed Door-sub moonfire_base::clock] opening
rtsp://
10.3.2.205:554/ took PT3.090056665S!
I20220126 22:25:08.739 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 3 (why: 60 sec after start of 1 minute 35 seconds Shed Door-main
recording 1/4):
/home/pi/camera_001/: added 562K 874B in 1 recordings (1/4), deleted
0B in 0 (), GCed 0 recordings ().
I20220126 22:25:32.384 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 4 (why: 60 sec after start of 1 minute 58 seconds Shed Door-sub
recording 2/3):
/home/pi/camera_001/: added 284K 44B in 1 recordings (2/3), deleted 0B
in 0 (), GCed 0 recordings ().
I20220126 22:26:08.507 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 5 (why: 60 sec after start of 55 seconds Shed Door-main
recording 1/5):
/home/pi/camera_001/: added 336K 366B in 1 recordings (1/5), deleted
562K 874B in 1 (1/4), GCed 0 recordings ().
I20220126 22:26:35.879 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 6 (why: 60 sec after start of 1 minute 3 seconds Shed Door-sub
recording 2/4):
/home/pi/camera_001/: added 153K 265B in 1 recordings (2/4), deleted
284K 44B in 1 (2/3), GCed 1 recordings (1/4).
I20220126 22:27:07.406 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 7 (why: 60 sec after start of 1 minute 3 seconds Shed Door-main
recording 1/6):
/home/pi/camera_001/: added 364K 500B in 1 recordings (1/6), deleted
336K 366B in 1 (1/5), GCed 1 recordings (2/3).
^CI20220126 22:27:34.659 main moonfire_nvr::cmds::run] Received
SIGINT; shutting down gracefully. Send another SIGINT or SIGTERM to
shut down immediately.
I20220126 22:27:34.659 main moonfire_nvr::cmds::run] Shutting down
streamers and syncers.
I20220126 22:27:34.686 s-Shed Door-main moonfire_nvr::streamer] Shed
Door-main: shutting down
I20220126 22:27:34.736 s-Shed Door-sub moonfire_nvr::streamer] Shed
Door-sub: shutting down
I20220126 22:27:34.797 main moonfire_nvr::cmds::run] Waiting for HTTP
requests to finish.
I20220126 22:27:34.798 main moonfire_nvr::cmds::run] Waiting for
TEARDOWN requests to complete.
I20220126 22:27:34.798 main moonfire_nvr::cmds::run] Exiting.
I20220126 22:27:34.820 main moonfire_db::db] Flush 8 (why: drop):
/home/pi/camera_001/: added 315K 956B in 3 recordings (1/7, 2/5, 2/6),
deleted 517K 765B in 2 (1/6, 2/4), GCed 1 recordings (1/5)
180 seconds
I20220126 22:28:26.852 main moonfire_nvr::cmds::run] Starting streamer
for Shed Door-main
I20220126 22:28:26.852 main moonfire_nvr::cmds::run] Starting streamer
for Shed Door-sub
I20220126 22:28:26.853 main moonfire_nvr::cmds::run] Ready to serve
HTTP requests
I20220126 22:28:26.852 s-Shed Door-main moonfire_nvr::streamer] Shed
I20220126 22:28:26.853 s-Shed Door-sub moonfire_nvr::streamer] Shed
W20220126 22:28:26.892 s-Shed Door-main moonfire_ffmpeg::udp]
0x1a813f0: attempted to set receive buffer to size 393216 but it only
ended up set as 360448
W20220126 22:28:26.892 s-Shed Door-main moonfire_ffmpeg::udp]
0x1a91b50: attempted to set receive buffer to size 393216 but it only
ended up set as 360448
W20220126 22:28:29.659 s-Shed Door-main moonfire_base::clock] opening
rtsp://
10.3.2.205:554/live/ch00_1 took PT2.806021555S!
W20220126 22:28:30.008 s-Shed Door-sub moonfire_base::clock] opening
rtsp://
10.3.2.205:554/ took PT3.154150322S!
W20220126 22:30:19.005 s-Shed Door-sub moonfire_base::clock] getting
next packet took PT1.110821410S!
W20220126 22:30:19.006 s-Shed Door-main moonfire_base::clock] getting
next packet took PT1.157651289S!
I20220126 22:31:34.995 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 3 (why: 180 sec after start of 1 minute 27 seconds Shed
Door-main recording 1/8):
/home/pi/camera_001/: added 1M 148K 752B in 3 recordings (1/8, 1/9,
2/7), deleted 0B in 0 (), GCed 0 recordings ().
I20220126 22:33:34.163 sync-/home/pi/camera_001/ moonfire_db::db]
Flush 4 (why: 180 sec after start of 1 minute 3 seconds Shed Door-sub
recording 2/8):
/home/pi/camera_001/: added 984K 160B in 4 recordings (1/10, 1/11,
2/8, 2/9), deleted 1M 148K 752B in 3 (1/8, 1/9, 2/7), GCed 0
recordings ().
^CI20220126 22:35:08.141 main moonfire_nvr::cmds::run] Received
SIGINT; shutting down gracefully. Send another SIGINT or SIGTERM to
shut down immediately.
I20220126 22:35:08.142 main moonfire_nvr::cmds::run] Shutting down
streamers and syncers.
I20220126 22:35:08.178 s-Shed Door-sub moonfire_nvr::streamer] Shed
Door-sub: shutting down
I20220126 22:35:08.179 s-Shed Door-main moonfire_nvr::streamer] Shed
Door-main: shutting down
I20220126 22:35:08.216 main moonfire_nvr::cmds::run] Waiting for HTTP
requests to finish.
I20220126 22:35:08.216 main moonfire_nvr::cmds::run] Waiting for
TEARDOWN requests to complete.
I20220126 22:35:08.217 main moonfire_nvr::cmds::run] Exiting.
I20220126 22:35:08.266 main moonfire_db::db] Flush 5 (why: drop):
/home/pi/camera_001/: added 1M 109K 777B in 6 recordings (1/12, 1/13,
1/14, 2/10, 2/11, 2/12), deleted 984K 160B in 4 (1/10, 1/11, 2/8,
2/9), GCed 3 recordings (2/7, 1/8, 1/9).