fix(capture): reduce pre-roll to 1s in standby mode (slot already warm)
This commit is contained in:
parent
ef57900583
commit
3d4880d944
1 changed files with 5 additions and 1 deletions
|
|
@ -7,7 +7,11 @@ import { createUploadStream } from './s3/client.js';
|
||||||
|
|
||||||
|
|
||||||
const S3_BUCKET = process.env.S3_BUCKET || 'wild-dragon';
|
const S3_BUCKET = process.env.S3_BUCKET || 'wild-dragon';
|
||||||
const PRE_ROLL_SECONDS = parseInt(process.env.PRE_ROLL_SECONDS || '5', 10);
|
// In standby mode the framecache slot has been warm for a long time — reduce
|
||||||
|
// pre-roll to 1s (just enough for fc_pipe to sync its read cursor).
|
||||||
|
// Override with PRE_ROLL_SECONDS env var if needed.
|
||||||
|
const _standbyMode = process.env.STANDBY === '1';
|
||||||
|
const PRE_ROLL_SECONDS = parseInt(process.env.PRE_ROLL_SECONDS || (_standbyMode ? '1' : '5'), 10);
|
||||||
|
|
||||||
|
|
||||||
// Growing-files mode: writes the master to a local SMB-backed share that the
|
// Growing-files mode: writes the master to a local SMB-backed share that the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue