Closed krackjack234 closed 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?
@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
@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.
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
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
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
@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
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.
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.
can show the tizen device detail s/w version ? and which mpd url are u trying to play ?
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.
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.
Environment
Steps to reproduce
Observed behavior
Player is going to bufferStalled state and never recovering after that. Issue is seen only on tizen 2021 model
Console output
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?