> For the complete documentation index, see [llms.txt](https://docs.vdo.ninja/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vdo.ninja/advanced-settings/video-parameters/and-buffer2.md).

# \&buffer2

Same as \&buffer, but instead includes the round-trip-time

Viewer-Side Option! ([`&view`](/advanced-settings/mixer-scene-parameters/view.md), [`&scene`](/advanced-settings/mixer-scene-parameters/scene.md), [`&room`](/advanced-settings/setup-parameters/room.md))

## Options

Example: `&buffer2=500`

| Value           | Description |
| --------------- | ----------- |
| (numeric value) | delay in ms |

## Details

`&buffer2=500` requests buffering like [`&buffer`](/advanced-settings/video-parameters/buffer.md), while also accounting for an estimate of network transit time. The normal WebRTC calculation subtracts **half the available round-trip time (RTT)** as an estimate of one-way delay. For example, a 200 ms RTT contributes a 100 ms subtraction, not 200 ms. Measured jitter-buffer delay also affects the adjustment, so the requested value is not an exact end-to-end latency guarantee.

The viewer obtains this RTT from the browser's selected ICE candidate-pair statistics. It does not require a custom statistics report from the publisher. If the browser does not expose a usable RTT, the RTT correction cannot be applied.

`&buffer2` does not enable explicit audio sync compensation. If changing the buffer separates audio from video, add [`&sync=0`](/advanced-settings/audio-parameters/sync.md) to the viewer URL before connecting. This also works with iframe `setBufferDelay`; `&buffer2` is optional. If an external sync system already measures stream offsets, it can use `&sync=0` with the API without adding RTT compensation.

It won't work that well with [Meshcast](/advanced-settings/meshcast-parameters/and-meshcast.md).

Accuracy and settling time depend on the browser and connection. This is not a frame-accurate timing control.

## Related

{% content-ref url="/pages/-MZdtO5YNVAt2R8vG5Us" %}
[\&buffer](/advanced-settings/video-parameters/buffer.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MZdvss-ktTf4GVpebJs" %}
[\&sync](/advanced-settings/audio-parameters/sync.md)
{% endcontent-ref %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vdo.ninja/advanced-settings/video-parameters/and-buffer2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
