shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.14k stars 1.34k forks source link

Playback stops after changing the playing position (video.currentTime) more than 1 hour ago when playing a live stream with a large seek window #4077

Closed Pereverzev-Alexander closed 1 year ago

Pereverzev-Alexander commented 2 years ago

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? 3.3.2.compiled, to get logs 3.3.2.compiled.debug

Can you reproduce the issue with our latest release version? Yes

Can you reproduce the issue with the latest code from main? Not checked

Are you using the demo app or your own custom app? Own custom app

If custom app, can you reproduce the issue using our demo app? No, because we have some restrictions

What browser and OS are you using? Ubuntu 21.04, Firefox 93.0, Chrome 90.0.4430.72, WebOS 6.2 Chromium 79 WebOS 3.4 Chrome 38

There is a bug on all platforms

What are the manifest and license server URIs?

Private manifest: `

`

What configuration are you using? What is the output of player.getConfiguration()?

zodiac.shaka.getConfiguration().abr advanced: Object fastHalfLife: 2 minBytes: 16000 minTotalBytes: 128000 slowHalfLife: 5 proto: bandwidthDowngradeTarget: 0.95 bandwidthUpgradeTarget: 0.85 defaultBandwidthEstimate: 1000000 enabled: true maxBandwidth: Infinity maxFrameRate: Infinity maxHeight: Infinity maxPixels: Infinity maxWidth: Infinity minBandwidth: 0 minFrameRate: 0 minHeight: 0 minPixels: 0 minWidth: 0

zodiac.shaka.getConfiguration().streaming alwaysStreamText: false autoLowLatencyMode: false bufferBehind: 30 bufferingGoal: 10 dispatchAllEmsgBoxes: false durationBackoff: 1 failureCallback: function (c){a.defaultStreamingFailureCallback_(c)} forceHTTPS: false forceTransmuxTS: false gapDetectionThreshold: 0.1 ignoreTextStreamFailures: false inaccurateManifestTolerance: 2 jumpLargeGaps: false lowLatencyMode: false observeQualityChanges: false preferNativeHls: false rebufferingGoal: 2 retryParameters: Object safeSeekOffset: 5 smallGapLimit: 0.5 stallEnabled: true stallSkip: 0 stallThreshold: 1 startAtSegmentBoundary: false updateIntervalSeconds: 1 useNativeHlsOnSafari: true

What did you do?

  1. Started playing private live stream without DRM protection . The live stream has a 2 hour window to seek back. Log: "Shaka player seekRange(): Object {start: 8958240.991000175, end: 8965434.991000175} Video.currentTime: 8965434.936 Shaka player getBufferedInfo(): total: Array[1]0: Object{end: 8965436 start: 8965428.014667}"

    1. Changed the current playback position of the video element to 1 hour 23 minutes 10 sec 466 ms ago (video.currentTime - 4990466).
  2. The player does not start playback and freezes without error messages. It also stops loading new segments. Sometimes unpaired video and audio segments are loaded into the buffer, for which getBufferedInfo().total.length is 0. Log: "Shaka player seekRange(): Object {start: 8958288.501000166, end: 8965482.501000166} Video.currentTime: 8960444 Shaka player getBufferedInfo(): Object { audio: Array[1]: 0: Object { end: 8961452.014604 start: 8961440.004} total: Array[2]: 0: Object { end: 8961444 start: 8961440.004} 1: Object { end: 8961452.014604 start: 8961448} video: Array[2]: 0: Object { end: 8961444 start: 8961440} 1: Object { end: 8961456 start: 8961448} }"

Also attached is the full log with the shaka.log.setLevel(shaka.log.Level.V1) and shaka.log.Level.V2 setting.

What did you expect to happen? Continue playback after video currentTime change or error message in logs.

Notes: In Shaka Player version 2.5.17, playback works without freezing after changing position. Attached two log files: ShakaLog (shaka.log.Level.V1).txt, ShakaLog (shaka.log.Level.V2).txt ShakaLog (shaka.log.Level.V1).txt ShakaLog (shaka.log.Level.V2).txt

