Skip to content

Instantly share code, notes, and snippets.

@ox
Last active September 1, 2017 20:27
Show Gist options
  • Save ox/e8a2999b335f74c65142e653a40b4ce4 to your computer and use it in GitHub Desktop.
Save ox/e8a2999b335f74c65142e653a40b4ce4 to your computer and use it in GitHub Desktop.
Speeding up Video Playing with HLS

goals:

  • speed up time to first byte

Side goals:

  • improve viewing experience for a variety of devices and networks
    • HLS automatically switches bitrates/resolutions based on bandwidth
  • allow all kinds of clients to play the video reliably

additional requirements:

  • HLS requires an HLS-player, which Axis would need
    • or switch players to clappr

Proposed Changes:

  • set up metrics for time to first byte
  • get resolution making back up at the following settings:
    • 2160x1080@7000k, 1440x720@3700k, 848x424@1000k
    • try not to "upscale" videos (if a video is < 2160px wide, don't make a 'high' res format for it)
  • set up nginx-vod-module to make HLS streams on the fly, tune cache sizes
  • profile before/after effects

notes:

NYTimes encoding must be wrong, as their encoding params are not to spec. High profile level 5.0 will be the bare minimum for videos at the 2K range (of which there are plenty).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment