Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

&buffer

Sets the video buffer

Viewer-Side Option! (&view, &scene, &room)

Options

For OBS setup steps and a comparison of buffer modes, see Smooth playback with a buffer.

Example: &buffer=500

Value
Description

(numeric value)

delay in ms

Details

This feature will increase the size of the audio and video playout delay by means of tweaking the webRTC jitter buffer pipeline (or a related buffer).

Current VDO.Ninja code clamps normal WebRTC receiver buffer hints to 0-4000 ms. These are requests to the browser, not a guarantee of the resulting delay or an upper bound on total end-to-end latency. The browser may honor less, add its own buffering, or take time to settle after a change.

While in theory this option can also help to improve video and audio quality, as a larger playback buffer should help reduce the effects of network jitter and packet loss, it's not a miracle solution in this regard. Adding 200-ms of buffer delay using this feature is worth trying however, as some users have reported it has helped improve their connections.

The problem is that the browser doesn't fully make use of the available buffer if set high, and so it's largely used as mainly a hint. Network conditions, memory limits and other factors may impact the results as well. Older browser versions behaved differently. For current native WebRTC playback, do not rely on a request above 4000 ms producing more video delay. An enabled audio compensation node can still add audio delay, so oversized requests can separate audio from video.

Keeping audio synchronized when changing the buffer

If audio and video are synchronized initially but separate when you change the buffer, add &sync=0 to the viewer URL before connecting. This enables a Web Audio delay node that tries to compensate audio as the requested buffer changes, including changes through iframe setBufferDelay.

This is a viewer-side setting for normal WebRTC input. &sync=0 does not require &buffer2 or chunked mode. Browser buffer changes are approximate and may take time to settle; this is not a frame-accurate playout guarantee.

Example values

&buffer=0 requests minimal browser buffering. Add &sync=0 separately to enable explicit audio compensation.

&buffer=100 requests a 100 ms buffer target; it is not necessarily another 100 ms on top of the existing browser delay.

&buffer=200 can help reduce video problems, such as frame jitter, with 200-ms of added delay.

If the issue is short random packet loss rather than jitter, &codec=vp8&vred is another advanced normal-WebRTC experiment to compare. It does not replace buffering; it only asks negotiation to prefer video RED when the browser supports it.

Use &sync=0 to enable audio compensation while adjusting the buffer. A nonzero &sync value adds an audio offset relative to that compensation. The browser's normal buffering alone may not keep both tracks aligned during changes.

Chunked mode

When using &buffer with a stream that is being sent using chunked-mode (&chunked), the method of buffering will be different as it doesn't rely on the built-in system playout webRTC buffer delay function.

Chunked buffering has separate limits: shared audio/video targets are capped at 30000 ms. The video-only ceiling defaults to 180000 ms and can be configured with &chunkbufferceil; memory, decoding, and actual playback behavior still limit practical use.

As well, the buffering works to buffer the stream, in a way similar to HLS or RTMP buffering. The default chunked viewer buffer depends on how chunked mode is being used. Plain &chunked starts around 3000-ms if no profile or buffer override is used, while &chunkprofile presets use lower starting targets. For clearer control with chunked mode, use &chunkbuffer, &chunkbufferfloor, and &chunkbufferceil.

Current shared chunked audio/video buffering is limited to about 30 seconds. Minute-long chunked buffering is therefore best treated as an experimental video-only path; use HLS or an encoded OBS/server workflow when synchronized audio and video must be delayed by minutes.

Please refer to &chunked mode for more details, but it could be an option if your goal is to improve stream stability under high packet loss. Recent Chromium-based runtimes are the primary target. Firefox publishing is disabled, while Safari/WebKit publishing is enabled only when its complete WebCodecs and worker track-processing stack passes VDO.Ninja's capability checks.

For the separate audio-node capacity and examples of reducing compensation with &sync=-100, see &sync. Negative buffer values do not provide negative latency; use zero for minimum practical buffering.

Update in v23

The option to right click a remote video and add/adjust the &buffer delay for that specific video dynamically.

&buffer2&sync&vredDelay an incoming feed

Last updated

Was this helpful?