> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/developer-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eyepop.ai/developer-documentation/platform/temporal-context.md).

# Temporal Context in Videos

Run cheap analysis on every frame and deep analysis only where it matters

A video is mostly repetition. A car crossing a drive-through lane is in view for a few hundred frames, and every one of them shows the same car. Asking a vision-language model for its make and model on each frame costs a large context and extensive token consumption for one answer — and most of those frames show the car blurred, half out of view, or from the wrong angle.

**Temporal context** splits a Pop's work in two:

1. **Efficient components run on every frame, in real time.** [Inferred](https://docs.eyepop.ai/developer-documentation/platform/pop/pop-components.md#inference) classification, detection, and [tracking](https://docs.eyepop.ai/developer-documentation/platform/pop/pop-components.md#tracking) are fast enough to keep up with a live stream. Together they build a running picture of what is in the scene, which object is which, how long each one has been there, and how well each frame shows it.
2. **Deep analysis runs only on the frames or snippets that are worth it.** EyePop manages that context and uses it to pick the most relevant moments. The expensive stages — a vision-language model, generating SOTA embeddings, OCR, action detection — run once on those moments instead of on every frame.

<figure><img src="https://1956543008-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2tRktyRCGgE1tPlAfT4h%2Fuploads%2Fgit-blob-ad234ec5e4dc1b4ed803943d2f3e326e3c438596%2Ftemporal-context-diagram.svg?alt=media" alt="A live stream or video feeds a real-time pipeline that detects, tracks and classifies every frame and returns live predictions. The pipeline fills a temporal context of tracked objects over time, where each frame shows the object more or less clearly. A relevancy step picks each object&#x27;s best moment and sends only that to a deep analysis pipeline, such as a VLM or face-ID, which returns insights per object a little later."><figcaption><p>The real-time pipeline sees every frame; deep analysis sees only each object's best moment.</p></figcaption></figure>

The result is a Pop that watches all of a stream but pays for deep analysis per *object or event instance*, not per *frame*, and gets that analysis on the clearest view the stream offered.

Temporal context applies to **live streams** and **prerecorded videos** alike. A single image has no time axis, so there is nothing to select from.

### How it fits into a Pop

Nothing new is needed on the efficient side: it is the detector and `tracking` component a Pop already uses for video. The selection happens on the tracking component's [forward](https://docs.eyepop.ai/developer-documentation/platform/pop/pop-forwarding.md), through a **select operator**. Whatever the operator forwards to is the deep analysis.

### Next steps

* [Select Operators](https://docs.eyepop.ai/developer-documentation/platform/temporal-context/select-operators.md) — how a select operator picks a frame, and what comes back
* [Example: Make and Model Insights from Car Drive-Bys](https://docs.eyepop.ai/developer-documentation/platform/temporal-context/example-car-make-and-model.md) — a custom VLM ability, once per car
* [Example: Best Face-ID Vector from Walk-Bys](https://docs.eyepop.ai/developer-documentation/platform/temporal-context/example-face-id-from-walk-bys.md) — one face-ID vector per person
