align_overlaps

Align a chunk sequence to its narration and derive per-join overlaps

Description

Places each chunk on the narration clock via [align_audio], then derives each join’s overlap from the positions: the seconds by which chunk j’s video runs past where chunk j+1’s content begins (clamped at 0 = butt join). This is layout truth by construction – a chained chunk’s duplicated head and an undersized chunk’s shortfall both fall out of where the words actually are.

Usage

align_overlaps(files, narration, fps = 24)

Arguments

  • files: Character vector of chunk media paths, in order.
  • narration: The continuous narration audio.
  • fps: Frame rate for the overlap frame counts (default 24).

Value

A data frame with one row per chunk: chunk, file, frames, fps, offset (narration seconds), correlation, and overlap (frames; 0 for the first chunk).

Examples

align_overlaps(c("media/chunk01.mp4", "media/chunk02.mp4"), "audio.mp3")