Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

restore snapshot compaction config flag

louis030195f637938a361a
diff --git a/crates/screenpipe-config/src/recording.rs b/crates/screenpipe-config/src/recording.rs
index 97e7dc84d..232516324 100644
--- a/crates/screenpipe-config/src/recording.rs
+++ b/crates/screenpipe-config/src/recording.rs
@@ -137,6 +137,13 @@ pub struct RecordingSettings {
#[serde(rename = "maxSnapshotWidth", default = "default_max_snapshot_width")]
pub max_snapshot_width: u32,
+ /// Skip the background JPEG->MP4 snapshot compaction worker.
+ /// Use when the MP4 timeline UI is not used, e.g. task-mining tools
+ /// that consume accessibility_text / ui_events only.
+ /// Side effect: JPEGs are not compacted, so disk usage depends on retention.
+ #[serde(rename = "disableSnapshotCompaction", default)]
+ pub disable_snapshot_compaction: bool,
+
/// Skip the v2 meeting detector watcher (5s-interval process / AX scan).
/// Use when meeting detection is not consumed (task-mining, headless analysis,
/// agents that read accessibility_text and ui_events only) — avoids the
@@ -378,6 +385,7 @@ impl Default for RecordingSettings {
use_all_monitors: true,
video_quality: "balanced".to_string(),
max_snapshot_width: default_max_snapshot_width(),
+ disable_snapshot_compaction: false,
disable_meeting_detector: false,
ignored_windows: vec![],
included_windows: vec![],
diff --git a/crates/screenpipe-engine/src/cli/mod.rs b/crates/screenpipe-engine/src/cli/mod.rs
index 5d57289ea..dad7308d6 100644
--- a/crates/screenpipe-engine/src/cli/mod.rs
+++ b/crates/screenpipe-engine/src/cli/mod.rs
@@ -460,6 +460,13 @@ pub struct RecordArgs {
#[arg(long, value_enum, default_value_t = crate::retention::RetentionMode::Media)]
pub retention_mode: crate::retention::RetentionMode,
+ /// Skip the background JPEG->MP4 snapshot compaction worker.
+ /// Use when the MP4 timeline UI is not used, e.g. task-mining tools
+ /// that consume accessibility_text / ui_events only.
+ /// Side effect: JPEGs stay uncompacted, so disk usage depends on retention.
+ #[arg(long, default_value_t = false)]
+ pub disable_snapshot_compaction: bool,
+
/// Skip the v2 meeting detector watcher (5s-interval process / AX scan).
/// Use when meeting detection is not consumed (task-mining, headless analysis) —
/// avoids the constant process enumeration + AX tree walk cost.
@@ -536,6 +543,7 @@ impl RecordArgs {
.collect(),
deepgram_api_key: self.deepgram_api_key.clone().unwrap_or_default(),
video_quality: self.video_quality.clone(),
+ disable_snapshot_compaction: self.disable_snapshot_compaction,
disable_meeting_detector: self.disable_meeting_detector,
analytics_enabled: !self.disable_telemetry,
ignore_incognito_windows: true,
diff --git a/crates/screenpipe-engine/src/recording_config.rs b/crates/screenpipe-engine/src/recording_config.rs
index fc5daae30..c28b5e712 100644
--- a/crates/screenpipe-engine/src/recording_config.rs
+++ b/crates/screenpipe-engine/src/recording_config.rs
@@ -131,6 +131,10 @@ pub struct RecordingConfig {
/// Maximum width for stored snapshots (0 = no limit). Default: 1920.
pub max_snapshot_width: u32,
+ /// Skip the background JPEG->MP4 snapshot compaction worker.
+ /// See `RecordingSettings.disable_snapshot_compaction` for details.
+ pub disable_snapshot_compaction: bool,
+
/// Skip the v2 meeting detector watcher.
/// See `RecordingSettings.disable_meeting_detector` for details.
pub disable_meeting_detector: bool,
@@ -247,6 +251,7 @@ impl RecordingConfig {
schedule_enabled: settings.schedule_enabled,
schedule_rules: settings.schedule_rules.clone(),
max_snapshot_width: settings.max_snapshot_width,
+ disable_snapshot_compaction: settings.disable_snapshot_compaction,
disable_meeting_detector: settings.disable_meeting_detector,
// LAN exposure is opt-in. We force `api_auth` on whenever
// `listen_on_lan` is true so a user can never accidentally