> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/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/platform/sources-and-options/options/live-uploads.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Live Uploads

Treat an uploaded stream as real time and drop frames to keep up

When your application is pushing frames in real time — a camera you are reading yourself, a transcoder's output — `is_live` tells the worker to treat the stream as real time. Frames are dropped when inference cannot keep pace, instead of queueing up and drifting further behind the present.

Fetched `rtsp://` sources are treated as live automatically, so this is only needed for streams you upload.

### Dropped frames are reported

A live source is told when frames of it are dropped. The pipeline API sends it a `warning` whose `info.code` is `frames_dropped`, with `info.dropped`, the frames dropped since the last such warning, and `info.total`, the frames dropped since the source started. The first comes within a second of the first drop, the next at most every 10 seconds, and a last one before the source ends with whatever is left. The source's `end` carries the total as `droppedFrames`, 0 included.

Frames are dropped when inference does not keep pace, and also when a burst arrives at once, such as what a relay held while it connected: the pipeline keeps only the newest second of it. A warning or two at the start of a stream is that; warnings all along it mean the Pop is too slow for the stream's frame rate, and a lower [frame rate](https://docs.eyepop.ai/platform/sources-and-options/options/frame-rate.md) avoids them.

The Python SDK keeps a job's warnings on `job.warnings`; the Node SDK does not report them yet. This needs eyepop-worker 4.32.0 or later.

A live stream you send as it is captured, such as a camera's MPEG-TS read from a pipe, is **real time** already. Mark it so with `real_time` (Python) or `realTime` (Node): the pipeline then does not pace it to its timestamps again, so a network hiccup or a slow first frame does not stay on the stream's latency. Leave it off for a recorded file sent as live; unpaced, it would play as fast as it uploads. It needs eyepop-worker 4.31.2 or later, and the Python SDK `eyepop` 4.4.0 or later or the Node SDK `@eyepop.ai/eyepop` 4.4.0 or later: an older pipeline API gets the upload again without it, and the SDK logs a warning once. The Python SDK marks a camera relayed with `eyepop.relay.rtsp_relay_stream()` as real time by default.

{% tabs %}
{% tab title="Python" %}

```python
# frames: a file-like object written to in real time — a pipe, or your own buffer
with EyePopSdk.sync_worker(pop=pop) as endpoint:
    job = endpoint.upload_stream(frames, "video/mpegts", is_live=True, real_time=True)
    while result := job.predict():
        print(result)
```

On the async endpoint the stream can also be an async iterable of `bytes`, which suits frames you are generating rather than writing somewhere.
{% endtab %}

{% tab title="Node" %}

```typescript
// frames: a web ReadableStream written to in real time, such as Readable.toWeb(pipe) for a Node pipe
const results = await endpoint.process({
    source: { stream: frames, mimeType: 'video/mp2t', live: true, realTime: true },
})
for await (const result of results) {
    console.log(result)
}
```

A browser's camera or screen goes over WebRTC instead, which is live by definition: see [Live from a browser](https://docs.eyepop.ai/platform/sources-and-options/sources.md#live-from-a-browser).
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eyepop.ai/platform/sources-and-options/options/live-uploads.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
