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

v4: dynamic to static broken #3629

Closed
5 tasks done
bbert opened this issue May 4, 2021 · 5 comments
Closed
5 tasks done

v4: dynamic to static broken #3629

bbert opened this issue May 4, 2021 · 5 comments
Assignees
Labels
Milestone

Comments

@bbert
Copy link
Contributor

bbert commented May 4, 2021

Environment
  • Link to playable MPD file:
  • Dash.js version: 4.0.0
  • Browser name/version:
  • OS name/version:
Steps to reproduce
  1. Please provide clear steps to reproduce your problem

See issue #3263 to get how to play catch-up/start-over streams

  1. If the bug is intermittent, give a rough frequency if possible
Observed behavior

catch-up/start-over streams do not start anymore. Support for such streams has been introduced in PR #3280
If setting start time (anchor time) to 0, then stream may start, but dynamic to static transition is broken: playback is stopped once we reach end of stream (dynamic to static transition) even if we are not playing at end of stream.

Console output

Expected behavior

When starting catch-up/start-over streams, playback should by default start a live edge.
At dynamic to static transition, playback should continue until reaching end of stream.

@bbert bbert added the Bug label May 4, 2021
@dsilhavy
Copy link
Collaborator

dsilhavy commented May 4, 2021

@bbert Thanks for reporting, there was a bug in the calculation of the segment availability end time for streams with end time set to "Infinite".

Can you confirm that this 49e4f5c fixes the issue.

@dsilhavy dsilhavy added this to the 4.0.0 milestone May 4, 2021
@dsilhavy dsilhavy self-assigned this May 4, 2021
@bbert
Copy link
Contributor Author

bbert commented May 5, 2021

The commit fixes the issue for starting playback.
However, at dynamic to static transition, there is a regression since buffering is signaled to be completed, and if we seek back before reaching end of stream, then no more new segments are requested.
In previous version we were checking if there was no more segment in list before triggering buffering to be completed.

@dsilhavy
Copy link
Collaborator

dsilhavy commented Jun 1, 2021

@bbert I tried to reproduce this but it worked for me so far with:

Note that with the current nightly version we have a problem with the Unified teststream. dash.js uses the settings defined in the ServiceDescription element. However, there are no segments defined in the MPD that fulfill the max latency target. Consequently, dash.js keeps seeking to the live edge and stalls.

@dsilhavy dsilhavy modified the milestones: 4.0.0, 4.0.1 Jun 14, 2021
@dsilhavy dsilhavy modified the milestones: 4.0.1, 4.1.0 Jun 27, 2021
@lkinasiewicz
Copy link
Contributor

I think that the problem may be here:

if (isDynamicManifest && dynamicStreamCompleted) {
isFinished = true;

Just like @bbert mentioned - when the manifest changes from dynamic to static, dynamicStreamCompleted is set to true, dashHandler.isMediaFinished returns true and StreamProcessor stops buffering:
if (isMediaFinished) {
const segmentIndex = dashHandler.getCurrentIndex();
logger.debug(`Segment requesting for stream ${streamInfo.id} has finished`);
eventBus.trigger(Events.STREAM_REQUESTING_COMPLETED, { segmentIndex }, {
streamId: streamInfo.id,
mediaType: type
});
scheduleController.clearScheduleTimer();
return;
}

In 3.2.2 there was a flag in DashHandler indicating whether isMediaFinished can be ignored when generating new requests:

const finished = !ignoreIsFinished ? isMediaFinished(representation) : false;

This was removed in 4.0.0, so maybe this caused the regression? Maybe we can just remove the conditional mentioned above:

if (isDynamicManifest && dynamicStreamCompleted) {
isFinished = true;

and let the logic that follows, handle static manifest?

@dsilhavy
Copy link
Collaborator

dsilhavy commented Sep 2, 2021

Thanks for your analysis and suggestion @lkinasiewicz . Together with @bbert we solved this a little differently in #3748 , moving the check of the DashHandler after trying to generate a request.

@dsilhavy dsilhavy closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants