utils¶
Helper functions for merge and recovery.
omgrab.utils.merge
¶
Boot-time recovery: merge orphaned recording chunks.
merge_orphaned_chunks(spool_dir, output_dir)
¶
Scan spool_dir for recording directories with chunks and merge them.
This is the boot-time recovery equivalent of the old
files.enqueue_orphaned_capture_files(). It handles:
- Recording directories with finalized .mkv chunks but no merged output: merge them into output_dir.
- Incomplete .mkv.tmp files from crashed writes: delete them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spool_dir
|
Path
|
Directory containing recording subdirectories (each with numbered .mkv chunk files). |
required |
output_dir
|
Path
|
Directory to write merged output files. |
required |