In this article
Derive event offsets from the actual concatenation edit map, not guessed clip durations.
The generated-data scenario
A synthetic event-recognition corpus joins generated clips and shifts each sidecar annotation by an assumed clip duration. The concat demuxer can use a different duration to place the next file. The result is a valid video whose labels drift at edit boundaries. The investigation asks whether the generated sequence and annotation timeline share the same actual edit mapping.
The generation mechanism
FFmpeg documents that the concat demuxer adjusts timestamps globally and uses each file duration to offset the following file. Incorrect durations can cause artifacts, and unequal stream lengths can leave gaps. The inspected implementation accumulates file start times and shifts packet timestamps. An explicit duration directive changes the mapping; it is not merely descriptive metadata with no effect on subsequent segments.
Define the dataset contract
Retain source clip identity, selected interval, effective duration, concatenated start and annotation offset together. Separate video and audio stream coverage where they differ. Define how events crossing an edit are represented and whether gaps are eligible training intervals. A declared filename order establishes sequence membership but does not establish the exact presentation-time boundary of every joined segment.
A step-by-step protocol
Prepare clips with distinctive visible event markers near their boundaries. Preserve the actual concat script and probe its resulting timeline. Transfer labels through the recorded source-to-output mapping and inspect decoded frames around each marker. Include a deliberately incorrect duration as a negative control. Compare resulting timestamps instead of assuming the total duration equals a sum calculated from nominal frame rates.
Evidence required for acceptance
Acceptance requires the script, effective edit mapping, output timing evidence and correctly aligned marker labels. Keep the relation between source-local and sequence-global time after extracting training frames. Verify audio-associated labels independently when stream endings differ. A successfully decoded final file and the expected clip count cannot prove that every event retained its intended timing after concatenation.
Failure cases and limits
The concat demuxer is not the same operation as every concat filter or application-level editor. Pin the actual path and its stream-compatibility requirements. Codec preroll and timestamp handling can need additional review. This protocol establishes annotation alignment to the produced sequence; it does not claim perceptually seamless edits, physical continuity between synthetic scenes or measured recognition improvements.
Primary references and related reading
Derive event offsets from the actual concatenation edit map, not guessed clip durations. FFmpeg concat demuxer duration and timestamp contract; FFmpeg concat start-time and packet timestamp offsets.
The proposed investigation of ffmpeg concat duration generated event offset is a proposed dataset-contract review; no production dataset was generated or evaluated. Related reading: PyAV video datasets: presentation timestamps are safer than frame-number clocks; Video retrieval timestamps: use PTS rather than frame-number arithmetic.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.