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.12k stars 1.68k forks source link

Playback stalling issues with buffer length greater than 0 #2522

Closed jiuyuetianjiuyuetian closed 6 years ago

jiuyuetianjiuyuetian commented 6 years ago
Environment
Steps to reproduce
  1. Please provide clear steps to reproduce your problem
  2. If the bug is intermittent, give a rough frequency if possible
Observed behaviour

buff len has 9s ,but video is stop ,no error and throw exceptions. a518d2b3270d5681e5e004d997abc0f

Console output
Output ``` Paste the contents of the browser console here. You may need to enable debug logging in dash.js by calling player.getDebug().setLogToBrowserConsole(true) if you are using your own page. ```
epiclabsDASH commented 6 years ago

@jiuyuetianjiuyuetian, it is difficult knowing what happens exactly without having more information about the issue (fill in the issue template). Could you please let me know the url of the stream you are using for reproducing this issue, browser name/version and dash.js version?

In case you can't publicly share your stream url, as a first step it would be enough with sharing the mpd content (the xml).

jiuyuetianjiuyuetian commented 6 years ago

@epiclabsDASH , dash js version 2.6.6 ,brower is Google Chrome , The latest version,stream address is https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd。this stream is same problem too. last picture is our produce stream ,this is inner_nerwork ,MDP file follows: <?xml version="1.0"?>

epiclabsDASH commented 6 years ago

@jiuyuetianjiuyuetian, I am sorry but I can't reproduce that kind of issue here with that sample stream (the Big Buck Bunny one served by Akamai). Could you please let me know if you can reproduce the issue with nightly version of dash.js?

jakubfrydrych commented 6 years ago

I have a similar situation. The player will freeze even if the buffer is available for the next minute and a half. All videojs components are updated to the last stable version. Once the player has jammed, these lines appear constantly in the console.

[2205068] getClearRanges for video - Remove buffer out of 2499.002911 - 2599.002911 [2205069] Removing video buffer from: 2599.002911 to 2599.05 [2205070] [BufferController][ video ] onRemoved buffer from: 2599.002911 to 2599.05 [2205071] Buffered Range for type: video : 2500 - 2599.04 currentTime = 2519.002911 [2205072] onRemoved : call updateBufferLevel

epiclabsDASH commented 6 years ago

@jakubfrydrych, it also happens to you when using the default stream url of dash reference player?

jiuyuetianjiuyuetian commented 6 years ago

@epiclabsDASH I use https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd is also play stop with no reason . A lot of these cases have been encountered recently。 a2715cfe5fd301d024799eb932ed547

jiuyuetianjiuyuetian commented 6 years ago

follows is log when stop,every times log is similar: [317983] ScheduleController - video - getNextFragment core\Debug.js:127 [317984] Getting the request for video time : 324 core\Debug.js:127 [317985] Index for video time 324 is 80 core\Debug.js:127 [317986] SegmentTemplate: 320 / 634.566 core\Debug.js:127 [317987] Getting the next request at index: 81 core\Debug.js:127 [317988] SegmentTemplate: 324 / 634.566 core\Debug.js:127 [317988] ScheduleController - video - getNextFragment - request is https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_480x270_600k/bbb_30fps_480x270_600k_82.m4v streaming\rules\abr\IQYRule.js:78 [--IQYRule--]Received Message errorcode : 0 streaming\rules\abr\IQYRule.js:79 [--IQYRule--]Received Message switchBitrate : 75980 streaming\rules\abr\IQYRule.js:112 [--IQYRule--]Received Message bitrate index : 1 streaming\controllers\SourceBufferController.js:280 --[SourceBufferController.append ]--,append bufffer: MediaSegment 2 81 core\Debug.js:127 [318027] Buffered Range for type: video : 270 - 327.999999 core\Debug.js:127 [318246] AbrController (audio) stay on 0/0 (buffer: 7.137) core\Debug.js:127 [318248] ScheduleController - audio - getNextFragment core\Debug.js:127 [318248] Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end. 324.8639966666667 was changed to 324.863999 core\Debug.js:127 [318249] Getting the request for audio time : 324.863999 core\Debug.js:127 [318251] Index for audio time 324.863999 is 80 core\Debug.js:127 [318253] SegmentTemplate: 320.85333 / 634.566 core\Debug.js:127 [318254] Getting the next request at index: 81 core\Debug.js:127 [318255] SegmentTemplate: 324.864 / 634.566 core\Debug.js:127 [318257] ScheduleController - audio - getNextFragment - request is https://dash.akamaized.net/akamai/bbb_30fps/bbb_a64k/bbb_a64k_82.m4a streaming\controllers\SourceBufferController.js:280 --[SourceBufferController.append ]--,append bufffer: MediaSegment 0 81 core\Debug.js:127 [318290] Buffered Range for type: audio : 270.037333 - 328.874666 core\Debug.js:127 [330537] pruning buffer: 20.029248999999993 seconds. core\Debug.js:127 [330537] pruning buffer: 19.991916000000003 seconds. core\Debug.js:127 [360691] pruning buffer: 0.029248999999992975 seconds. core\Debug.js:127 [360692] pruning buffer: 0.023915999999985615 seconds.