joeyparrish commented 2 years ago

We can't reproduce your issue from a copy of your MPD. Please see this note in the bug report template:

You can send the URIs to shaka-player-issues@google.com instead, but please use GitHub and the template for the rest. A copy of the manifest text or an attached manifest will not be enough to reproduce your issue, and we will ask you to send a URI instead. You can copy the URI of the demo app to send us the exact asset, licence server, and settings you have selected there.

mxn42 commented 2 years ago

@joeyparrish Please take a look at URL below. In our tests, shaka freezing appears when seeking for -1:06:32 and earlier.

http://31.20.164.20/PLTV/42/224/3221236825/3221236825.mpd?rrsip=31.20.164.84&zoneoffset=0&devkbps=700-7500&servicetype=1&icpid=&accounttype=1&limitflux=-1&limitdur=-1&tenantId=3103&accountinfo=%7E%7EV2.0%7EnM38FEZj190CxKXEliVF2A6ac752088190ba3da0a733f7d22b0661%7EksG-KdSPsVY-mOoEyV_2G02hzOWwQbveZKfGcvR7cEG0Kkhf9_8R3fyaFsvSsitkd97a6abc521bc078f4810c9d727ccef2%7EExtInfoSGlxrSdAWHj7hLbwfybF%2Fg%3D%3Dc3dcdc394185d61a6bdc51668fba5256%3A20210316094206%3AUTC%2C10001001022301%2C188.227.31.44%2C20210316094206%2C3103_PEBB%2C10001001022301%2C-1%2C0%2C1%2C%2C%2C2%2C3103_BetaUser%2C%2C%2C2%2C10000027661431%2C2%2C10000018110223%2CFF03E6CACA08%2C%2C%2C5%2C1%2CEND&GuardEncType=2&it=H4sIAAAAAAAAAE2OwQ6CMBBE_6bHxha0euhJY2Ji0AT0apZ2qcSFYgsk_r1gOHicyXuT6QMYPB10sjKbRIrtTpYqFVUKmxSNtKmyYmtFaVjEd-a1ZAaI6tZl3s7aPd8_hJJcKJ4ovluzYt47Eji9-qHZ0JQYljB5OYaxNqhtrPgIkYNzAR30tW_5leBzC7QgDIvlWzsQsX4OBcTXVLAnxL1vOghoz979OF0BRWQdmBc4zKDBP-8S7HTiC5OxrznsAAAA

Pereverzev-Alexander commented 2 years ago

Hello! @joeyparrish did you manage to reproduce the issue?

Pereverzev-Alexander commented 2 years ago

We have investigated this error.

Our live stream uses templates for segments in the manifest and a large search box (about 2 hours). After investigating, we know that we have ~1800 segments in our live stream and the default Shaka player configuration has a limit of 1000 for creating template segments. So we increased the manifest.dash.initialSegmentLimit to 3000 and this fixed the issue of the player freezing after seek back and filling buffers with incorrectly timed segments.

I have another question, is this a feature or a bug: shaka.seekRange() shows the entire range, ignoring the fact that some of the segments can be limited to loading by the manifest.dash.initialSegmentLimit parameter? This leads to the fact that the player, after changing the playback position, may end up in a range for which there are no available segments.

avelad commented 2 years ago

@joeyparrish Can you review @Pereverzev-Alexander 's question?

joeyparrish commented 2 years ago

@Pereverzev-Alexander, I would say that seekRange() should show what is actually seekable. If segments are not available, the seek UI shouldn't allow you to try to seek to them.

It sounds like this isn't accounted for, though.

seekRange() is fed by PresentationTimeline, which is a bit complicated. But it does know about the range of available segments, if I recall correctly.

avelad commented 1 year ago

Can you test with v4.3.3? Thanks!

github-actions[bot] commented 1 year ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.