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

Problem with adaptation sets that contain representations with different codecs #391

Closed
barbibulle opened this issue May 23, 2016 · 6 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@barbibulle
Copy link

With an MPD that contains an audio adaptation set where there are two representations, each with a different codec, the player can play each of the representations by itself, but cannot switch from one to the other. I suspect that it doesn't reset the audio decoder, so feeding one elementary stream into a session setup with a different codec is likely to cause trouble.
The DASH spec doesn't prohibit mixing codecs in the same adaptation set, and it would seem like the right thing to do if you want to offer a stream with a choice of AAC or EAC-3 (better than having two adaptation sets, one for each codec).

Here's an example:
http://www.bok.net/tmp/dash/dual_codec/stream_aac.mpd

the same data with just the AAC codec:
http://www.bok.net/tmp/dash/dual_codec/stream.mpd

and with just the EAC-3 codec (plays fine on Safari on El Capitan)
http://www.bok.net/tmp/dash/dual_codec/stream_ec3.mpd

@joeyparrish joeyparrish added the status: will not implement The team chooses not to implement this enhancement label May 24, 2016
@joeyparrish
Copy link
Member

The DASH spec allows for many things that are not a good fit for MSE. MSE does not allow changing codecs like this, so we do not support changing codecs across Representations. There is an expectation in Shaka that Representations in an AdaptationSet have the same (or decoder-compatible) codec.

@barbibulle
Copy link
Author

Ok, that makes sense.
But we get the same error when signaling the two codec representations in different adaptation sets:
The player throws a Shaka Error MEDIA.VIDEO_ERROR when selecting the second adaptation set from the drop-down menu in the sample player UI.

Here's an example:
http://www.bok.net/tmp/dash/dual_codec_2/stream.mpd

or with just the AAC adaptation set (works by itself)
http://www.bok.net/tmp/dash/dual_codec_2/stream_aac.mpd

or with just the E-AC3 adaptation set (works by itself)
http://www.bok.net/tmp/dash/dual_codec_2/stream_ec3.mpd

@joeyparrish
Copy link
Member

In what browser do you see more than one audio track for the dual-codec MPD? My Chromebook only shows one (AAC), since EAC-3 is not supported by the browser. If I query MSE in the JS console:

MediaSource.isTypeSupported('audio/mp4; codecs="mp4a.40.2"')
true
MediaSource.isTypeSupported('audio/mp4; codecs="ec-3"')
false

@joeyparrish joeyparrish reopened this May 24, 2016
@joeyparrish joeyparrish self-assigned this May 24, 2016
@barbibulle
Copy link
Author

Safari on OSX El Capitan supports ec-3

@joeyparrish
Copy link
Member

If the two AdaptationSets are both playable, but incompatible with one another at a codec level, Shaka should filter out one once the other has been selected. I'll look into it.

@joeyparrish joeyparrish added type: bug Something isn't working correctly and removed status: will not implement The team chooses not to implement this enhancement labels Jun 1, 2016
@joeyparrish joeyparrish added this to the v2.0.0 milestone Jun 1, 2016
@joeyparrish
Copy link
Member

@barbibulle This should be fixed now. We will not permit switching between incompatible codecs once one has been chosen, so you should only see one audio track now.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants