Skip to content

Add wall-clock alignment for recording segments - #5940

Open
Shulepov wants to merge 1 commit into
bluenviron:mainfrom
Shulepov:main
Open

Add wall-clock alignment for recording segments#5940
Shulepov wants to merge 1 commit into
bluenviron:mainfrom
Shulepov:main

Conversation

@Shulepov

@Shulepov Shulepov commented Jul 8, 2026

Copy link
Copy Markdown

Recording segments are currently split relative to the moment recording starts. For example, with recordSegmentDuration: 1h, if a stream starts or reconnects at 12:13, segments are created
around 12:13-13:13, 13:13-14:13, and so on.

For archival recording, it is often more useful to split files on wall-clock boundaries, such as 12:00-13:00, 13:00-14:00, or 12:00-12:05, 12:05-12:10. This makes recorded files easier to
browse, correlate with external systems, export, and manage with retention or post-processing jobs.

This PR adds an optional recordSegmentDurationAligned setting. When enabled, segment rotation is aligned to wall-clock boundaries based on recordSegmentDuration. The default remains
unchanged, so existing configurations keep the current behavior.

The first segment after startup or reconnection can be shorter than recordSegmentDuration, and actual segment switches still happen on the first suitable random access point near the aligned
boundary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant