Connection speed and health

An Eagle 3D Streaming stream travels over three parts: the streaming machine's internet connection, the internet in between, and the viewer's internet connection. Each part is tested a different way. A speed test can run at any time, but during the stream it shares the connection with the video, so on a limited connection the video gets worse while it runs. The part in between is measured only by the video itself.

1. The path has three parts, and each is tested differently

Streaming machine, the internet in between, the viewer
Unreal app on the streaming machine machine's internet the internet viewer's internet Viewer's web page the stream, embedded Part 1 tested from the Unreal app Part 2 measured only by WebRTC (the video) Part 3 tested from the web page (e.g. Cloudflare)
A test at one end says nothing about the other end. Only the video's own numbers cover the whole way from the Unreal app to the viewer.
parthow to test itif you test during the stream
1. The streaming machine's connection From inside your Unreal app: download and upload a file and time both. The test shares the machine's upload with the video it is sending, so the stream can suffer while it runs.
2. Everything in between Only WebRTC, the connection the video travels on, measures it. It is reported to your page as Live connection state. Costs nothing: the numbers come from the video itself.
3. The viewer's connection From the web page: a speed test such as Cloudflare's. It measures the viewer's internet, not the machine's. The test shares the viewer's connection with the video: nothing visible on a fast connection, softer or stuttering video on a limited one, until the test ends.

A test before the video starts has the connection to itself, at either end. When to test is your choice; if your viewers may be on limited connections, testing before the video starts keeps the test from touching the stream.

2. What a speed test does to the stream

Before the video: no effect. During the video: it competes with it

A speed test downloads and uploads as much data as the connection can carry, as fast as it can. The video needs that same connection. So the moment you run the test decides whether the viewer notices.

Before the video starts

No effect on the stream. Nothing else is using the connection yet, so the test measures it fully and the video starts afterwards on a free line.

During the stream

For the few seconds the test runs, the test and the video share the connection:

  1. Fast connection (it carries the test and the video together): nothing visible.
  2. Limited or unsteady connection: the test takes bandwidth the video needs, and the viewer sees it:
    • the picture turns blurry or blocky - WebRTC lowers the video quality to fit what is left;
    • the video stutters or freezes for a moment when packets are lost;
    • clicks and key presses respond late (higher round trip), because the data waits in a queue behind the test.
  3. After the test ends, WebRTC raises the quality again within seconds and the stream recovers. Nothing is lost permanently, but the viewer saw a worse stream while it ran.
  4. The test result is also lower than the line can really do, because the video was using part of it.

The same applies on the streaming machine's side: a test run from inside your Unreal app during the stream uses the upload the video is sent over.

3. How and when to run a speed test

Before the video starts, from your page or your Unreal app

When: before the video starts. Your page can run the test before it opens the stream (before it sets the <iframe> address or starts the Web SDK), or any time until it is told the video has started. After that, read the video's own numbers instead (section 4).

How: the viewer's connection (part 3) is tested from your web page, with a speed test such as Cloudflare's. The streaming machine's connection (part 1) is tested from inside your Unreal app: download and upload a file and time both. The part in between (part 2) has no test of its own; only the video measures it.

Knowing when the video starts: your page is told the moment it does: in an <iframe>, the stream.playing message; with the Web SDK, the onDataChannelOpen callback.

Which server a test measures matters. A public speed test (for example Cloudflare's) measures the connection to that company's nearest server, not to the machine that streams to the viewer, which can be in another region. It is a useful check of the viewer's own line, not of the path the video takes. A test file served from the streaming region itself is not available yet. Need this? Ask support (support@eagle3dstreaming.com).

A rough estimate with no test at all: Chrome and Edge give every page the browser's own guess of the connection, navigator.connection.downlink (megabits per second) and navigator.connection.rtt (milliseconds). It is a rounded estimate of the viewer's last link, and Safari and Firefox do not provide it.

4. During the stream: the video's own numbers

Live connection state, every 5 seconds, at no cost

Once the video has started, the stream itself reports how well it is reaching the viewer — round trip, lost packets, jitter, bitrate, frame rate and picture size — every 5 seconds, without adding anything to the connection. These numbers exist only after the video starts.

How to read them on the streaming page, in an iframe and with the Web SDK, and what each number means: Live connection state.

5. Why the live numbers are the better measure

The video measures the connection all the time

The video travels over WebRTC, and WebRTC is measuring the connection the whole time. It raises the video quality step by step, watches for the network to push back — packets arriving later and later, or getting lost — then lowers the quality a little and tries again. Within seconds it settles close to what the connection can carry, and it keeps adjusting as the connection changes.

So during a stream, the live numbers describe the real path from the streaming machine to the viewer, and reading them adds nothing to the connection. This adjustment is built into WebRTC itself, inside the browser and inside Unreal's Pixel Streaming; it is not a setting on Eagle 3D Streaming.

Related

Last updated