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

Enforce specific live delay to non low latency stream? #3418

Closed
spoeschel opened this issue Sep 28, 2020 · 6 comments
Closed

Enforce specific live delay to non low latency stream? #3418

spoeschel opened this issue Sep 28, 2020 · 6 comments
Assignees
Milestone

Comments

@spoeschel
Copy link

We have the use case that someone watches a DASH stream and meanwhile generates subtitle content that shall be synchronised to the stream then. So this stream (e.g. this one, which is geoblocked to Germany) is required to be reproducibly played with a specific, fixed live delay, let's say with 500ms plus/minus of the desired delay at most.

Currently we work with a two step approach that plays the stream the first time and retrieves the current live latency. After a certain, calculated amount of time (considering the segment size and the fact that playback starts only on segment borders), the stream playback is started a second time, in order to achieve the desired live latency then. This roughly works as expected, but is rather a workaround than a suitable, precise solution.

Reading the documentation and playing around a bit with the configuration, it turned out that dash.js already has a catch-up mechanism (which requires low latency mode to be used) that is used to achieve a specified live delay. This seems to be a good solution (though getting dash.js to seek instead of changing the playback rate by using liveCatchUpMaxDrift didn't work here).

The stream mentioned above is not a low latency stream. Nevertheless the catch-up feature worked (e.g. using a live delay of 12 seconds). So there is the question, whether the mentioned workaround could be replaced by this feature.

Are there any plans to enable this catch-up mechanism also for non low latency mode? At the moment, the resulting live latency in such a case varies in a range as large as the segment size (therefore the workaround solution decribed above).

Are there any problems to expect, by using the low latency mode with a non low latency stream?

@wilaw
Copy link
Member

wilaw commented Sep 28, 2020

I was asking for this same feature with #3300 . It was declared as fixed as a result of #3316 .

I also need the player to implement its catch-up mechanism outside of the low-latency environment (i.e synchronize all live clients 60s behind live). Even with the changes in 3.1.3 this does not seem to be the case?

@spoeschel
Copy link
Author

I also need the player to implement its catch-up mechanism outside of the low-latency environment (i.e synchronize all live clients 60s behind live). Even with the changes in 3.1.3 this does not seem to be the case?

It seems that the catch-up mechanism basically works also with non low latency streams. However the initial delay is (in my case) a single-digit number; therefore the catch-up mechanism can take some time, depending on the configured target delay. For my use case, this is still OK (e.g. 20 seconds target delay), but for the 60 seconds target delay you mention, it takes several seconds until that delay is reached.

@dsilhavy
Copy link
Collaborator

dsilhavy commented Oct 5, 2020

#3316 Introduced a threshold for which the catchup mechanism applies.

I don't see a reason that speaks against using catchup for non low latency streams. We can add this in the next release. Also keep in mind that dash.js adjusts the target latency to match segment start times. I modified this behavior as part of #3413 which is still work in progress.

@dsilhavy dsilhavy added this to the 3.1.4 milestone Oct 5, 2020
@dsilhavy dsilhavy self-assigned this Oct 5, 2020
@spoeschel
Copy link
Author

#3316 Introduced a threshold for which the catchup mechanism applies.

I don't see a reason that speaks against using catchup for non low latency streams. We can add this in the next release.

That sounds great!

Also keep in mind that dash.js adjusts the target latency to match segment start times. I modified this behavior as part of #3413 which is still work in progress.

So this means, if a certain liveDelay is used, the player would no longer need to invoke the catch-up mechanism to achieve the desired live delay after some seconds, but would directly start playback with the specified delay....is this correct? This would be even greater...

@dsilhavy
Copy link
Collaborator

@spoeschel @wilaw
I added catchup for "normal" live streams as described here: #3468

You can try it out in the nightly build:

Please let me know if you encounter any issues

@dsilhavy
Copy link
Collaborator

dsilhavy commented Dec 3, 2020

I am closing this issue, please find information above. If you see any issues please reopen

@dsilhavy dsilhavy closed this as completed Dec 3, 2020
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

No branches or pull requests

3 participants