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

feat: add support for dash manifests describing sidx boxes #303

Closed
wants to merge 40 commits into from

Conversation

ldayananda
Copy link
Contributor

@ldayananda ldayananda commented Nov 30, 2018

Description

Attempt to fix #162.

Requires videojs/mpd-parser#41

Specific Changes proposed

Dash playlist loader requests the sidx after parsing the master manifest once for the sidx byte range information. Then, the master playlist is mutated.

Current Status

  • Need to investigate ended issue (known issue 1)

Sources:

{ 
  src: "https://dash.akamaized.net/dash264/TestCases/10a/1/iis_forest_short_poem_multi_lang_480p_single_adapt_aaclc_sidx.mpd",
  type: "application/dash+xml"
}

Known Issues

  1. there appears to be a bug where the ended event is not fired sometimes. This may be an existing issues with DASH.
    Repro by using https://dash.akamaized.net/dash264/TestCases/10a/1/iis_forest_short_poem_multi_lang_480p_single_adapt_aaclc_sidx.mpd, seeking to > 25s, changing audio selection, seeking near the end.
    The skipped playback test DASH sidx with alt audio should end should also reproduce the issue

  2. if sidx ranges change in between Periods in a live stream, we do not clean up sidxMapping.
    This will not be handled at this point as there is further multiperiod work that is required to be able to detect a period change. There is a TODO in the code for this, but no Github issues yet

Requirements Checklist

  • Feature implemented / Bug fixed
  • Unit Tests updated or fixed
  • Reviewed by Core Contributor(s)

@ldayananda ldayananda changed the title [WIP] fix: Request sidx [WIP] fix: dash manifests using SegmentBase would not request sidx Nov 30, 2018
@ldayananda ldayananda self-assigned this Nov 30, 2018
@omarroth omarroth mentioned this pull request Dec 3, 2018
6 tasks
@ldayananda
Copy link
Contributor Author

ldayananda commented Jan 3, 2019

Things to do still:

All representations(specifically audio) can also have a SegmentBase and also need their sidx to be requested via DashPlaylistLoader. The current idea is to modify this to include audio groups as well.

Currently, the video representation is being returned correctly and the resulting video playlist is being requested correctly.

@ldayananda
Copy link
Contributor Author

Appears to be working on at least one source. More testing next week.

src/dash-playlist-loader.js Outdated Show resolved Hide resolved
src/dash-playlist-loader.js Outdated Show resolved Hide resolved
@ldayananda
Copy link
Contributor Author

ldayananda commented Jan 11, 2019

One last bug to figure out: looks like both audio playlists are being requested and overwriting each other, potentially due to the state of the master playlist changing while sidx boxes for each playlist are being requested and parsed. Still debugging

@ldayananda
Copy link
Contributor Author

As an update: I discovered some issues with DashSegmentLoader that needs to be addressed before this PR can proceed.

@ldayananda
Copy link
Contributor Author

Now depends on #386 being merged first

@ldayananda
Copy link
Contributor Author

ldayananda commented Feb 22, 2019

Here are the things that are left to do:

  • unit tests for sidx cases, and probably a playback test with this source
  • handle cases where saved sidx doesn't match updatedMaster
  • handle period changes
    • this is deferred for now
  • Investigating a final bug, mentioned in known issues in the description

@ldayananda ldayananda force-pushed the request-sidx branch 2 times, most recently from 797006d to c622fd3 Compare February 27, 2019 17:33
ldayananda added 14 commits March 11, 2019 16:52
- start DashPlaylistLoader in HAVE_NOTHING state
- enter HAVE_METADATA in media() method
- set media automatically only for child playlist loader as masterPlaylistLoader is set from masterPlaylistController

update tests with desired behavior

ensure loadedmetadata is triggered after loadedplaylist

remove unnecessary media playlist selection for master loader
…urns and once when the initial media is selected
- delay triggering selectedinitialmedia event until the active audio playlist loader is finished setting media

- ensure that HLS playlists without alternate audio are not affected
- don't autoselect media for the masterPlaylistLoader as that is done by MasterPlaylistController
- ensure updateMaster returns null if there are no changes in the playlist
- trigger loadedmetadata as part of haveMetadata
- add some comments to explain why we trigger certain events and set media at points
- moving haveMetadata to a class-level method, more comments.

- remove setTimeouts as they were not performing a necessary function. XHR requests can return in any amount of time and HLS PlaylistLoader handles any requests within a callback, or returns if a request need not be made. DASH should do the same

- cleanup the minimumUpdatePeriod setup

- remove unnecessary clock.ticks from tests
- fix up a comment
- add idea for media groups refactor
@ldayananda ldayananda changed the title [WIP] fix: dash manifests using SegmentBase would not request sidx feat: add support for dash manifests describing sidx boxes Mar 11, 2019
@gkatsev
Copy link
Member

gkatsev commented Mar 22, 2019

Tests are failing because no mpd-parser update. We should review and test and get it in.

@gkatsev
Copy link
Member

gkatsev commented Apr 5, 2019

Replaced by #455

@gkatsev gkatsev closed this Apr 5, 2019
@ldayananda ldayananda deleted the request-sidx branch April 5, 2019 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request sidx defined segments from DASH SegmentBase streams
4 participants