-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Live Stream on Win10 & Edge/IE11 starts without sound #2323
Comments
We have already reported this here: #2286 |
Hmm, that sounds like something very OS related. Hls.js doesn't do anything at the level of handling various output device types like headset or other audio destinations. Did you raise a ticket with Microsoft? |
Thanks for the Feedback @tchakabam! |
@oomkat Ok understood. That's very interesting then! Let's investigate further. Can you backtrace to which version of Hls.js you can make it work, so we could figure what was the breaking change (i.e which one is actually used in G&L Streamtester?) That would be the easiest approach to quickly come to a guess where to look for the problem I would say. It most likely has something to do with MediaSource ingested fMP4 data-muxing, that's really the only plausible explanation if it comes to audio being played or not to me. However it is funny that the headphone thing makes it work ... Curious to find out! |
G&L Streamtester is based on version 10.1 |
presuming you mean v0.10.1. A possible starting point to investigate further when the breaking change came. A lot of stuff came with v0.11.x concerning things that might have caused this to break in MS browsers. Thanks for the hint :) |
Live AAC Audio-Only ES and fMP4 HLS Streams that exhibit the same No Audio issue in MS Edge: Also, off topic for this post, and should probably be another, but these four streams also contain fully HLS-compliant id3v2.4 metadata. We would like to see support for fMP4 emsg id3v2.4 metadata in hls.js. Please contact me for those details. A few years ago we supplied the details for ES (Elementary Stream) id3v2.4 metadata which hls.js already supports. This metadata can all be verified by playing the HLS streams in iTunes. |
@gogonowski That sounds like a problem with MSE in edge - when given fmp4 media, Hls.js passes them through to MSE with little modification. Can you test your stream in other players to see if they can play them?
|
the only tweak we make on the incoming fmp4 is adjusting fragment start DTS so that we control the append offset. this adjustment was introduced in https://github.com/video-dev/hls.js/releases/tag/v0.7.10 it would be interesting to compare 0.7.9 and 0.7.10 to see if it is coming from this adjustment. |
@mangui Could be - Nevermind, I forgot we only declare 1 SB for fmp4 streams, but if we messed up the timestamps I don't think that it would even play. Going to grab an Edge laptop and give it a go. |
Chiming in here to call out that I've seen this behaviour before a while ago (and forgot about it unfortunately) Can confirm that our solution was to perform a small seek operation immediately after playback begins |
Some more details:
|
The behavior I'm seeing is that time is advancing, but no audio plays. I tested the stream in my 1.0.0 branch and the audio plays fine; I did not modify the |
Thanks for the quick response on this. |
@mangui @johnBartos The stream we see the issue with uses MPEG-TS segments. And concerning changes causing the issue, keep in mind this isn't observable in version as new as v0.10.1 ! We are working on a fix atm to look at the root cause most probably related to the diff between v0.10.1 and latest. A workaround is indeed to nudge the playhead, but we would like to understand the actual change causing Edge to drop all audio frames apparently. |
need to nudge timeline to cause hlsjs to reinit audio controller, issue referenced at video-dev/hls.js#2323
The issue is getting fixed by reverting this chunk ok a PR that was supposed to fix PTS compensation: https://github.com/video-dev/hls.js/pull/2030/files#diff-92ec9c117a188d62ae4becd0540933d6L1370 EDIT: This was part of the v0.12.0 release. @johnBartos @michaelcunningham19 Could you still remember why this was removed? Wasn't it out of scope of the initial PR intention (i.e not related to any remuxing and timestamp application to samples) but rather a consequence that Gap-controller should take care of this? EDIT: AFAIR this was removed because this kind of playhead nudging is supposed to be done by Gap-controller. What I found out here is that the stream where this is failing (see above, to access, please use Germany located proxy to access, for example via a VPN provider) is one where the segments buffered first by Hls.js have their audio segments having their first PTS approx 10-20 ms (min/max variable) after the first PTS of the video stream. It seems that Edge shows a bug in this situation where video frames are available in the buffers timelines before audio. It will then play the video frames and even when audio frames become available at the played position it seems to just drop or ignore them. It's unclear wether they get decoded, but at least they don't get rendered/played-out. To be clear, this is a bug in Edge obviously (or usually other browsers will just not start at all from the requested position or skip the audio gap on their own, but dropping audio all together seems defective to me). But this issue will not show if we handle the audio gap on our side by nudging the playead to the first A/V syncable position (and Edge allows us to do that via its buffered time-ranges output). Which is something that Gap-controller should do. We also see that Edge would advertise buffered time-ranges in a way that take respect of the A/V syncability (frames overlaying in fact). So the first buffered range corresponds to the audio part buffered. When we check that with the chunk of code above, we just step forward right to where audio is actually buffered again. This kind of playhead nudging should be done by gap-controller. So something is wrong there I would assume, as I had indicated in a previous still WIP PR of mine. I would try to further resolve it there. I wouldn't know how else than with playhead nudging this could be resolved. We can not cut away the video frames since we would have to do that up to the next key-frame (IDR sample) eventually. And that would affect seeking accuracy / random access as well as lead to loading data on startup which would not get effectively buffered and played out. Let me know your thoughts, or wether you think we missed something here! Thanks! |
@OrenMe I am working on a nicer fix in case you are interested ^ I.e reverting the above chunk might already help you, or actually add that to Kaltura instead of a magic number ;) |
need to nudge timeline to cause hlsjs to reinit audio controller, issue referenced at video-dev/hls.js#2323
use waiting and stalled events additionnaly for stall detection refactor logic split fix for startup stalls of livestreams fix for sound missing on edge on startup when audio gaps occuring fix for issue video-dev#2323 and other related
+ add hotfix patch to fix issue video-dev#2323
use waiting and stalled events additionnaly for stall detection refactor logic split fix for startup stalls of livestreams fix for sound missing on edge on startup when audio gaps occuring fix for issue video-dev#2323 and other related
use waiting and stalled events additionnaly for stall detection refactor logic split fix for startup stalls of livestreams fix for sound missing on edge on startup when audio gaps occuring fix for issue video-dev#2323 and other related document all initalized members in constructor document better polling logic
I'm testing this on Edge Windows 10 and the stream doesn't even start. It also does not appear to be fixed by #2359. What I am seeing is that something just causes the parent manifest to be reloaded (maybe a retry but I haven't identified an error) so all we see if buffering and eventually Edge runs out of memory. @oomkat When I request the child manifests in Chrome, they return a proper playlist, but when they are requested in Edge or I |
@robwalch |
Fix for issue #2323: gap-controller: fix logic and improve behavior in edge cases
use waiting and stalled events additionnaly for stall detection refactor logic split fix for startup stalls of livestreams fix for sound missing on edge on startup when audio gaps occuring fix for issue #2323 and other related document all initalized members in constructor document better polling logic
What version of Hls.js are you using?
0.12.4
What browser and OS are you using?
Win10 & Edge or IE11
Test stream:
https://hls-js.netlify.com/demo/?src=https%3A%2F%2Fmcdn.daserste.de%2Fdaserste%2Fde%2Fmaster.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsImVuYWJsZVdvcmtlciI6dHJ1ZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xLCJ3aWRldmluZUxpY2Vuc2VVcmwiOiIifQ==
Checklist
Steps to reproduce
Please provide clear steps to reproduce your problem
Open the demo page on a Win10 system in Edge or IE11
If the bug is intermittent, give a rough frequency
Happens every time
Expected behavior
Livestream plays with video and audio
Actual behavior
Livestream plays without audio hearable
But:
The text was updated successfully, but these errors were encountered: