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

Video/audio gets out of sync and chrome browser tab gets unresponsive after certain minutes of play #5607

Closed
marcusfrenkel opened this issue Nov 20, 2018 · 16 comments

Comments

@marcusfrenkel
Copy link

marcusfrenkel commented Nov 20, 2018

Description

1st issue: When stream plays more than 15 minutes, video and audio start to get out-of-sync noticeably, the drift is increasing continuously.

2nd issue: After 60 minutes of play, the player and every object inside the tab is frozen and unresponsive. The only solution is to close the tab.

Our test is based on live stream within a local network. Since I'm unable to provide it outside, I listed below publicly available streams that make videojs produce the same issues.

Test cases based on videojs:
https://codepen.io/anon/pen/vQpyyw?editors=1000
https://codepen.io/anon/pen/zMpoGp?editors=1000

Test cases based on hls.js in which case both issues specified above do not occur:
https://codepen.io/anon/pen/jQYVKL?editors=1000
https://codepen.io/anon/pen/BGJLGX?editors=1000

Steps to reproduce

  1. Open https://codepen.io/anon/pen/vQpyyw?editors=1000
  2. Wait 15min to notice that the video/audio starts to drift.
  3. Wait 60min to notice that the entire browser tab becomes unresponsive.

Results

Expected

  1. No out-of-sync issue.
  2. No frozen browser tab.

Actual

  1. Out-of-sync after ~15min of play.
  2. Tab freezes after 60min of play.

Error output

No.

Additional Information

versions

videojs

7.3.0

browsers

Chrome - version 70.0.3538.110 (Official Build) (64-bit)
Possibly others

OSes

Windows 10
Possibly others

plugins

No

@marcusfrenkel marcusfrenkel changed the title Chrome browser tab gets unresponsive and video/audio gets out of sync after certain minutes of play Video/audio gets out of sync and chrome browser tab gets unresponsive after certain minutes of play Nov 20, 2018
@marcusfrenkel
Copy link
Author

marcusfrenkel commented Nov 26, 2018

Both issues are also present on latest Firefox (63.0.3 64-bit).

Kind request to the devs to look into this. Thank you.

@gkatsev gkatsev added the playback Playback related issues label Nov 26, 2018
@marcusfrenkel
Copy link
Author

Update:

The issue with the browser tab getting frozen and unresponsive happens only if the tab is not active/selected in the browser while the video is playing, meaning another tab is into view.

The other issue with audio/video out of sync happens even in a case when the tab is constantly active/selected while the video is playing.

@mattfrankly
Copy link

We're experiencing the same sync problem, but we lose sync after about 5min. Other players as well as playing the m3u8 directly in Safari/VLC don't have this issue.

Example on vanilla VJS7 : http://ftpcontent.worldnow.com/test/vjs7.html

Schedule for when this stream is live:

Mon thru Fri (Times in EST)
5:30am to 6:30am
6:30AM to 7:30am
7:30am to 8am
10am to 11am
12pm to 1pm
5pm to 6pm
6pm to 6:30pm
7pm to 7:30pm
11pm to 11:30pm

Any thoughts/progress here?

@marcusfrenkel
Copy link
Author

Both issues are still present in videojs version 7.5.0.

@benjdavenport
Copy link

Bump on this, can confirm it's still an issue. Reloading the player context via refresh or seeking to a position (for VODs) realign audio and video.

@stale
Copy link

stale bot commented Jun 28, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the outdated Things closed automatically by stalebot label Jun 28, 2019
@mattfrankly
Copy link

bump.. still a problem.

@stale stale bot removed the outdated Things closed automatically by stalebot label Jun 28, 2019
@gkatsev
Copy link
Member

gkatsev commented Jun 29, 2019

Oops, yes, I may consolidate the couple of AV sync issues we have into one, but in #6000 I mentioned that we were busy doing some major refactoring to our playback engine to improve it before we can go back and tackle AV sync but it's a big thing we want to focus on next after those changes, which are done but just need to be tested more thoroughly.

@partap
Copy link

partap commented Sep 5, 2019

Bump... I've also been seeing the AV sync issue.
In the meantime, I'm using videojs-hlsjs-plugin to get around the problem.

From what I remember, hlsjs contains code to fix this specific issue. I think it monitors the audio and video timestamps and if they differ by a certain threshold, the player either skips forward in the audio stream or emits several ms of silence to re-sync the audio

@partap
Copy link

partap commented Sep 5, 2019

Aha, I found it in the hlsjs docs... the config option is maxAudioFramesDrift:
https://github.com/video-dev/hls.js/blob/master/docs/API.md#maxaudioframesdrift

@chaosgrid
Copy link

We also have the audio-video sync issue I'm afraid. We are getting the sync issues for a "normal" lecture video which is very large and long (3 hours). I did not test the behaviour for shorter videos.

Any ETA for a fix?

@gkatsev
Copy link
Member

gkatsev commented Apr 17, 2020

We have some sync related fixes available in https://github.com/videojs/http-streaming master branch. Can you try it out and see if you are still sync issues?
We're in the final stages of testing what's in master, it's a long term refactor of VHS and improves a lot of things. More eyes on it would be great.

@osemolanoec
Copy link

Bump, we're having this issue with the latest releases of videojs up to 7.11.2.

@adgwytc
Copy link

adgwytc commented Feb 13, 2023

Bumo, I am also seeing this issue. Can you pleaase provide an update or is this still a known bug with videojs?

@aurelstocheci
Copy link

Bump. Using Video.js 8.3.0 and the desync issue is still there.

@mister-ben
Copy link
Contributor

Closing this old issue. A new detailed issue on the http-streaming repo with a reproducible case (test stream) would be better.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 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

10 participants