Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HDR information (transferFunction) when getting decoding info from Media Capabilities API #3729

Closed
theRealRobG opened this issue Oct 31, 2021 · 2 comments · Fixed by #3730
Assignees
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@theRealRobG
Copy link
Contributor

Have you read the FAQ and checked for duplicate open issues?
Yes.

Is your feature request related to a problem? Please describe.
When we query decodingInfo via the mediaCapabilities we send the minimal VideoConfiguration possible:
https://github.com/google/shaka-player/blob/v3.2.1/lib/util/stream_utils.js#L542-L549

To receive better information about media capabilities with respect to HDR content we should also pass information on the transferFunction.

Describe the solution you'd like
We carry the hdr information in the shaka.extern.Stream available on shaka.extern.Variant. The hdr property for HLS is derived from the VIDEO-RANGE attribute available on the EXT-X-STREAM-INF, and the VIDEO-RANGE attribute indicates the reference opto-electronic transfer characteristic function specified by the TransferCharacteristics code point [ISO/IEC 23001-8]. Similarly in DASH we currently define hdr when we can determine that the variant is compliant with 10.3. DASH-IF IOP HEVC HDR PQ10 (indicating PQ value). Going forward we may also support identification of other transfer characteristics on the variant via information carried in essential / supplemental properties, as described in #3726.

Given this, the information for the transferFunction value to be sent in the VideoConfiguration passed to mediaCapabilities.decodingInfo is readily available to us when constructing the object and so we should make use of the property when defined.

Describe alternatives you've considered

Additional context

@theRealRobG theRealRobG added the type: enhancement New feature or request label Oct 31, 2021
@theRealRobG
Copy link
Contributor Author

I'm working on a solution 👍

@joeyparrish
Copy link
Member

Thank you!

@joeyparrish joeyparrish added the priority: P1 Big impact or workaround impractical; resolve before feature release label Nov 2, 2021
joeyparrish pushed a commit that referenced this issue Nov 3, 2021
…es (#3730)

Fixes #3729

If the video variant stream contains information about `hdr`, then we now use that to provide a value for `transferFunction`, when constructing the [`VideoConfiguration`](https://w3c.github.io/media-capabilities/#videoconfiguration) object used to get decoding info from media capabilities API.

The following applies:
```js
switch (video.hdr) {
  case 'SDR':
    mediaDecodingConfig.video.transferFunction = 'srgb';
    break;
  case 'PQ':
    mediaDecodingConfig.video.transferFunction = 'pq';
    break;
  case 'HLG':
    mediaDecodingConfig.video.transferFunction = 'hlg';
    break;
}
```
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jan 2, 2022
@shaka-project shaka-project locked and limited conversation to collaborators Jan 2, 2022
@joeyparrish joeyparrish added type: bug Something isn't working correctly and removed type: enhancement New feature or request labels Jan 5, 2022
joeyparrish pushed a commit that referenced this issue Jan 5, 2022
Fixes #3729

If the video variant stream contains information about `hdr`, then we now use that to provide a value for `transferFunction`, when constructing the [`VideoConfiguration`](https://w3c.github.io/media-capabilities/#videoconfiguration) object used to get decoding info from media capabilities API.

The following applies:
```js
switch (video.hdr) {
  case 'SDR':
    mediaDecodingConfig.video.transferFunction = 'srgb';
    break;
  case 'PQ':
    mediaDecodingConfig.video.transferFunction = 'pq';
    break;
  case 'HLG':
    mediaDecodingConfig.video.transferFunction = 'hlg';
    break;
}
```

Change-Id: I105d789f47b6ff143b3867516481c41224fa8483
joeyparrish pushed a commit that referenced this issue Jan 5, 2022
Fixes #3729

If the video variant stream contains information about `hdr`, then we now use that to provide a value for `transferFunction`, when constructing the [`VideoConfiguration`](https://w3c.github.io/media-capabilities/#videoconfiguration) object used to get decoding info from media capabilities API.

The following applies:
```js
switch (video.hdr) {
  case 'SDR':
    mediaDecodingConfig.video.transferFunction = 'srgb';
    break;
  case 'PQ':
    mediaDecodingConfig.video.transferFunction = 'pq';
    break;
  case 'HLG':
    mediaDecodingConfig.video.transferFunction = 'hlg';
    break;
}
```

Change-Id: I3c6ead081203e2c564e15823629cefc8fd61dd60
@avelad avelad modified the milestones: Backlog, v4.0 May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants