﻿# Appsrc timestamps: distinguish capture time from the moment a buffer is pushed

Appsrc timestamps: distinguish capture time from the moment a buffer is pushed. A practical streaming-video guide with failure mechanisms, a controlled scenario, acceptance evidence and primary references.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/sv-appsrc-arrival-time-versus-capture-time/
Language: en

An application buffers camera frames before pushing them into appsrc. Automatic timestamping assigns the current pipeline time, hiding the delay accumulated before submission and making stale images appear recent.

## The media mechanism

A timestamp based on submission running-time is not evidence of sensor capture time. A live adapter must preserve the chosen clock mapping and avoid overwriting an earlier capture observation without explanation.

## Establish the pipeline boundary

Document the clock domain of every timestamp. Pipeline running-time, system monotonic time and a sensor's device clock need not share an origin, and subtracting their raw values does not yield capture age.

Automatic timestamping can make submission timing consistent within the pipeline while leaving pre-submission delay unmeasured. Preserve the sensor observation or an explicit acquisition-time estimate separately and describe any mapping uncertainty.

Delay a marked frame outside appsrc while keeping downstream processing unchanged. Compare the reported capture-to-result interval with the known inserted delay. If only the model interval remains constant, that is expected; if the complete freshness metric loses the delay, its starting boundary is wrong. Repeat after a clock or source-session restart so a stale mapping cannot produce a plausible but invalid age.

## A constructed failure case

Hold a marked frame in the adapter before pushing it. If automatic timestamping makes its reported age nearly disappear, the fixture should expose the missing pre-submission interval rather than report a faster camera.

## A practical validation procedure

Delay a known frame before submission and compare sensor, application and pipeline timestamps. Pin is-live, timestamping and latency settings under the installed interface. Calculate freshness from a documented common clock domain, preserving uncertainty.

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 original capture evidence, submission time and the explicit conversion into pipeline running-time.

## Recovery and limits

A sensor clock without a trustworthy mapping cannot support an exact wall-clock age claim.

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 application pipeline manipulation](https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html); [GStreamer clock synchronization design](https://gstreamer.freedesktop.org/documentation/additional/design/synchronisation.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 [Video retrieval timestamps: use PTS rather than frame-number arithmetic](/journal/video-vfr-pts-frame-indexing/); [RTCP sender reports: distinguish clock mapping from proof of synchronized cameras](/journal/sv-rtcp-sender-report-clock-domain/). Their adjacent context does not replace the specific frame-flow acceptance check described here.
