Ticket #1632 (closed enhancement: fixed)

Opened 13 months ago

Last modified 9 months ago

HLS: improve heuristics to start with high quality

Reported by: jeroen Owned by: courtenay
Priority: Normal Milestone: Plugins
Component: flash Keywords:
Cc: pablo Forum thread:

Description (last modified by jeroen) (diff)

The current HLS provider implements its heuristics like Smooth Streaming: it starts low and then bumps up the speed one segment at a time. It would be better to actually start at the right quality instantly (like we do for RTMP). We agreed to do it in this way:

  1. Start off with the segment that best fits the screen width
    1. Defined as the stream for which Math.abs(player.width - source.width) is smallest.
    2. If the manifest does not contain any stream RESOLUTION, start with the highest quality instead.
  2. Set a timer to 3 seconds. If the first fragment still isn't loaded after 3 seconds, discard it and restart with the lowest quality fragment.
  3. After the first fragment is fully loaded, we have a bandwidth estimation. Use that to load subsequent fragments.
    1. Defined as the highest quality stream for which player.bandwidth /source.bitrate > 1.5.
    2. Note the screen width heuristic still applies as well, in addition to the bandwidth heuristic.

As a last note, we are not taking framedrops into account. If there's still code in the HLS provider that monitors / responds to framedrops, you can take that out. I don't there is anymore at this point...

Change History

comment:1 Changed 9 months ago by jeroen

  • Owner changed from jeroen to courtenay
  • Component changed from embedder to flash
  • Description modified (diff)

comment:2 Changed 9 months ago by courtenay

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [2369] / [2373]. Play starts with the quality that has the closest width <= the screen size. If this does not load and start within 3 seconds, quality drops back to the lowest level, and increases from there during the course of playback.

Note: See TracTickets for help on using tickets.