﻿# Rolling video retention during export: keep selected segments alive until the clip is accepted

Rolling video retention during export: keep selected segments alive until the clip is accepted. A practical streaming-video guide with failure mechanisms, a controlled scenario, acceptance evidence and primary refere.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/sv-rolling-segment-retention-clip-export/
Language: en

An event exporter selects segments from a rolling recorder. While export runs, retention deletes an older selected segment, leaving a clip manifest that names files no longer available to the reader.

## The media mechanism

Selecting a filename does not acquire a retention guarantee. Recorder rotation and export consumption need an explicit ownership boundary that protects the chosen immutable segment identities until acceptance or failure.

## Establish the pipeline boundary

Bind the export request to immutable segment identities rather than a fresh directory listing repeated during the copy. Rolling retention can change file membership while the request is still being processed.

Acquire a supported retention lease, make a protected copy or use another reviewed ownership mechanism before the recorder is free to remove the selected members. The mechanism must protect every required segment through readback, not merely the first file opened.

Slow export at the oldest retained edge and force ordinary rotation. Verify either complete protected coverage or a clear failed request with no successful incomplete manifest. Reopen the result independently and release protection on completion and error paths. Retention protection prevents disappearance during export; it does not establish that the originally selected segments contain the requested event interval.

## A constructed failure case

Begin export just before an old segment would normally rotate out. The outcome must be a complete protected set or an explicit failed export, never a successful manifest whose missing member is hidden by the continuing live recorder.

## A practical validation procedure

Pin the recorder retention configuration and choose an event near the oldest retained edge. Slow the exporter and exercise normal rotation. Protect or copy the selected segment set through a supported policy, then verify complete independent readback.

Keep an unchanged control and a deliberate failure case. Change the relevant setting or interruption independently, then compare observed frame identities and state transitions. Measure through recovery as well as the first error; a restarted worker can retain obsolete results or references.

## Evidence for acceptance

Keep selected segment identities, retention ownership and complete exported membership.

## Recovery and limits

Protection of selected segments does not establish that they contain the complete requested event interval.

Define whether recovery drains, discards or isolates pending frames before resuming ordinary service. Preserve compact diagnostic identities and the fixture configuration. Avoid treating a new connection or a live process as proof that previous in-flight work has finished safely.

## References and interpretation

Primary references: [GStreamer segmented recording](https://gstreamer.freedesktop.org/documentation/multifile/splitmuxsink.html); [GStreamer application pipeline manipulation](https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html).

This is a proposed operational validation, not an executed Retrivium benchmark. Documentation defines interfaces and supported behavior; the actual pipeline needs its own evidence. Repeat the check after relevant plugin, decoder, source or preprocessing changes.

## Related reading

Continue with [Kinetics: track video availability and clip identity](/journal/data-guide-kinetics-video-availability/); [Event clips with pre-roll: preserve decodable context before the detection timestamp](/journal/sv-event-clip-preroll-closed-gop-boundary/). Their adjacent context does not replace the specific frame-flow acceptance check described here.
