> 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/video-mode.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Video Mode

Process an uploaded video while it uploads, or after

An **uploaded** video is buffered in full before processing starts. That is the safe default, but it means the first prediction waits for the last byte. `stream` mode processes the video while it is still uploading, so predictions start arriving almost immediately.

| Mode               | Behavior                                      |
| ------------------ | --------------------------------------------- |
| `buffer` (default) | Upload completes, then the video is processed |
| `stream`           | Video is processed as it uploads              |

This is a property of the **source** rather than of the request, because it only means anything for uploaded video. Fetched URLs and live streams are always processed as they arrive.

Buffering has to hold the whole video, so it is capped at **1 GiB**. A larger upload is rejected with a `400`. `stream` mode has no such cap, because nothing is held — it is the answer for a video too big to buffer, as well as for one you do not want to wait for.

{% hint style="info" %}
On an on-premise instance the cap is yours to set: `max-upload-buffer` in `eyepop-instance.yml`, in bytes, defaulting to `1073741824` (1 GiB). In the cloud the 1 GiB default applies and cannot be changed.
{% endhint %}

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

```python
from eyepop.worker.worker_types import VideoMode

job = endpoint.upload("clip.mp4", video_mode=VideoMode.STREAM)
while result := job.predict():
    print(result)
```

{% endtab %}

{% tab title="Node" %}

```typescript
import { VideoMode } from '@eyepop.ai/eyepop'

const results = await endpoint.process({
    source: { path: 'clip.mp4', videoMode: VideoMode.STREAM },
})
```

{% 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/video-mode.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.