davemevans commented 6 years ago

Is this running in a virtual environment as described in #2521? If so, related issue: https://github.com/Dash-Industry-Forum/dash.js/issues/1620

jiuyuetianjiuyuetian commented 6 years ago

@bbcrddave yes.But the problem remains unsolved

davemevans commented 6 years ago

Do you see the same result in a non-virtual environment?

jiuyuetianjiuyuetian commented 6 years ago

@bbcrddave ,This problem still exists in the windows environment, cd2f81f3274cc14f2b38660728a302e

jiuyuetianjiuyuetian commented 6 years ago

@bbcrddave The logs are almost the same before media stop. [953062] ScheduleController - audio - getNextFragment - request is https://dash.akamaized.net/akamai/bbb_30fps/bbb_a64k/bbb_a64k_114.m4a streaming\controllers\SourceBufferController.js:280 --[SourceBufferController.append ]--,append bufffer: MediaSegment 0 113 core\Debug.js:127 [953093] Buffered Range for type: audio : 389.034666 - 457.215999 core\Debug.js:127 [969414] pruning buffer: 15.040795000000003 seconds. core\Debug.js:127 [969415] pruning buffer: 16.006128999999987 seconds. core\Debug.js:127 [999465] pruning buffer: 0.0061289999999871725 seconds.

Because there is a lack of log information for each interface entrance and end, I don't know where to locate it at the moment.

jakubfrydrych commented 6 years ago

@epiclabsDASH Hi, I have solved the problem by disabling ABRStrategy reconfiguration. Where we used the 'abrBola' direct setting. When I searched for information, I came across the abrDynamic strategy. Is there an automatic combination of the Bola Algorithm ? So there is no need to define abrBola directly? Thx

epiclabsDASH commented 6 years ago

Yes, that is what abrDynamic is doing (abrDynamic is the ABR strategy used by default). What abrDynamic does is using throughtput strategy when buffer level is below a limit, otherwise it uses bola strategy.

To be more specific, with abrDynamic, dash.js will start using throughput strategy until buffer length is equal or higher to stable buffer time (see MediaPlayer.setStableBufferTime), at which time it will switch to bola strategy. Once using bola strategy, it will switch to throughput strategy if buffer level falls below (stable Buffer Time) / 2.

Anyway, I don't see a direct correlation between using bola and suffering playback freezing issues. I will do further testing myself regarding this.

Thanks for the info

jiuyuetianjiuyuetian commented 6 years ago

@jakubfrydrych ,Instead of using the strategy of dash JS, I use a strategy written by myself to get the switchRequest.

epiclabsDASH commented 6 years ago

@jiuyuetianjiuyuetian, and using dash.js without any modification, do you reproduce the same issues you are describing here?

jiuyuetianjiuyuetian commented 6 years ago

@epiclabsDASH The native dash JS didn't notice before, because the video playback was changed to circular play recently,so it was found that there was a problem with this playback.I just add a strategy to get a quality,

jiuyuetianjiuyuetian commented 6 years ago

I disabled the Hardware-accelerated video decode of chrome://flags ,last problem is not appears。

epiclabsDASH commented 6 years ago

Weird... @jiuyuetianjiuyuetian, could you please try to reproduce the issue with Google Chrome and check if there is any error message in chrome://media-internals?

jiuyuetianjiuyuetian commented 6 years ago

@epiclabsDASH ,I have checked your question before, and there is nothing wrong with it. When the video playback stop with buff has enough data, chrome:// medi-internals displays the Web is play state instead of pause .

epiclabsDASH commented 6 years ago

Closing. We couldn't find a way of reproducing this issue...