Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.15k stars 1.68k forks source link

Player not recovering after buffer stalled event on Tizen tv model 2021 #3786

Closed krackjack234 closed 3 years ago

krackjack234 commented 3 years ago
Environment
Steps to reproduce
  1. Play content on tizen tv app on Tizen 2021 model
  2. Playback starts and immediately goes to buffering and never recovers
Observed behavior

Player is going to bufferStalled state and never recovering after that. Issue is seen only on tizen 2021 model

Console output

videoplayerlib.js:30 [138][MediaPlayer] [dash.js 3.2.0] MediaPlayer has been initialized 
videoplayerlib.js:30 [164][MediaPlayer] Streaming Initialized 
videoplayerlib.js:30 [190][MediaPlayer] Playback Initialized 
videoplayerlib.js:30 [1496][DashParser] Parsing complete: ( xml2json: 44.6ms, objectiron: 2.23ms, total: 0.0468s) 
videoplayerlib.js:30 [1537][StreamController] Switch to stream 0. Seektime is NaN, current playback time is null 
videoplayerlib.js:30 [1537][StreamController] Seamless period switch is set to false 
videoplayerlib.js:30 [1656][ManifestUpdater] Manifest has been refreshed at Tue Oct 05 2021 12:19:18 GMT+0530 (India Standard Time)[1633416558.679]  
videoplayerlib.js:386 onloadstartEvent
videoplayerlib.js:30 [2826][Stream] No text data. 
videoplayerlib.js:30 [2827][Stream] No fragmentedText data. 
videoplayerlib.js:30 [2827][Stream] No embeddedText data. 
videoplayerlib.js:30 [2827][Stream] No muxed data. 
videoplayerlib.js:30 [2828][Stream] No image data. 
videoplayerlib.js:30 [4002][AbrController] [video] switch from 0 to 2/4 (buffer: 0) . 
videoplayerlib.js:30 [4318][BufferController][video] Init fragment finished loading saving to video's init cache 
videoplayerlib.js:30 [4321][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:0-1109 
videoplayerlib.js:30 [4366][BufferController][audio] Init fragment finished loading saving to audio's init cache 
videoplayerlib.js:30 [4367][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_464_a.mp4 , Range:0-941 
videoplayerlib.js:30 It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior.
(anonymous) @ videoplayerlib.js:30
videoplayerlib.js:30 [4472][ProtectionController] DRM: KeySystem Access Granted (com.widevine.alpha)!  Selecting key system... 
videoplayerlib.js:30 [4483][ScheduleController][video] Top quality video index has changed from undefined to 4 
videoplayerlib.js:30 [4869][ScheduleController][audio] Top quality audio index has changed from undefined to 0 
videoplayerlib.js:12 VIDEOJS: loadmetadata event
videoplayerlib.js:53 player.videojs_http_source_selector_initialized == false
videoplayerlib.js:374 quality levels  a
videoplayerlib.js:374 initialLivePlaybackTime  0
videoplayerlib.js:374  player.dash.mediaPlayer  :  Object
videoplayerlib.js:386 onloadedmetadataEvent
videoplayerlib.js:374 #####onloadedmetadata#####
videoplayerlib.js:30 [4924][PlaybackController] Native video element event: loadedmetadata 
videoplayerlib.js:30 [5046][ProtectionController] DRM: Ignoring initData because we have already seen it! 
videoplayerlib.js:30 [7374][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_464_a.mp4 , Range:18038-97061 
videoplayerlib.js:30 [7695][AbrController] [audio] switching from throughput to buffer occupancy ABR rule (buffer: 10.005). 
videoplayerlib.js:380 Uncaught TypeError: Cannot read property 'state' of null
    at videoplayerlib.js:380
videoplayerlib.js:30 [10630][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_464_a.mp4 , Range:97062-179763 
videoplayerlib.js:380 Uncaught TypeError: Cannot read property 'state' of null
    at videoplayerlib.js:380
(anonymous) @ videoplayerlib.js:380
videoplayerlib.js:30 [24537][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:18206-813098 
videoplayerlib.js:374 #####onloadeddata#####
videoplayerlib.js:30 [25736][PlaybackController] Native video element event: playing 
videoplayerlib.js:386 onsuspendEvent
videoplayerlib.js:374 suspend Event Triggered
videoplayerlib.js:30 [25813][PlaybackController] Requesting internal seek to time: 0.12 
videoplayerlib.js:30 [25824][GapController] Jumping gap starting at 0 and ending at 0.12. Jumping by: 0.12 
videoplayerlib.js:386 onseekingEvent
videoplayerlib.js:30 [26176][AbrController] [video] switching from throughput to buffer occupancy ABR rule (buffer: 11.820). 
videoplayerlib.js:374 seeked from 0 to 0 ; delta: 0
videoplayerlib.js:386 onseekedEvent
videoplayerlib.js:30 [26328][PlaybackController] Native video element event: seeked 
videoplayerlib.js:380 Metrics:Buffer: 8.071
Metrics:Buffer State: bufferLoaded
videoplayerlib.js:30 [33221][AbrController] [video] switching from buffer occupancy to throughput ABR rule (buffer: 4.757). 
videoplayerlib.js:374 onWaiting...........
videoplayerlib.js:30 [37695][PlaybackController] Native video element event: waiting 
videoplayerlib.js:374 onWaiting...........
videoplayerlib.js:386 onrateChangeEvent
videoplayerlib.js:30 [37705][PlaybackController] Native video element event: ratechange:  0 
videoplayerlib.js:30 [39757][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_464_a.mp4 , Range:179764-262190 
videoplayerlib.js:380 Metrics:Buffer: 0.34
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [47719][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:813099-1740018 
videoplayerlib.js:30 [47852][AbrController] [video] switching from throughput to buffer occupancy ABR rule (buffer: 10.340). 
videoplayerlib.js:30 [47870][PlaybackController] Native video element event: playing 
videoplayerlib.js:374 playing event {isTrusted: false, NONE: 0, CAPTURING_PHASE: 1, AT_TARGET: 2, BUBBLING_PHASE: 3, …}
videoplayerlib.js:374 #####onPlaying#####
videoplayerlib.js:386 playingEvent {isTrusted: false, NONE: 0, CAPTURING_PHASE: 1, AT_TARGET: 2, BUBBLING_PHASE: 3, …}
videoplayerlib.js:386 onrateChangeEvent
videoplayerlib.js:30 [47883][PlaybackController] Native video element event: ratechange:  1 
videoplayerlib.js:380 Metrics:Buffer: 8.324
Metrics:Buffer State: bufferLoaded
videoplayerlib.js:30 [51008][AbrController] [video] switching from buffer occupancy to throughput ABR rule (buffer: 0.000). 
videoplayerlib.js:374 onWaiting...........
videoplayerlib.js:30 [51016][PlaybackController] Native video element event: waiting 
videoplayerlib.js:374 onWaiting...........
videoplayerlib.js:386 onrateChangeEvent
videoplayerlib.js:30 [51036][PlaybackController] Native video element event: ratechange:  0 
videoplayerlib.js:374 onWaiting...........
videoplayerlib.js:30 [51171][PlaybackController] Native video element event: waiting 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [64381][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:1740019-2271094 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [71865][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:2271095-2938387 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [83520][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:2938388-3590573 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [90100][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:3590574-4137440 
videoplayerlib.js:30 [97069][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:4137441-4702035 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [108985][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:4702036-5277155 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [115934][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:5277156-5873669 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [125511][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:5873670-6497443 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [140589][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:6497444-7111208 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [153043][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:7111209-7631945 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [161326][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:7631946-8112630 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [170855][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:8112631-8688638 
videoplayerlib.js:380 Metrics:Buffer: 0
Metrics:Buffer State: bufferStalled
videoplayerlib.js:30 [183929][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:8688639-9358225 

Metrics:Buffer: 0 is output of below code

mediaPlayer.getDashMetrics().getCurrentBufferLevel('video', true)

Expected behavior

Player should recover after downloading new segments Our segment size is 6secs.

Question: How can we programatically resume playback after bufferStalled event is fired? We tried a seek operation but saw similar type of logs where the buffer controller keeps on downloading and then removed segments. Is there anyway to recover from this state?

Is this problem related to https://github.com/Dash-Industry-Forum/dash.js/issues/3610?

krackjack234 commented 3 years ago

Update

We can reproduce same issue if we change dash buffer config to below values and try a 3-hour long form content

 bufferPruningInterval: 1,
 bufferToKeep: 2,
 bufferTimeAtTopQuality: 2,
 bufferTimeAtTopQualityLongForm: 2,
 stableBufferTime: 2,
 useAppendWindow: false,

With above experimental buffer configs, same issue happens on chrome browser and thereafter the player does not recover. We just changed the configs to check if the player recovers from this condition on pause/resume/seek operation on desktop browser but it fails to do so.

On tizen 2021 tv, the same behavior is seen but with default buffer configs.

Is there anyway we can avoid this buffer stalled condition and recover from this state to resume playback?

dsilhavy commented 3 years ago

@krackjack234 Did you check with dash.js 3.2.2 and 4.1.0? Version 3.2.0 is outdated so there is a good chance this has been fixed in the meantime

krackjack234 commented 3 years ago

@dsilhavy we just checked with v3.2.2 with the experimental buffer configs on chrome browser but still the problem is there.

Here are the logs.

[17163][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  14.400117 
videoplayerlib.js:80100 [18162][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [18163][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [18164][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  15.401287 
videoplayerlib.js:80100 [19164][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [19165][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [19165][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  16.402429 
videoplayerlib.js:151368 Metrics:Buffer: 2.963
Metrics:Buffer State: bufferLoaded
videoplayerlib.js:80100 [20161][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [20162][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [20163][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  17.400713 
videoplayerlib.js:80100 [21162][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [21163][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [21163][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  18.4013 
videoplayerlib.js:80100 [21954][AbrController] [video] switch from 3 to 2/3 (buffer: 0.964) "InsufficientBufferRule: being conservative to avoid immediate rebuffering" 
videoplayerlib.js:80100 [21956][ScheduleController][video] Quality has changed, get init request for representationid = 6 
videoplayerlib.js:80100 [21956][BufferController][video] Append Init fragment video  with representationId: 6  and quality: 2 , data size: 1110 
videoplayerlib.js:80100 [21958][ScheduleController][video] [video] lastInitializedRepresentationInfo changed to 2 
videoplayerlib.js:80100 [21959][ProtectionController] DRM: onNeedKey 
videoplayerlib.js:80100 [21960][ProtectionController] DRM: Ignoring initData because we have already seen it! 
videoplayerlib.js:80100 [21962][DashHandler][video] Getting the next request at index: 2 
videoplayerlib.js:80100 [21963][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [22162][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [22164][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [22164][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  19.402492 
videoplayerlib.js:80100 [22316][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:1740019-2271094 
videoplayerlib.js:80100 [22322][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.559757 
videoplayerlib.js:80100 [22325][AbrController] [video] stay on 2/3 (buffer: 0.56) 
videoplayerlib.js:80100 [22325][DashHandler][video] Getting the next request at index: 3 
videoplayerlib.js:80100 [22326][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [22418][AbrController] [video] switching from buffer occupancy to throughput ABR rule (buffer: 0.464). 
index.html:469 onWaiting
videoplayerlib.js:149900 **onWaiting...........**
videoplayerlib.js:80100 [22422][PlaybackController] Native video element event: waiting 
index.html:469 onWaiting
videoplayerlib.js:149900 onWaiting...........
videoplayerlib.js:80100 [22424][BufferController][video] Waiting for more buffer before starting playback 
videoplayerlib.js:155889 onrateChangeEvent
videoplayerlib.js:80100 [22430][PlaybackController] Native video element event: ratechange:  0 
videoplayerlib.js:80100 [23119][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:2271095-2938387 
videoplayerlib.js:80100 [23128][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 
videoplayerlib.js:80100 [23131][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [23131][AbrController] [video] stay on 2/3 (buffer: 0.464) 
videoplayerlib.js:80100 [23131][DashHandler][video] Getting the next request at index: 4 
videoplayerlib.js:80100 [23132][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [23161][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [23162][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [23163][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  19.656474 
videoplayerlib.js:80100 [23501][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:2938388-3590573 
videoplayerlib.js:80100 [23507][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 
videoplayerlib.js:80100 [23510][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [23511][AbrController] [video] stay on 2/3 (buffer: 0.464) 
videoplayerlib.js:80100 [23512][DashHandler][video] Getting the next request at index: 5 
videoplayerlib.js:80100 [23513][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [24102][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:3590574-4137440 
videoplayerlib.js:80100 [24109][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 
videoplayerlib.js:80100 [24112][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [24112][AbrController] [video] stay on 2/3 (buffer: 0.464) 
videoplayerlib.js:80100 [24113][DashHandler][video] Getting the next request at index: 6 
videoplayerlib.js:80100 [24115][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [24162][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [24162][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [24163][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  19.656474 
videoplayerlib.js:80100 [24368][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:4137441-4702035 
videoplayerlib.js:80100 [24374][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 
videoplayerlib.js:80100 [24376][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [24376][SwitchHistoryRule] Switch history rule index: 2 samples: 6 drops: 1 
videoplayerlib.js:80100 [24377][AbrController] [video] stay on 2/3 (buffer: 0.464) 
videoplayerlib.js:80100 [24377][DashHandler][video] Getting the next request at index: 7 
videoplayerlib.js:80100 [24378][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [24615][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:4702036-5277155 
videoplayerlib.js:80100 [24622][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 
videoplayerlib.js:80100 [24624][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [24625][SwitchHistoryRule] Switch history rule index: 2 samples: 7 drops: 1 
videoplayerlib.js:80100 [24626][AbrController] [video] stay on 2/3 (buffer: 0.464) 
videoplayerlib.js:80100 [24626][DashHandler][video] Getting the next request at index: 8 
videoplayerlib.js:80100 [24627][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [25162][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [25162][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [25162][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  19.656474 
videoplayerlib.js:80100 [25480][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:5277156-5873669 
videoplayerlib.js:80100 [25491][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 
videoplayerlib.js:80100 [25494][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [25494][SwitchHistoryRule] Switch history rule index: 2 samples: 8 drops: 1 
videoplayerlib.js:80100 [25495][AbrController] [video] stay on 2/3 (buffer: 0.464) 
videoplayerlib.js:80100 [25496][DashHandler][video] Getting the next request at index: 9 
videoplayerlib.js:80100 [25497][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [26106][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:5873670-6497443 
videoplayerlib.js:80100 [26113][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 
videoplayerlib.js:80100 [26115][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [26115][SwitchHistoryRule] Switch history rule index: 2 samples: 8 drops: 1 
videoplayerlib.js:80100 [26115][AbrController] [video] stay on 2/3 (buffer: 0.464) 
videoplayerlib.js:80100 [26115][DashHandler][video] Getting the next request at index: 10 
videoplayerlib.js:80100 [26116][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [26161][BufferController][audio] Removing buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [26162][BufferController][audio] onRemoved buffer from: 0 to 10.005333333333333 
videoplayerlib.js:80100 [26162][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  19.656474

From above logs it looks like the player is downloading a segment but still reporting insufficient buffer

[16967][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
videoplayerlib.js:80100 [16967][AbrController] [video] stay on 2/3 (buffer: 0) 
videoplayerlib.js:80100 [16968][DashHandler][video] Getting the next request at index: 2 
videoplayerlib.js:80100 [16968][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
videoplayerlib.js:80100 [17455][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:1740019-2271094 
videoplayerlib.js:80100 [17464][InsufficientBufferRule] [video] Switch to index 0; buffer is empty. 
krackjack234 commented 3 years ago

Same issue is seen with v4.1.0 also. Once goes into this state, it continuously keeps on downloading same segment repeatedly and reports insufficient buffer

dsilhavy commented 3 years ago

Looking at the logs I don't see an issue in the player. It looks like the player is requesting video data correctly:

[24627][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
[25480][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:5277156-5873669
[25497][ScheduleController][video] Next fragment request url is https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 
[26106][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://example.jio.com/content/entry/wvdata/76/3/2a77451018cb11ecb733e74fce777a17_696_v.mp4 , Range:5873670-6497443 

However the buffered range remains the same:

[26113][BufferController][video] Buffered range: 10.12 - 20.12, currentTime =  19.656474 

The audio buffer looks ok:

[23163][BufferController][audio] Buffered range: 10.005333 - 30.015999, currentTime =  19.656474 

There might be something wrong with the video segments after 20.12 seconds

dsilhavy commented 3 years ago

You can use one of the DASH-IF SegmentBase reference vectors for reference and check if you can reproduce the same problem: https://dash.akamaized.net/dash264/TestCases/1a/sony/SNE_DASH_SD_CASE1A_REVISED.mpd

krackjack234 commented 3 years ago

@dsilhavy issue is reproducible even with the above reference vector with below configs in chrome browser with dash library v4.1.0

buffer: {
bufferPruningInterval: 0,
bufferToKeep: 1,
bufferTimeAtTopQuality: 1,
bufferTimeAtTopQualityLongForm: 1,
stableBufferTime: 0,
useAppendWindow: false,
}

Once the player goes to buffer stalled state, it does not recover

[88409][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [88412][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [88412][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [88509][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [88512][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [88512][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [88609][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [88612][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [88613][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [88709][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [88710][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [88711][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [88810][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [88812][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [88812][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [88910][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [88913][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [88914][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89008][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89009][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89010][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89111][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89113][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89113][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89211][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89214][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89214][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89310][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89311][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89312][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89408][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89409][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89409][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89508][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89510][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89510][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89610][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89611][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89612][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89708][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89709][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89710][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89810][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89812][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89813][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
 [89908][BufferController][audio] audio: Removing buffer from: 0 to 6.058666666666666 
 [89909][BufferController][audio] onRemoved buffer from: 0 to 6.058666666666666 
 [89909][BufferController][audio] Buffered range: 6.058666 - 12.117332, currentTime =  7.309902 
dsilhavy commented 3 years ago

The reason the playback stalls with this config is that you set stableBufferTime to 0. MediaPlayerModel.getStableBufferTime returns 0 in this case and the ScheduleController will not load any additional segments.

dsilhavy commented 3 years ago

Can you paste the detailed logs of version 4.1.0 on the Samsung device using the default configuration and logLevel set to 5 please.

AUGxhub commented 3 years ago

can show the tizen device detail s/w version ? and which mpd url are u trying to play ?

krackjack234 commented 3 years ago

hi @AUGxhub the user agent of tv is Mozilla/5.0 (SMART-TV; LINUX; Tizen 6.0) AppleWebKit/537.36 (KHTML, like Gecko) 76.0.3809.146/6.0 TV Safari/537.36

We are trying to get more details from Samsung team as we ourselves dont have the model.

krackjack234 commented 3 years ago

hi @AUGxhub , @dsilhavy The issue was narrowed down to be a stream issue where the video track of a particular bitrate (696 kbps) was causing the problem. Re-encoding the streams fixed the issue.

I am closing this issue. Thanks a lot for your inputs.