mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-24 22:25:55 -05:00
Merge branch 'master' into new-schema
This commit is contained in:
commit
f1112031c2
@ -113,10 +113,19 @@ In the user interface,
|
||||
* Be sure to assign each stream you want to capture to a sample file
|
||||
directory and check the "record" box.
|
||||
|
||||
* `flush_if_sec` should typically be about 60. This causes the database to
|
||||
be flushed when the first instant of a completed recording second is a
|
||||
minute old. Lower values cause less video to be lost on power loss;
|
||||
higher values reduce wear on the SSD holding the SQLite database.
|
||||
* `flush_if_sec` should typically be 120 seconds. This causes the database to
|
||||
be flushed when the first instant of one of this stream's completed
|
||||
recordings is 2 minutes old. A "recording" is a segment of a video
|
||||
stream that is 60–120 seconds when first establishing the stream, about
|
||||
60 seconds midstream, and shorter when an error or server shutdown
|
||||
terminates the stream. Thus, a value just below 60 will cause the
|
||||
database to be flushed once per minute per stream in the steady state. A
|
||||
value around 180 will cause the database to be once every 3 minutes per
|
||||
stream, or less frequently if other streams cause flushes first. Lower
|
||||
values cause less video to be lost on power loss. Higher values reduce
|
||||
wear on the SSD holding the SQLite database, particularly when you have
|
||||
many cameras and when you record both the "main" and "sub" streams of
|
||||
each camera.
|
||||
|
||||
3. Assign disk space to your cameras back in "Directories and retention".
|
||||
Leave a little slack (at least 100 MB per camera) between the total limit
|
||||
|
@ -1879,9 +1879,11 @@ mod tests {
|
||||
|
||||
if let Some((orig_dur, new_dur)) = final_durations {
|
||||
// One would normally expect the duration to be exactly the same, but when using an
|
||||
// edit list, ffmpeg appears to extend the last packet's duration by the amount skipped
|
||||
// at the beginning. I think this is a bug on their side.
|
||||
assert!(orig_dur - shorten + pts_offset == new_dur,
|
||||
// edit list, ffmpeg 3.x appears to extend the last packet's duration by the amount
|
||||
// skipped at the beginning. ffmpeg 4.x behaves properly. Allow either behavior.
|
||||
// See <https://github.com/scottlamb/moonfire-nvr/issues/10>.
|
||||
assert!(orig_dur - shorten + pts_offset == new_dur ||
|
||||
orig_dur - shorten == new_dur,
|
||||
"orig_dur={} new_dur={} shorten={} pts_offset={}",
|
||||
orig_dur, new_dur, shorten, pts_offset);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user