You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement seeking within HLS moving live window in ExoPlayer and its demo app #87
The server may keep old chunks available to the streaming clients so that they can rewind the video, for example, to 10 minutes before the live position. Imagine you missed the start of a live tv-show or you were interrupted and missed a part, so you want to rewind it. There are two main, common cases here, the live playlist received by the clients can be of a short or a long duration.
The second case, that this issue covers, is where you get a long playlist, for example 120 chunks, or 1 hour, from the server. In this case seeking within the playlist is desirable. Because the server is continuously deleting old chunks (and writing new ones), you have a moving live window of a certain fixed size in seconds.
The player/library must not request chunks outside of the window, as that will give an HTTP error (404). The seekbar must take the moving live window into consideration. While watching the stream, the seekbar should be in the same position, e.g. 10 minutes before live head. The playlist must be refetched when reaching the end of the playlist, or when the user seeks to the end of the playlist. The player UI could for example display "live" as the duration and "-10:00" for the current position when the user has rewinded the live video 10 minutes.
Please let me know if you would like a public sample stream for case (2).
Reacted by JonWatson, Hadrien Bècle, Joel Glanfield, Denis, Andrea Cresta and Knut Valen
Just as a heads up, we're likely to implement this for both DASH and SmoothStreaming before we do so for HLS, simply because DASH and SmoothStreaming are much better standards, and are more forward looking. I continue to advise looking at DASH, where a choice is possible.
No promises, but we're aiming to add DVR window support for DASH by the end of this month. As we do that, we'll be looking at how the same approach can be used for HLS too, specifically for case (2) in the original post. Hopefully this wont be too hard, since they're roughly analogous to one another. I don't think we have near-term plans to support case (1) in the original post.
For anyone still waiting on this: I've implemented case 2 in a fork, and it's been working for my case.
Disclaimer: I have not tested adaptive bitrate streams. My streams do not use adaptive bitrates (variant switching). As a result, it may not work for many of you -- please use with caution. Hopefully the exoplayer devs will have an official implementation sometime soon.
@fougere-mike Hi, I am new to this HLS field and I have a question. Would it be possible to have like a 24 hours window? Also if I understand right, there is no DVR functionnality yet in ExoPlayer, so if I have a m3u8 playlist I won't be able to play it or seek in it.
"No, this issue only tracks live seeking, which is available. #2643 tracks offline support."
I just need DVR function on HLS, not offline download. Do you know about DVR function on HLS?
If it is an event-like stream, where segments are only appended (and not removed), then we support seeking, pausing, etc. If segments are also eventually removed, then we only support seeking to these segments for as long as they are available in the playlist. I do not see other alternative to downloading the segments if this is the case.
No. But you can easily script your own using a VOD HLS stream, like Apple's sample stream. If you need guidance for this, I'd suggest trying stack overflow.
It's very unclear what feature you're actually asking about. I suspect the answer is that yes, what you want is just supported already and you can seek around in the available media. If you want to see how well ExoPlayer supports your HLS DVR streams, why don't you just add one to the demo app and give it a try?
I have tested the exo player with dvr, for my live timeshift streams 3 months back from self, and I have intergrated successfully 3 months back, it works fine with out problems, only issue is it uses more memory compare to native media or player
Activity
crossle commentedon Oct 23, 2014
👍
miyaji27 commentedon Dec 9, 2014
👍
ojw28 commentedon Dec 9, 2014
Just as a heads up, we're likely to implement this for both DASH and SmoothStreaming before we do so for HLS, simply because DASH and SmoothStreaming are much better standards, and are more forward looking. I continue to advise looking at DASH, where a choice is possible.
martinbonnin commentedon Dec 22, 2014
+1 for seeking in live HLS content
fougere-mike commentedon Mar 31, 2015
Another +1 for seeking in live HLS content
zikavele commentedon Apr 21, 2015
Yet another +1 for seeking in live HLS content
ldimitroff commentedon May 13, 2015
Is there an ETA on when is this going to be tackled down? Is there anybody working on it now or has an ExoPlayer workaround to support DVR?
andreimarinescu commentedon May 13, 2015
+1 as well
zsmatyas commentedon May 13, 2015
+1 :)
ojw28 commentedon May 13, 2015
No promises, but we're aiming to add DVR window support for DASH by the end of this month. As we do that, we'll be looking at how the same approach can be used for HLS too, specifically for case (2) in the original post. Hopefully this wont be too hard, since they're roughly analogous to one another. I don't think we have near-term plans to support case (1) in the original post.
Arqu commentedon Jun 2, 2015
+1 for case (2)
Guro commentedon Jun 5, 2015
+1
fougere-mike commentedon Jul 21, 2015
For anyone still waiting on this: I've implemented case 2 in a fork, and it's been working for my case.
Disclaimer: I have not tested adaptive bitrate streams. My streams do not use adaptive bitrates (variant switching). As a result, it may not work for many of you -- please use with caution. Hopefully the exoplayer devs will have an official implementation sometime soon.
https://github.com/fougere-mike/ExoPlayer/commits/mikef/hlsLiveSeeking
Greg767 commentedon Jul 27, 2015
@fougere-mike Hi, I am new to this HLS field and I have a question. Would it be possible to have like a 24 hours window? Also if I understand right, there is no DVR functionnality yet in ExoPlayer, so if I have a m3u8 playlist I won't be able to play it or seek in it.
36 remaining items
xbezdeka commentedon Dec 12, 2016
Any estimate when this will hit the release version?
Allow HlsPlaylistTracker to change the primaryHlsUrl
niket87 commentedon Dec 12, 2016
ojw28 commentedon Dec 14, 2016
We're aiming to do a release this week. Thanks.
quanghuy1288 commentedon May 8, 2017
"We're aiming to do a release this week. Thanks."
Is HLS DVR available now?
AquilesCanta commentedon May 8, 2017
No, this issue only tracks live seeking, which is available. #2643 tracks offline support.
quanghuy1288 commentedon May 8, 2017
"No, this issue only tracks live seeking, which is available. #2643 tracks offline support."
I just need DVR function on HLS, not offline download. Do you know about DVR function on HLS?
AquilesCanta commentedon May 8, 2017
If it is an event-like stream, where segments are only appended (and not removed), then we support seeking, pausing, etc. If segments are also eventually removed, then we only support seeking to these segments for as long as they are available in the playlist. I do not see other alternative to downloading the segments if this is the case.
quanghuy1288 commentedon May 8, 2017
Do you have any demo for DVR on HLS?
AquilesCanta commentedon May 8, 2017
No. But you can easily script your own using a VOD HLS stream, like Apple's sample stream. If you need guidance for this, I'd suggest trying stack overflow.
ojw28 commentedon May 8, 2017
It's very unclear what feature you're actually asking about. I suspect the answer is that yes, what you want is just supported already and you can seek around in the available media. If you want to see how well ExoPlayer supports your HLS DVR streams, why don't you just add one to the demo app and give it a try?
quanghuy1288 commentedon May 9, 2017
Hi, i have tested release-v2 worked with DVR HLS :)
hemanthdn commentedon May 9, 2017