February 23, 2024

by Akshay Garg, Roger Quero

Maximizing immersion for our members is a crucial aim for the Netflix product and engineering groups to maintain our members entertained and totally engaged in our content material. Leveraging an excellent mixture of mature and cutting-edge shopper system applied sciences to ship a clean playback expertise with glitch-free in-app transitions is a crucial step in the direction of attaining this aim. On this article we clarify our journey in the direction of productizing a greater viewing expertise for our members by using options and capabilities in client streaming gadgets.

If in case you have a streaming system related to your TV, akin to a Roku Set High Field (STB) or an Amazon FireTV Stick, you will have come throughout an possibility within the system show setting pertaining to content material body fee. System producers usually name this function “Match Content material Body Fee”, “Auto alter show refresh fee” or one thing related. When you’ve ever questioned what these options are and the way they will enhance your viewing expertise, hold studying — the next sections cowl the fundamentals of this function and clarify the main points of how the Netflix software makes use of it.

Netflix’s content material catalog consists of video captured and encoded in one in every of numerous body charges starting from 23.97 to 60 frames per second (fps). When a member chooses to observe a film or a TV present on a supply system (ex. Set-top field, Streaming stick, Recreation Console, and so on…) the content material is delivered after which decoded at its native body fee, which is the body fee it was captured and encoded in. After the decode step, the supply system converts it to the HDMI output body fee which was configured primarily based on the capabilities of the HDMI enter port of the related sink system (TV, AVR, Monitor and so on). Usually, the output body fee over HDMI is mechanically set to 50fps for PAL areas and 60fps for NTSC areas.

Netflix presents restricted excessive body fee content material (50fps or 60fps), however the majority of our catalog and viewing hours might be attributed to members watching 23.97 to 30fps content material. This basically implies that more often than not, our content material goes via a course of referred to as body fee conversion (aka FRC) on the supply system which converts the content material from its native body fee to match the HDMI output body fee by replicating frames. Determine 1 illustrates a easy FRC algorithm that converts 24fps content material to 60fps.

Determine 1 : 3:2 pulldown approach to transform 24FPS content material to 60FPS

Changing the content material and transmitting it over HDMI on the output body fee sounds logical and simple. The truth is, FRC works effectively when the output body fee is an integer a number of of the native body fee ( ex. 24→48, 25→50, 30→60, 24→120, and so on…). Alternatively, FRC introduces a visible artifact referred to as Judder when non-integer a number of conversion is required (ex. 24→60, 25→60, and so on…), which manifests as uneven video playback as illustrated under:

With Judder
With out Judder

You will need to word that the severity of the judder is determined by the replication sample. Because of this, judder is extra outstanding in PAL areas due to the method of changing 24fps content material to 50fps over HDMI (see Determine 2):

  • Complete of fifty frames have to be transmitted over HDMI per second
  • Supply system should replicate the unique 24 frames to fill within the lacking 26 frames
  • 50 output frames from 24 authentic frames are derived as follows:
  • 22 frames are duplicated ( complete of 44 frames )
  • 2 frames are repeated 3 times ( complete of 6 frames )
Determine 2: Instance of a 24 to 50fps body fee conversion algorithm

As a overview, judder is extra pronounced when the frequency of the variety of repeated frames is inconsistent and unfold out e.g. within the situation talked about above, the body replication issue varies between 2 and three leading to a extra outstanding judder.

Now that we’ve a greater understanding of the problem, let’s overview the options that Netflix has invested in. As a result of fragmented nature of system capabilities within the ecosystem, we explored a number of options to handle this challenge for as many gadgets as attainable. Every distinctive answer leverages present or new supply system capabilities and comes with numerous tradeoffs.

The primary answer we explored and lately enabled leverages the potential of present supply & sink gadgets to vary the outgoing body fee on the HDMI hyperlink. As soon as this function is enabled within the system settings, gadgets will match the HDMI output body fee with the content material body fee, both precisely or an integer a number of, with out person intervention.

Whereas this feels like the proper answer, gadgets that assist older HDMI applied sciences e.g. HDMI v<2.1, can’t change the body fee with out additionally altering the HDMI information fee. This ends in what is usually referred as an “HDMI bonk” which causes the TV to show a clean display momentarily. Not solely is that this a disruptive expertise for members, however the length of the clean display varies relying on how briskly the supply and sink gadgets can resynchronize. Determine 3 under is an instance of how this transition appears:

Determine 3: Native body fee expertise with display blanking

Enhancements within the current HDMI requirements (HDMI 2.1+) now enable a supply system to ship the video content material at its native body fee with no need an HDMI resynchronization. That is attainable via an progressive expertise referred to as Quick Media Switching (QMS) which is an extension of Variable Refresh Rate (VRR) focused for content material playback situations. QMS permits a supply system to take care of a relentless information fee on the HDMI hyperlink even throughout transmission of content material with completely different body charges. It does so by adjusting the quantity of non-visible padding information whereas retaining the quantity of seen video information fixed. As a result of fixed HDMI information fee, the HDMI transmitter and receiver don’t have to resynchronize, resulting in a seamless/glitch-free transition as illustrated in Determine 4.

HDMI QMS is positioned to be the best answer to handle the issue we’re presenting. Sadly, at current, this expertise is comparatively new and adoption into supply and sink gadgets will take time.

Determine 4: Native body fee expertise with out display blanking utilizing HDMI QMS

Aside from the above HDMI specification dependent options, it’s attainable for an software like Netflix to control the presentation time stamp worth of every video body to reduce the impact of judder i.e. the applying can current video frames to the underlying supply system platform at a cadence that may assist the supply system to reduce the judder related to FRC on the HDMI output hyperlink.

Allow us to perceive this concept with the assistance of an instance. Let’s return to the identical 24 to 50 fps FRC situation that was lined earlier. However, as a substitute of eager about the FRC fee per second (24 ⇒ 50 fps), let’s broaden the FRC calculation time interval to three seconds (24*3 = 72 ⇒50*3 = 150 fps). For content material with a local body fee of 24 fps, the supply system must get 72 frames from the streaming software in a interval of three seconds. Now as a substitute of sending 24 frames per second at an everyday per second cadence, for every 3 second interval the Netflix software can determine to ship 25 frames within the first 2 seconds (25 x 2 = 50) and 22 frames within the third second thereby nonetheless sending a complete of 72 (50+22) frames in 3 seconds. This strategy creates a fair FRC within the first 2 seconds (25 frames replicated twice evenly) and within the third second the supply system can do a 22 to 50 fps FRC which is able to create much less visible judder in comparison with the 24->50 fps FRC given a extra even body replication sample. This idea is illustrated in Determine 5 under.

Determine 5: FRC Algorithm from Answer#3 for twenty-four to 50 fps conversion

NOTE: This answer was developed by David Zheng within the Companion Expertise Expertise staff at Netflix. Be careful for an upcoming article going into additional particulars of this answer.

Given the attainable options out there to make use of and the related advantages and limitations, the Netflix software operating on a supply system adapts to make use of one in every of these approaches primarily based on components akin to supply and sink system capabilities, person preferences and the precise use case throughout the Netflix software. Let’s stroll via every of those elements briefly.

Each supply system that integrates the Netflix software is required to let the applying know if it and the related sink system have the flexibility to ship and obtain video content material at its native body fee. As well as, a supply system is required to tell whether or not it may possibly assist QMS and carry out a seamless playback begin of any content material at its native body fee on the related HDMI hyperlink.

As mentioned within the introduction part, the presence of a system setting like “Match Content material Body Fee” sometimes signifies {that a} supply system is able to this function.

Even when a supply system and the related sink can assist Native content material body fee streaming (seamless or non-seamless), a person may need chosen not to do that by way of the supply system system settings e.g. “Match Content material Body Fee” set to “By no means”. Or they could have indicated a choice of doing this solely when the native content material body fee play begin can occur in a seamless method e.g. “Match Content material Body Fee” set to “Seamless”.

The Netflix software must know this person choice with a view to honor their choice. Therefore, supply gadgets are anticipated to relay this person choice to the Netflix software to assist with this run-time determination making.

Despite supply system functionality and the person preferences collectively indicating that the Native Content material Body Fee streaming ought to be enabled, the Netflix software can determine to disable this function for particular member experiences. For example, when the person is looking Netflix content material within the residence UI, we can not play Netflix trailers of their Native body fee as a result of following causes:

  • If utilizing Answer # 1, when the Netflix trailers are encoded in various content material body charges, switching between trailers will end in display blanking, thereby making the UI looking unusable.
  • If utilizing Answer # 2, sending Netflix trailers of their Native body fee would imply that the related UI parts (motion of cursor, asset choice and so on) would even be displayed on the diminished body fee and this can end in a sluggish UI looking expertise. It’s because on HDMI output from the supply system, each graphics (Netflix software UI) and video parts will exit on the similar body fee (native content material body fee of the trailer) after being blended collectively on the supply system.

To deal with these points we observe an strategy as proven in Determine 6 under the place we allow the Native Body Fee playback expertise solely when the person selects a title and watches it in full display with minimal graphical UI parts.

Determine 6: Native Body Fee utilization inside Netflix software

This text introduced options that intention to enhance the content material playback expertise on HDMI supply gadgets. The breadth of obtainable technical options, person selectable preferences, system capabilities and the applying of every of those permutations within the context of assorted in-app member journeys characterize a typical engineering and product determination framework at Netflix. Right here at Netflix, our aim is to maximise immersion for our members via introduction of latest options that can enhance their viewing expertise and hold them totally engaged in our content material.

We wish to acknowledge the exhausting work of a variety of groups that got here collectively to ship the options being mentioned on this doc. These embody Core UI and JS Participant growth, Netflix Software Software program growth, AV Check and Tooling (earlier article from this staff), Companion Engineering and Product groups within the Consumer Engineering group and our information science buddies within the Data Science and Engineering group at Netflix. Diagrams on this article are courtesy of our Companion Enterprise Platform XD staff.