Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

html5 video - Can seek range in Shaka be increased manipulating bufferBehind?

I am trying to increase the seek back time of a live DASH stream to 15 mins using Shaka. The stream by default can be rewinded to 5 minutes from current time. Can this be achieved by instructing the player to store buffer for the past 15 mins? I have tried using bufferBehind and setting it to 900 (15 minutes). This does not seem to work and rewind does not go beyond seek range.

This is the DASH Live URL I am using: https://livesim.dashif.org/livesim/testpic_2s/Manifest.mpd


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Had asked this on github and got this response which helped

The short answer is yes, you can do this, with some important caveats.

bufferBehind is for how we manage what's in kept in buffer once the playhead moves past. But this is different from what you want. You really want to override the DASH attribute called timeShiftBufferDepth, which defines how wide the availability window is.

The availability window says effectively "this is how much content is on the server that you can request at any time." You can override this with manifest.availabilityWindowOverride:

player.configure('manifest.availabilityWindowOverride', 900); This will ignore the timeShiftBufferDepth of the manifest and use a value of 900 seconds (15 minutes) instead. The seek range in the player will become 900 seconds.

However, if the server does not actually keep that much content around, requests for content from 900 seconds ago will result in an HTTP 404 error, and playback will stall at that position. So you can't use this to control the server's behavior in any way, or to make content available that isn't.

When we run live streams (using Shaka Streamer), only a couple of segments are kept outside the availability window. As we upload new segments to cloud storage, we also delete older ones.

So increasing the size of the availability window in the player would not work in the case of our content. Depending on the encoder/packager you're using, you may be able to increase the window size and get away with it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...