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

multiple stream decoding #113

Open
jpiesing opened this issue May 2, 2019 · 4 comments
Open

multiple stream decoding #113

jpiesing opened this issue May 2, 2019 · 4 comments
Milestone

Comments

@jpiesing
Copy link

jpiesing commented May 2, 2019

I'm sure I've seen this mentioned somewhere but couldn't find it & would prefer it didn't get lost.

A number of media devices support decoding more than one stream at one time.
Unfortunately in some (many?) cases it's not as simple as it appears.

  1. Some devices may have multiple decoders whose capabilities are identical
  2. Some devices may be able to decode one UHD stream and one HD stream at any time - i.e. the second decoder simply doesn't support UHD ever but can be used at any time regardless of what the first decoder is doing. This may be due to the interface to the second decoder.
  3. Some devices may have dynamic capabilities. e.g. they can decode one UHD or two HDs at the same time but not two UHDs. This may be due to the amount of RAM available or the bandwidth into the RAM.

Unfortunately in the real world, I get the impression that the non-identical capabilities are more common - at least in devices that support UHD. The cost of dual UHD decoding (RAM size, bandwidth) does not seem to be justified by the (limited) benefits so device makers don't include it.

Using multiple media decoders can improve client-side advertising use-cases and it would be good if this could be included in the media capabilities.

The codec switching API doesn't really help if it would take a device between 0.5s and 1s to switch codec. A good user experience really needs either 1) a second media decoder all prepared and ready to go at the right moment or 2) chip providers to extensively re-write their device drivers - and their customers to do a lot of testing to find the regressions this introduces.

@mounirlamouri
Copy link
Member

CC @jernoble @jyavenard @chcunningham

I believe this question was raised in the past and at least as far as I know, the answer hasn't changed: handling multiple stream is out of scope because it would be really hard to give reliable answer for N streams and it's a fairly small use cases. Maybe the folks in CC have a different opinion now that they have also implemented the API.

@jpiesing
Copy link
Author

jpiesing commented May 8, 2019

handling multiple stream is out of scope because it would be really hard to give reliable answer for N streams and it's a fairly small use cases

I agree it's hard but not that "it's a fairly small use cases". Multi-stream decoding really helps with client-side ad insertion when codec switching of a single decoder may take between 0.5s and (in extreme cases) 2s.

@chcunningham
Copy link
Contributor

Re: codec switching, the fancy new approach is to call sourceBuffer.changeType(), re-using the existing MSE and media element. Documenting where these switches is supported falls to the transition() API (not spec'ed, name may change, active discussion in #102). Its my intention to specify that "supported" codec transitions must be seamless (imperceptible to the user). If it takes .5s, thats way too long and would be considered unsupported.

@thinkski
Copy link

thinkski commented Nov 8, 2023

Now that Chrome supports HEVC decoding, but only when there is hardware support for it, I think this will be a more pressing problem and should be reconsidered. I imagine HEVC hardware decoding limitations are more deterministic (and lower) than AVC decoding limitations and should be easier to describe. For instance, the configuration to be evaluated could be an array of (width, height, framerate, codec) tuples and should return a boolean on whether supported or not.

@chrisn chrisn added this to the V2 milestone Dec 13, 2023
@chrisn chrisn added the agenda Topic should be discussed in a group call label Dec 15, 2023
@chrisn chrisn removed the agenda Topic should be discussed in a group call label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants