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

DASH Live OFFSET #1383

Open
luquilh opened this issue May 20, 2024 · 2 comments
Open

DASH Live OFFSET #1383

luquilh opened this issue May 20, 2024 · 2 comments
Assignees
Labels

Comments

@luquilh
Copy link

luquilh commented May 20, 2024

Hi,

I would like to know the behaviour of the TargetOffset set and Live Offset in Exo Player. I have some questions about it:

  1. I understand that LIVE OFFSET corresponds with the video delay from live.
    However, we found that LiveOffse in two different channels were 8650 ms and 29760 ms, but the video delay observed was almost the same. So, in these cases, it seems that the live offset is not actually indicating the video delay. Is this possible? What could be the reasson for this difference.

  2. How is the Live Offset calculated? Is it calculated in relation with de last segment published in the manifest? Or is it calculated in another way?

  3. I made a test with the following configuration:

OFFSET = 12 secs (target, min and max)
Buffer = 6 secs (min and max)

Based on this I would expect that when de buffer is alreday filled, the player should dowload always a segment near 6 seconds apart from the last segment published in the manifest.
However, we found that the segment downloaded by the player corresponds with the last segment published in the manifest and not 6 seconds before like I would expect.
Is this behaviour correct?
What is the reasson for this?

Thanks in advanced!

Lucas Levi

@marcbaechinger
Copy link
Contributor

There is a documentation page about live streaming with a diagram that explains what methods are available and how these are calculated.

I understand that LIVE OFFSET corresponds with the video delay from live.
How is the Live Offset calculated?

According to the documentation above, the value returned by Player.getLiveOffset() is the difference between now and the current position of the player.

I made a test with the following configuration

I don't think a specific configuration of the buffer is required and useful when configuring the target live offset.

Whether the player is able to fullfill what your configuration wants depends on the actual stream, specifically at playback start. When starting playback the player tries to go as close to the target offset as possible, but it always starts at the start of a segment. If bandwidth is sufficient and the configuration allows the variation of the playback speed, it them tries to catch up to get to the given target offset by increasing playback speed slightly if possible. As mentioned, whether this is possible or not depends on the stream and the configuration.

we found that LiveOffse in two different channels were 8650 ms and 29760 ms

If channels are two different live stream then this may be caused by different durations of the segments or it can be arbitrarily different because the moment the stream is started is by accident close or far away from a segment start.

If the information on the documentation page isn't sufficient and you want to have more precise information, then you need to send us your example streams to figure out the media structure it delivers. I think that for a latency of 6 seconds that you expect, a low latency stream and a server infrastructure for low-latency would be beneficial in case your stream is a traditional DASH live stream.

@luquilh
Copy link
Author

luquilh commented May 28, 2024

Hi,
In relation to your answer

According to the documentation above, the value returned by Player.getLiveOffset() is the difference between now and the current position of the player.

Yes, but I would like to understand how this is calculated. How does the player know de "now" time? Is the time mark of the last segment published in the manifest? The "now" time is informed via some NTP or another external reference?

we found that LiveOffse in two different channels were 8650 ms and 29760 ms

If channels are two different live stream then this may be caused by different durations of the segments or it can be arbitrarily different because the moment the stream is started is by accident close or far away from a segment start.

In both cases, the segment durations were 2 seconds with DASH protocol. There was no difference between the stream configuration. Regarding your comment abour the moment de playback starts, it should be in the worst case a 2 seconds difference between de playback of the the two streams. We found that de video delay perceived between streams was almost the same, but the LiveOffset shown were 8650 ms and 29760 ms. There was a 21110 ms difference between the two stream LiveOffsets, That is 21 seconds. Why is that? The video delay were almost the same but this was not reflected in LiveOffset shown.

Thank you!

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

2 participants