Skip to content

guide

Why streaming picture quality drops in the middle of a movie

Leads the technical side. The Filmatic app was his idea, and he created the algorithm and the framework the app runs on.

8 min read

A dark corridor, a slow push in, and the picture turns to mud. Faces go waxy, the shadows break into visible bands. Ten seconds later, in a bright wide shot, it is sharp again.

Nothing happened to your connection. What happened is that you were being sent a different version of the movie, and the switch is not a fault. It is the design.

You are not streaming a file

The intuition is that the movie sits on a server and travels down the wire to you. That has not been how streaming works for well over a decade.

Each title is encoded several times over, at a range of bitrates and resolutions. That set of versions is called a ladder, and each rung is a complete copy of the movie at one quality level. Each rung is then cut into segments a few seconds long, aligned so that segment fourteen of one rung starts and ends at the same moment as segment fourteen of every other.

The two specifications that made this universal describe exactly that. MPEG-DASH, published as ISO/IEC 23009-1 in April 2012, defines content made available at a variety of bit rates as alternative segments covering aligned short intervals of playback time. Apple’s HTTP Live Streaming was written up as RFC 8216 in August 2017 by Roger Pantos and William May, and does the same job with different plumbing.

Because the segments line up, the player can change its mind between any two of them without a visible join.

Your player is making the decision, several times a minute

Nothing on the server chooses your quality. Your device does, and it re-decides constantly.

Before each segment it asks two questions. How fast did the last few downloads actually arrive, and how many seconds of video are already buffered ahead of the playhead. From those it picks the rung for the next segment.

That second question explains behaviour that otherwise looks irrational. A player with a nearly empty buffer will take a lower rung even on a fast connection, because running out of video is worse than a soft picture. It explains the first few seconds of everything you watch, too. The player has no measurements yet, so it starts low and climbs as evidence arrives.

Some scenes cost far more than others

Here is the part that actually answers the question in the title.

A codec does not store pictures. It stores differences, and predictions of what the next frame will look like based on the ones around it. A static shot of a lit room predicts beautifully, so it costs almost nothing to send. Grain, smoke, rain, confetti, water and foliage predict terribly, because they are close to random and randomness cannot be inferred from its neighbours.

Dark scenes are the worst case twice over. They are usually where the grain lives, and they are full of slow gradients across large areas, which is precisely where too few bits show up as banding rather than as softness.

So the bitrate your player chose during the wide daylight shot, which was more than enough then, is not enough now. The encoder spends what it has on the big shapes and lets the texture go. You see that as mud.

The ceiling was set before you pressed play

The other half of the answer is that the top rung is not a property of your connection. It is a decision made when the title was encoded.

Netflix moved to per-title encoding in December 2015, publishing the change on its technology blog, and the analysis by Jan Ozer in January 2016 quotes David Ronca and Anne Aaron on the reasoning. The old approach used one ladder for the whole catalogue, which is wrong in both directions at once. A clean animated movie gets far more bits than it can use, and a grainy, fast-moving live-action one does not get enough.

To decide those ladders you need to score picture quality the way a person would, which is harder than measuring error. Netflix built VMAF for it, with USC, Nantes Université and the University of Texas at Austin, announced in June 2016 and released as open source. It predicts subjective quality from a reference and a distorted version, and it is now used well beyond Netflix.

The practical consequence is the one viewers notice. Two movies, one service, one connection, one evening, and genuinely different ceilings. That is not your network being inconsistent.

What the advertised speeds actually mean

Netflix publishes its recommended connection speeds, and they are lower than most people expect: 3 Mbps for HD at 720p, 5 Mbps for full HD at 1080p, and 15 Mbps for 4K.

Read those as floors rather than targets. They are the point below which the top rung becomes unreachable. Above them, extra headroom buys stability rather than sharpness, because it makes the player less likely to downgrade on a momentary dip. Once you are comfortably past the floor for your resolution, a faster plan does very little for picture quality and quite a lot for how often the quality changes.

What actually helps

Fix the variance, not the speed. Switching is triggered by throughput wobbling, not by it being low. A wired connection, or the 5GHz band instead of 2.4GHz, removes more visible downgrades than a faster plan does.

Give it a head start. Pausing for twenty seconds after pressing play lets the buffer fill and the player climb the ladder before anything important happens. Skipping backwards and forwards empties that buffer and puts you back at the bottom.

Pin the quality where the app allows it. Some apps expose a manual setting. Forcing a high rung makes the player buffer instead of downgrade, which trades a soft picture for the risk of a pause. On a stable connection that is usually the better trade.

Judge a service on a grainy movie, not a clean one. Animation and modern digital photography look good almost everywhere. A grainy seventies print is where the ladders differ, and it is the honest test of what a service is actually sending you.

Questions

Why does the picture go soft only in dark scenes?

Dark scenes are expensive to compress. Film grain, smoke, rain and slow gradients in shadow are close to random from a codec's point of view, and random detail cannot be predicted from the frames around it, so it costs far more bits than a static bright shot. At the bitrate your player has settled on, those bits are not available, and the encoder spends what it has on the large shapes rather than the texture.

Is it my internet connection?

Sometimes, and less often than people assume. The player picks a quality level from measured throughput and how full its buffer is, so a brief dip can cause a downgrade that lasts well past the dip. But the ceiling is set at encoding time. If the top rung available for that title is lower than your connection could carry, a faster connection changes nothing at all.

Why does one movie look better than another on the same service at the same speed?

Because the quality levels are calculated per title rather than fixed for the whole catalogue. Netflix moved to per-title encoding in December 2015, and a clean animated movie reaches excellent quality at a fraction of the bitrate a grainy live-action one needs. Two titles on one service, on one connection, can therefore be offered genuinely different ceilings.

Does paying for a higher tier fix it?

It raises the ceiling and does nothing to the mechanism. A plan that unlocks 4K adds rungs at the top of the ladder, so the best case improves. The switching still happens, dark and grainy scenes are still the expensive ones, and a scene that drops you down two rungs will still look worse than the shot before it.

Why does it look worse right after I press play?

The player has no measurement yet. It has to start somewhere, so it begins conservatively, fills its buffer, and only then moves up as evidence arrives that the connection can carry more. The first few seconds of almost any stream are the lowest quality you will see, and it is deliberate, because starting high and stalling is worse than starting low and improving.

Can I stop it switching?

On some apps. Where a manual quality setting exists, pinning it high forces the player to stay there and to buffer rather than downgrade, which trades soft picture for the risk of pausing. A wired connection or the 5GHz band removes most of the throughput noise that triggers switching in the first place, which usually helps more.

Keep reading

guide

Why streaming apps forget where you stopped

You stopped at the reveal and it resumes ten minutes earlier, or at the start. Not a fault in your account. It is how your position is stored and synced.

Everything optional starts switched off. Nothing in a category loads until you allow it.