videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
38.16k stars 7.46k forks source link

VideoJS stops downloading manifests if startNumbers between profiles is out of sequence #8046

Open mrc4ever opened 1 year ago

mrc4ever commented 1 year ago

Description

We're running into issues using video.js where if the .mpd has video profiles with out of sync start numbers and the player viewport changes size causing the usage of a different video profile, the video player will stop downloading new .mpd files. This causes the player to sit in a buffering state indefinitely.

Reduced test case

No response

Steps to reproduce

1) Assign a dash stream to the videoJS plugin 2) Our network tab will show a list of .mpd file retrievals followed by a profile init .mp4 and then audio and video .m4s segment downloads. As long as the videoJS plugin doesn't resize this will continue correctly. 3) Our .mpd manifests contain video profiles with start numbers that are not in sync:

    <AdaptationSet id="2" contentType="video" maxWidth="1280" maxHeight="720" segmentAlignment="true" subsegmentStartsWithSAP="1">
      <Accessibility schemeIdUri="urn:scte:dash:cc:cea-608:2015" value="CC1=eng;" />
      <Representation id="v-0" mimeType="video/mp4" codecs="avc1.640029" width="852" height="480" frameRate="30000/1001" sar="1:1" startWithSAP="1" bandwidth="748512" >
        <SegmentTemplate timescale="90000" presentationTimeOffset="3043568313" initialization="live/pkgHDLo-init.mp4" media="live/pkgHDLo-$Number$.m4s" startNumber="397077">
          <SegmentTimeline>
            <S t="3233837221" d="540540" r="4"/>
          </SegmentTimeline>
        </SegmentTemplate>
      </Representation>
      <Representation id="v-1" mimeType="video/mp4" codecs="avc1.640029" width="1280" height="720" frameRate="30000/1001" sar="1:1" startWithSAP="1" bandwidth="2498400" >
        <SegmentTemplate timescale="90000" presentationTimeOffset="3043568313" initialization="live/pkgHDMid-init.mp4" media="live/pkgHDMid-$Number$.m4s" startNumber="397078">
          <SegmentTimeline>
            <S t="3233837221" d="540540" r="4"/>
          </SegmentTimeline>
        </SegmentTemplate>
      </Representation>
      <Representation id="v-2" mimeType="video/mp4" codecs="avc1.640029" width="1280" height="720" frameRate="60000/1001" sar="1:1" startWithSAP="1" bandwidth="5497059" >
        <SegmentTemplate timescale="90000" presentationTimeOffset="3043568313" initialization="live/pkgHDHi-init.mp4" media="live/pkgHDHi-$Number$.m4s" startNumber="397078">
          <SegmentTimeline>
            <S t="3233837221" d="540537"/>
            <S t="3234377758" d="540536"/>
            <S t="3234918295" d="540537" r="1"/>
            <S t="3235999368" d="540536"/>
          </SegmentTimeline>
        </SegmentTemplate>
      </Representation>
    </AdaptationSet>

(Note: pkgHDLo-init.mp4 startNumber 397077, pkgHDMid-init.mp4 startNumber 397078, and pkgHDHi-init.mp4 startNumber 397078) 3) Resizing the videoJS plugin (ex: maximize button) will force a profile change and all future manifest downloads will cease. Eventually after all currently downloaded segments are consumed, the video will stop playing and buffer indefinitely.

This issue does not appear to happen when all profiles have sync'd startNumbers.

Errors

VIDEOJS: WARN: Removing other playlists from the exclusion list because the last rendition is about to be excluded. VIDEOJS: WARN: Problem encountered with playlist 0-placeholder-uri-0. Playlist no longer updating. Switching to playlist 2-placeholder-uri-2. VIDEOJS: WARN: Problem encountered with playlist 2-placeholder-uri-2. Aborted early because there isn't enough bandwidth to complete the request without rebuffering. Switching to playlist 0-placeholder-uri-0. (repeated)

What version of Video.js are you using?

7.20.3

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Edge Version 108.0.1462.46 (Official build) (64-bit)

What OS(es) and version(s) does this occur with?

Windows 11

welcome[bot] commented 1 year ago

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.