hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

VIDEO-RANGE and HDCP-LEVEL attribute support

Open robwalch opened this issue 5 years ago • 3 comments

Add support for HDR and HDCP STREAM-INF attributes VIDEO-RANGE and HDCP-LEVEL.

These attributes describe display requirements that the player should check for before enabling and/or choosing a level.

If ignored, the codecs attributes may be enough to avoid selection of a level on some playback devices, but the display capabilities will be ignored.

Additional context For a brief overview see:

  • HDCP requirements for level switching... TBD
  • HDR requirements for level switching... TBD
  • Sample streams
    • HEVC - TBD (Apple's Advanced HEVC example does not contain these tags https://developer.apple.com/streaming/examples/advanced-stream-hevc.html)
    • Dolby Vision - TBD
  • https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices
  • https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-05

robwalch avatar Dec 30 '19 20:12 robwalch

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 28 '20 21:02 stale[bot]

This is related to #2527 and in general should be handled in a generic way or as a plugin system that allows parsing arbitrary data from any tag

OrenMe avatar Feb 29 '20 08:02 OrenMe

@OrenMe

should be handled in a generic way

They are as far as parsing goes. At least in v1, level and track object attr should include these properties.

VIDEO-RANGE is more related to #2451 and adding support for or filtering of HDR renditions. Level selection should consider this attribute if present, and take advantage of MediaCapabilities (maps to TransferFunction) before selecting a 4k or HDR stream, or completing the filtering of renditions (levels and audio tracks) on MANIFEST_PARSED.

As far as HDCP-LEVEL goes ~I haven't seen any asks that would require us to use it internally. We just need to verify that it's available in level.attr~ that was covered in #5150.

robwalch avatar Mar 03 '20 16:03 robwalch

Moved HDCP from this issue to these under the https://github.com/video-dev/hls.js/labels/DRM label:

  • #4923
  • #5149

robwalch avatar Sep 23 '22 22:09 robwalch

MediaCapability checks for HDR VIDEO-RANGE/transferFunction support were added with #5704. Level.videoRange is also used in level sorting and selection, to maintain consistent playback stability and color quality.

What remains is whether HLS.js should add and use (as m)any of the following to infer a preference/support for initial selection of HDR variants:

  • Test for HDR display support: matchMedia('(dynamic-range: high)') or matchMedia('(color-gamut: p3)')
    • Result can change depending on the display the browser window occupies.
    • The MediaQueryList by matchMedia should dispatch "change" events when capabilities change
  • Config option: preferHDR boolean could be used to override query results

robwalch avatar Aug 28 '23 22:08 robwalch