The example application
A camera publishes a 2 Mbps video stream to a relay. Ten viewers subscribe to it. Assume the relay forwards the same encoded media to every viewer without transcoding. The target glass-to-glass delay is 100 ms. All numbers in this walkthrough are teaching assumptions.Step 1: produce media that can be decoded
The encoder transforms captured images into compressed media. A keyframe can provide a decoding starting point without earlier video frames, subject to the codec’s configuration requirements. Other frames can depend on previous frames. A new viewer needs the applicable codec configuration and a usable starting point. Receiving arbitrary bytes from the middle of a dependency chain does not guarantee a visible picture. Media packaging determines how codec data maps to MoQ objects and groups. Do not assume that every object is an independently decodable image.Step 2: publish objects through the relay
The publisher opens its session and publishes the appropriate track. The relay uses the track and object metadata to route the data. The subscriber uses the matching track name and namespace. The publisher sends one copy of the media to this relay in the simplified example. Its media upload rate is approximately 2 Mbps. The relay’s media egress for ten viewers is approximately10 * 2 = 20 Mbps.
Protocol overhead, retransmissions, and other traffic add to both figures.
For 1,000 viewers at the same rate, the relay tier needs approximately 2,000 Mbps of media egress.
Fan-out moves the multiplication away from the camera; it does not remove the work.
Step 3: let a viewer join
- The viewer resolves the endpoint and opens its transport session.
- The application establishes identity and requests the permitted track.
- The relay accepts the request or returns a failure.
- The viewer receives the configuration and media needed to start decoding.
- The viewer buffers, decodes, and displays the media.
Step 4: account for delay
Use the budget from the foundation lesson:
If the viewer buffer grows to 70 ms, the total becomes 135 ms.
The first question is why the buffer grew.
Possible causes include varying arrival times, slow decoding, or a policy that retains old frames.
Measure the relevant stage before changing the transport.
Step 5: diagnose one symptom at a time
These are hypotheses, not diagnoses.
For example, a blank picture with arriving objects does not prove that the relay is healthy in every respect.
It narrows the next check to the content and processing of those objects.
Exercise
- Calculate media egress for 25 viewers at 2 Mbps each.
- A subscriber receives objects but displays no video. Name two checks before changing the subnet configuration.
- The viewer buffer adds 45 ms. How much must other stages improve to retain the 100 ms target?
- Explain why dropping an arbitrary video object can affect later objects.
Worked answers
Worked answers
- The assumed media egress is 50 Mbps, before overhead and retransmissions.
- Check codec configuration and whether the received sequence contains a usable decoding starting point. Read the decoder’s errors.
- The original total was 90 ms. The new total is 135 ms, so at least 35 ms must be removed.
- Later frames can depend on the dropped data. A deliberate dependency-aware discard policy differs from discarding arbitrary bytes.