Skip to content

Episode archive

media.episodes.dvr

media.episodes.dvr covers storing episodes separately from the main video flow. An episode and its video have independent lifetimes: the event may remain accessible after the video is deleted.

Storage and retention

In the current implementation, persistent episode history and images live in central PostgreSQL, while video segments live in the video archive. Episode retention uses the stream or template dvr section: max_depth + episodes_additional_depth, in seconds. These are existing archive settings.

Unset episodes_additional_depth means zero. An unset max_depth in a present dvr section means ten years for episode retention; explicit zero remains zero. Without dvr, or with a zero total, central does not retain episodes.

Retention starts at closed_at for closed episodes or updated_at for open ones. Changes to effective settings apply to all remaining episodes. History returns a record until background cleanup physically deletes it. Deleting a stream deletes its episodes and images.

Writing meta does not extend retention. Annotations are deleted with the episode. Video archive settings are described in Archive recording and Archive depth; episode workflows are in the Optic manual.