Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Excessive main segment downloading detected. Switching to playlist... #7842

Closed
kooshiel opened this issue Jul 15, 2022 · 17 comments
Closed

Comments

@kooshiel
Copy link

Description

My videos play just fine in Safari. But, in Chrome and Firefox, the video begins playing just fine, but then if I seek forward in the video, the playback freezes and the player spits out errors.

In Chrome and Firefox, this error shows in the browser console on initial play:

VIDEOJS: WARN: Segment with index 0 from playlist 4-https://domain.com/b.m3u8 has a duration of 95447.81368888888 when the reported duration is 4.096 and the target duration is 8. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1

Then if I seek forward, I get this error:

VIDEOJS: WARN: Problem encountered with playlist 0-https://domain.com/d.m3u8. Excessive main segment downloading detected. Switching to playlist 1-https://domain.com/e.m3u8.

The player then switches to 3 different m3u8 files, fails to play, outputs the above error, until it gives up with this error:

VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists.

Reduced test case

https://codepen.io/kushiel/pen/XWENBpx

Steps to reproduce

  1. Try to play video in Chrome or Firefox
  2. Seek forward
  3. Video freezes, errors display in console

Errors

VIDEOJS: WARN: Segment with index 0 from playlist 4-https://domain.com/b.m3u8 has a duration of 95447.81368888888 when the reported duration is 4.096 and the target duration is 8. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1

VIDEOJS: WARN: Problem encountered with playlist 0-https://domain.com/d.m3u8. Excessive main segment downloading detected. Switching to playlist 1-https://domain.com/e.m3u8.

VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists.

What version of Video.js are you using?

7.20.1

Video.js plugins used.

No response

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

Google Chrome 103.0.5060.114 (Official Build) (arm64) / Firefox 102.0.1 (64-bit)

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

macOS Monterey 12.4

@kooshiel kooshiel added bug needs: triage This issue needs to be reviewed labels Jul 15, 2022
@welcome
Copy link

welcome bot commented Jul 15, 2022

👋 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.

@video-archivist-bot
Copy link

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

@damanV5
Copy link
Contributor

damanV5 commented Dec 21, 2022

Same issue here. It happens in case of long duration videos.

@misteroneill
Copy link
Member

This issue has been open for a while, but we didn't get around to investigating it yet. Thank you for providing a reduced test case, though!

Can you try it with the current version of Video.js and let us know if it's still an issue?

@misteroneill misteroneill added needs: updates and removed needs: triage This issue needs to be reviewed labels Mar 28, 2023
@kooshiel
Copy link
Author

I had to move onto a different video player because of this problem. But, I just updated the above linked reduced test case on codepen to use Video.js 8.0.4 and the problem still exists. I also tried with 8.2.1 and still no luck.

@JustynaGerkeTR
Copy link

@misteroneill I got a similar issue, updating to newest version didn't help. Is this something being worked on?

@dliebner
Copy link

dliebner commented Jul 3, 2023

So this is a vjs bug and not a bug with my HLS encoder probably?

@adrums86
Copy link
Contributor

Currently some work being done in VHS related to this.

@thomasjammet
Copy link

Currently some work being done in VHS related to this.

Oh interesting, can you share about the work being done? I see it's related to this ticket : #8452

I am facing a similar issue on Chrome (Windows 10), I have an HLS stream live, it is working fine but when I click on the fullscreen button I get the same kind of warning :

VIDEOJS: WARN: Problem encountered with playlist 0-3/index.m3u8?mTrack=3&iMsn=130919&tkn=1336335399. Excessive main segment downloading detected. Switching to playlist 2-5/index.m3u8?mTrack=3&iMsn=130919&tkn=1336335399.

Sometimes it stop working completely.

@ajaymiyyapuram
Copy link

Our customers has encountered similar warning during a large live event, several users saw these errors starting 28th minute in livestream in 5 min window and then dropped and stayed low until end of the 2 hour long event. We looked at the upstream CDN and the packaging service and didn't notice any errors. I couldn't reproduce the issue though.

VIDEOJS:,WARN:,Segment with index 9 from playlist 0-index_131.m3u8 has a duration 
of 95449.[7176888889 (tel:7176888889) when the reported duration is 6 and the target duration is 6. 
For HLS content, a duration in excess of the target duration may result in playback issues. 
See the HLS specification section on EXT-X-TARGETDURATION for more details: 
https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1

Looking at the code the duration is retrieved from audioTimingInfo: segmentInfo.audioTimingInfo, videoTimingInfo: segmentInfo.videoTimingInfo, can this mean encoder has sent an incorrect timing info or any other issue? For some customers I didn't see the excessive main segment warning but only had above warning.

Player version: 7.20.3 , stackoverflow question

@thomasjammet
Copy link

Currently some work being done in VHS related to this.

Oh interesting, can you share about the work being done? I see it's related to this ticket : #8452

I am facing a similar issue on Chrome (Windows 10), I have an HLS stream live, it is working fine but when I click on the fullscreen button I get the same kind of warning :

VIDEOJS: WARN: Problem encountered with playlist 0-3/index.m3u8?mTrack=3&iMsn=130919&tkn=1336335399. Excessive main segment downloading detected. Switching to playlist 2-5/index.m3u8?mTrack=3&iMsn=130919&tkn=1336335399.

Sometimes it stop working completely.

In my case it was due to a change of source without calling player.pause(), I am not sure this is related with the above issues so. Correct way to change source without having (later) the warning "Excessive main segment downloading detected." when you switch tracks is for me :

player.pause();
player.reset();
player.src(...);

@adrums86
Copy link
Contributor

adrums86 commented Dec 1, 2023

@thomasjammet Yeah this has been on our radar for a while, unfortunately a bit of "whack a mole" trying to fix it. This PR is our latest attempt. Feel free to test against this netlify preview build, additional feedback would be helpful for us!

@video-archivist-bot
Copy link

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

@thomasjammet
Copy link

@thomasjammet Yeah this has been on our radar for a while, unfortunately a bit of "whack a mole" trying to fix it. This PR is our latest attempt. Feel free to test against this netlify preview build, additional feedback would be helpful for us!

Hi @adrums86 ! Thanks for sharing! This seems to work with the playlist shared in #8452 (https://fullscreen-bug.storage.yandexcloud.net/master.m3u8).
I'll try to make further test later. Is it possible to have the bundle of this PR? (including VHS and video.js)

@video-archivist-bot
Copy link

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

@adrums86
Copy link
Contributor

adrums86 commented Dec 4, 2023

@thomasjammet Excellent news! We just released this work in v8.7.0 today.

@adrums86
Copy link
Contributor

adrums86 commented Dec 5, 2023

This should be fixed in v8.7.0, closing.

@adrums86 adrums86 closed this as completed Dec 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants