Allow to define LiveConfiguration values relative to the end of the playlist/manifest
@tonihei is already working on this.
Since Sep 15, 2023.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
I have been looking into an api or group of functions in exoplayer to set a min buffer duration in a live stream.
it seems in order to build a lets say 30 sec buffer on a live stream you need to also set an offset value.
essentially its a live stream with a sliding window manifest where segments are appended to the end and taken away from the beginning.
i have tried to set a setLiveTargetOffsetMs but it doesnt seem to do what i want.
it seems to include the offset from the wall clock time and the segment PDT times in the manifest and include that drift.
so for streams which have a long latency from wall clock to the last segement program date time - i can only seem to buffer 1 segement which causes buffer empty stalls/buffering.
id like to mimic the behavior of this HLS server tag - https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.5.2 of ext-x-start.
given an offset value of lets say 32 seconds and a sliding window manifest of 2 minutes and 4 seconds segments, id like playback to start and a buffer to build from the the 8th to last segment starting from the live edge in the manifest .
on an HLS stream or DASH stream ideally this can be done.
https://exoplayer.dev/live-streaming.html i have read this documentation.
i have looked at these as well:
https://github.com/androidx/media/blob/5328d6464acb077a7e8cba61b8cac1973c4943d7/libraries/common/src/main/java/androidx/media3/common/MediaItem.java#L1303
https://github.com/google/ExoPlayer/issues/8218
i think this comment captured what id like to do:
@marcbaechinger our use case is more to adapt to networks that cannot maintain adequate buffering with 3 segments back from live. The dynamic live edge support added to 2.13 should cover this use case.
i see the solution there with .setLiveTargetOffsetMs(10 * 60_000) example, but it seems to include the drift from wall clock to current segment time.
looking at the picture, is there a way to start playback with offset value from the end of the live window(the blue live window box), but does not include real time calculations of unix/realtime/wall clock time.
i know there is a seek to that seems doable mentioned in the documentation but it seems that will incur some performance/startup stream latency cost. is there a way without it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.