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

Question: where does ExoPlayer account for sequence number variance in HLS streams? #2037

Closed
jglanfield opened this issue Nov 4, 2016 · 2 comments
Labels

Comments

@jglanfield
Copy link

jglanfield commented Nov 4, 2016

This is just a question, not a bug report. Hope that's OK.

Whenever a new playlist is loaded (for a live HLS stream), the first segment is always given time 0 and the last segment is given the correct time for that window. But the next time a playlist is loaded, it would be nice if the first segment in the new window took the sequence into account such that its start time is not zero.

By "sequence," I meant the value at EXT-X-MEDIA-SEQUENCE in the playlist.

As an example:

  1. Load m3u8 at time t.

#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE: 1000
segment[0] has start time of 0

  1. Load m3u8 at time t+delta.

#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE: 1001
segment[0] has start time of 10

@AquilesCanta
Copy link
Contributor

Track #87. Something similar is done in that line of work.

As a note, what you suggest is not that easy. That I know of, there is no restriction over the duration of the chunks except that they are shorter than the target duration of the media playlist. So, multiplying is not an option. Not generally, at least. And this is assuming you load every playlist at the start of playback. Ideally, you wouldn't load a playlist until you need it, but even if not, you might be loading a playlist that has drifted from the other one. Note also that sequence numbers need not be aligned.

To sum up, wait for live window seeking support. We do something relatively similar to what you ask. Thanks for the suggestion!

@jglanfield
Copy link
Author

Yeah, the reason I asked is because I hacked together a quasi-solution for seeking live events, but I haven't been able to account for the sequence variance yet. My use-case is quite simple, so I'll probably just store the previous sequence somewhere and ensure that and future segments take that into account when computing their start time.

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants