All posts

Why we rebuilt live video quality from the encoder up

Sellers told us their streams looked blurry even on a full-strength connection, standing a few inches from the camera. Bandwidth was not the problem. We went looking for what was.

Nobody was asking for the good picture

A live stream is published in several quality layers at once, and the viewer picks one. Our viewers never picked. Neither the app nor the web player ever requested a layer, so the routing server chose for them — and it dropped to a lower layer at the first dip in bandwidth, then recovered lazily, if at all. A momentary wobble could leave a stream soft for minutes.

Both viewers now pin the top layer explicitly at subscribe time, and log every switch so we can see it happen instead of guessing.

The encoder was fighting the phone

We were encoding in a format iPhones have no hardware encoder for, which meant three quality layers were being produced in software, on the CPU, while the phone was also running a camera and a network connection. That is the standing pressure that licenses a device to quietly degrade everything.

Switching to the format the hardware accelerates removed that pressure. Two related fixes came with it: the encoder is now told to hold resolution rather than silently soften the top layer, and the quality ladder's frame rates are honest about what is actually delivered.

Two more sources of literal blur

Autofocus was hunting — a stills-camera refocus lurch in the middle of a broadcast reads exactly like the picture going soft. It now ramps smoothly.

And Center Stage, the auto-framing feature, was crop-upscaling the image to keep a subject centred: a real, mechanical loss of sharpness. It also turned out to be writing a process-wide camera setting that the calling layer inherited. It is gone, and that leak is closed.

Uplink and heat

Sellers broadcasting on cellular reported phones running hot. Publishing three layers uphill on a mobile connection is a lot to ask, so the ladder is now aware of what it is running on: on cellular it publishes two layers instead of three, and if the phone reports thermal pressure the middle layer drops out until it recovers. Every transition is logged.

Share this post