feat(cli): add --disable-snapshot-compaction to skip JPEG→MP4 worker#3385
Merged
louis030195 merged 1 commit intoMay 14, 2026
Merged
Conversation
Add an opt-in flag to skip the background snapshot_compaction worker that compresses older JPEG frames into H.265 MP4 chunks every 5 minutes. For users who don't consume the MP4 timeline UI (task-mining tools, headless analysis pipelines, agents that read accessibility_text and ui_events only), the worker is pure overhead — ffmpeg H.265 encoding visibly bumps CPU on lower-tier machines while the generated MP4s are never read. `--disable-vision` already exists but is too coarse since it also skips OCR / accessibility capture. The flag is opt-in (default false), so existing users are unaffected. When set, individual JPEGs remain on disk and disk usage is bounded by `--retention-days` instead of compaction. Implementation: - screenpipe-config: RecordingSettings.disable_snapshot_compaction (persisted) - screenpipe-engine/cli: --disable-snapshot-compaction - screenpipe-engine/recording_config: RecordingConfig propagation - screenpipe-engine/bin: gate start_snapshot_compaction() call Validated by: - cargo build --release --target x86_64-pc-windows-msvc --workspace --exclude screenpipe-rfdetr-mlx - screenpipe record --help shows the new flag - 15-minute run with --disable-snapshot-compaction --disable-audio confirmed no compaction worker started and no MP4 files produced Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an opt-in
--disable-snapshot-compactionCLI flag (and matchingdisableSnapshotCompactionsettings field) that skips the background JPEG→MP4 snapshot compaction worker.Motivation
The snapshot compaction worker compresses older JPEG frames into H.265 MP4 chunks every 5 minutes (great for users browsing the MP4 timeline UI, ~10-30x size reduction).
However, for tools that only consume
accessibility_textandui_events(task-mining tools, automation, headless analysis pipelines), the worker is pure overhead:--retention-daysinstead--disable-visionalready exists but is too coarse — it also skips OCR / accessibility capture, which we still need.Behavior
false— no change for existing usersstart_snapshot_compactionis not calledsnapshot compaction disabled via --disable-snapshot-compaction--retention-dayscleans them upImplementation
Validation
Context
This is the first of a few small CLI flags we're adding for task-mining / headless-recording use cases. Submitted as a small, isolated PR to keep review easy.