Implement seeking within HLS moving live window in ExoPlayer and its demo app
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.
-
Often CDNs will give you a short playlist with 3-10 chunks, for a playlist duration of 2-3 minutes or less. In this case seeking inside the playlist is not very useful. Instead you would make a request to the CDN for a new playlist at a different position, for example live head - 20 minutes. The NASA TV public live stream is an example of this approach, http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8
-
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).
:+1:
:+1:
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.
+1 for seeking in live HLS content
Another +1 for seeking in live HLS content
Yet another +1 for seeking in live HLS content
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?
+1 as well
+1 :)
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.
+1 for case (2)
+1
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
@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.
@Greg767 With a fully implemented HLS spec you should be able to have a 24 hour window, and seek within that window. Currently ExoPlayer does not support that feature.
However, the fork I linked does support seeking within the window (not sure if it'll work with 24 hour window, but I don't see why it wouldn't). Keep in mind I haven't tested with adaptive bitrates, so it may not be what you need.
@ojw28 hey, any update on this?
Hi! https://github.com/PiotrGryko/ExoPlayer/tree/master/library
I have forked exoplayer library and made required changes to having livestream seekingbar working.
- progressBar.secondProgress indicates current livestream position. We can seek back/seek forward in range of buffered stream
- playerInternal.getDuration() returns duration of current video from the beginning of the user stream
I have forked the last version of library. And used it along with ExoMediaPlayer
The solution was not to replace current HlsMediaPlaylist as it was done with livestream. Instead of it I append old list with new segments and made it behaves similar to isAlive=false
+1 for HLS live DVR
Thanks On 15 Mar 2016 00:40, "Artur Nalbandian" [email protected] wrote:
+1 for HLS live DVR
— You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/google/ExoPlayer/issues/87#issuecomment-196587019
https://github.com/google/ExoPlayer/pull/1394/commits/5cce28aacf3cc73c90830458d4a7e42bb6c2f452 patch has support for Seeking within Live DVR window. It handles adaptive bitrate switching as well as re-fetching live playlist to move the Live DVR window. I request people in this thread to try it out and let us know if there are any HLS live DVR content which has issues with this patch.