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

Safari - Video stutters first initial seconds #2122

Closed
5 tasks done
intelligence opened this issue Feb 9, 2019 · 14 comments
Closed
5 tasks done

Safari - Video stutters first initial seconds #2122

intelligence opened this issue Feb 9, 2019 · 14 comments

Comments

@intelligence
Copy link

intelligence commented Feb 9, 2019

What version of Hls.js are you using?

0.12.2

What browser and OS are you using?

Safari 12.0.2 – macOS High Sierra 10.13.6

Test stream:

https://hls-js.netlify.com/demo/?src=https%3A%2F%2Fplayer.vimeo.com%2Fexternal%2F313759552.m3u8%3Fs%3Db537d0bec7626cbf3cbd54bb89e549e0d39c5d37&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsImVuYWJsZVdvcmtlciI6dHJ1ZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xLCJ3aWRldmluZUxpY2Vuc2VVcmwiOiIifQ==

Checklist

Steps to reproduce

Play video, initial first seconds will stutter. When playing video on vimeo.com there are no stutters (https://vimeo.com/313759552)

Expected behavior

No stutters

Actual behavior

Video stutters

Console output

@itsjamie
Copy link
Collaborator

@michaelcunningham19 Can you see the stutter? I wasn't able to repro myself.

@michaelcunningham19
Copy link
Member

michaelcunningham19 commented Feb 14, 2019

@itsjamie Yup, I was able to reproduce the stuttering in Safari (12.0)

Turning on Media Logging in Safari (verbose mode) revealed nothing of interest.

Maybe Media Lighthouse will reveal something

@michaelcunningham19
Copy link
Member

Play video, initial first seconds will stutter. When playing video on vimeo.com there are no stutters (https://vimeo.com/313759552)

@intelligence After looking at that, it appears vimeo.com is referencing a different stream entirely. On vimeo.com it's referencing a stream with fmp4 segments (with what looks like a custom JSON manifest)

screenshot 2019-02-13 22 46 05

☝️ Neat

@intelligence
Copy link
Author

Ah! Didn't even cross me that they'd use something else for their own player.

I'm getting some more reports from testing that the stutter is present on other videos as well. Is this a hls.js issue or something in the way that Vimeo transcode and serve these videos?

@intelligence
Copy link
Author

Sent an issue report to Vimeo regarding this issue and got this back:

After taking an extensive look at this, it appears that the stuttering is coming from the hls.js implementation in Safari. Here is why:

  1. Playing the hls manifest in Safari using the native player does not result in any stuttering.

  2. Playing the video at https://vimeo.com/313759552 on an iPhone which uses the m3u8 not the json manifest, resulted in no playback stuttering.

  3. Playing the hls manifest in VLC results in no playback trouble.

The only environment where this issue occurs is in hls.js, which is why this is not a error on our side.

Also, in regards to the video-dev comments on GitHub, we server the json manifest on the site and anywhere we can. Users have the ability to serve m3u8 and we serve it over to any device that can handle MPEG-DASH. So there answers/comments don't really pertain to your issue.

@michaelcunningham19
Copy link
Member

@intelligence 👍

Also, in regards to the video-dev comments on GitHub, we server the json manifest on the site and anywhere we can. Users have the ability to serve m3u8 and we serve it over to any device that can handle MPEG-DASH. So there answers/comments don't really pertain to your issue.

Yeah - I was simply calling out that there was a difference, that's all.

I'll take a closer look at this when time allows 😄 The next step would be to try running it through media lighthouse

@michaelcunningham19 michaelcunningham19 added Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Confirmed and removed Needs review labels Feb 28, 2019
@michaelcunningham19 michaelcunningham19 changed the title Video stutters first initial seconds Safari - Video stutters first initial seconds Feb 28, 2019
@intelligence
Copy link
Author

Hello again!

Is there some sort of help I can provide to help solve this issue? Let me know and I'll look into it.

@gkindel
Copy link
Contributor

gkindel commented Jun 4, 2019

I can repo on 0.12.4 but not v0.11.x

test link

@johnBartos
Copy link
Collaborator

Thanks for the test stream @gkindel. Unfortunately I don't see anything obvious in the logs, and it's still an issue in the 1.0.0 test branch. The next steps are to dump the stream into ffprobe and analyze the timings. It works in Chrome which leads me to believe that we have some safari-specific logic that is not working correctly.

@jhonalino
Copy link
Contributor

anyone looking into this issue ? I was able to reproduce this issue and fix it by reducing the liveSyncDuration as close to your chunk duration * 3 as possible, but reducing this causes playback getting stucks on microsoft edge, I'm experimenting with the different config that works with both safari and edge, but at the same time. not break other browsers that are currently working

@itsjamie itsjamie added browser: Safari and removed Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. labels Oct 29, 2019
@Gosha
Copy link

Gosha commented Jul 16, 2020

I did a git bisect between v0.11.0 and v0.12.0 and it looks like the stuttering started with commit 472614c

Further, bisecting between v0.12.0and master, shows the stuttering gets worse with commit 052feab

@robwalch
Copy link
Collaborator

robwalch commented Jul 18, 2020

See #2902

With e07232f, I don't see any stuttering in that build, but there is some glitching in the first second (https://deploy-preview-2902--hls-js-dev.netlify.app/demo/).

After removing changes to the composition time of frames 114e25d, the glitch is gone, but when starting playback from 0, the video briefly flashes transparent. This is reproducible on Vimeo if you seek back to 0 and play. It's not happening or not noticeable when starting playback from the poster fading to video (https://deploy-preview-2902--hls-js-dev.netlify.app/demo/).

@robwalch robwalch added this to the 0.14.4 milestone Jul 20, 2020
@robwalch robwalch removed the Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. label Jul 20, 2020
@robwalch
Copy link
Collaborator

Latest build with fix https://deploy-preview-2902--hls-js-dev.netlify.app/demo/

@Gosha
Copy link

Gosha commented Jul 20, 2020

Awesome!

#2902 fixes both the stuttering and glitching on Safari for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants