-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
HLS - Live stream with fMP4 - infinite loading #1191
Comments
@avelad based on your screenshot, it appears your content has not been set up for CORS. If you enable CORS on your server, what happens? |
@vaage , I just tested and I see the same behaviour. |
@avelad When I try to run your content, I get errors about no access control allow origin. Unless CORS is set-up correctly on the server us to test with, we won't be able to look into this issue. |
@vaage, you can use --disable-web-security in Chrome to work around CORS for the sake of debugging. |
Thanks @joeyparrish. When I run your content what I see is:
Which is similar to what your screenshot showed, however it looks like to me (and maybe @joeyparrish) can comment on this too, is that your content times do not line-up with the presentation, so the player is stuck waiting for your content to start. @joeyparrish is that accurate? |
@vaage, I tested the same stream in Safari, AVPlayer (iOS), ExoPlayer (Android), hls.js and in all it works |
From the log posted by @vaage, it seems that the video and audio timestamps (as understood by our parser) are very different. (26304s for video and 50044175s for audio) Probably, our parser is doing something wrong. We'll take a look. Thanks! |
In the video stream:
In the audio stream:
Our HLS parser makes a bad assumption that the timescale is 90000, which is only true for TS content. |
I've been able to fix the parser locally with regard to timescale, but I still have an issue with your content. It seems that the WebVTT segments have some bad timestamp info in them. For example:
TS timestamp of 8070850976 is 89676.12s, but the corresponding audio & video segments have timestamps of 93910850.6s. For these to align, the MPEGTS timestamp in the vtt file would need to be "8451976554000". If we take these apart in hex, it becomes apparent that the timestamp has rolled over at 33 bits:
The bottom 33 bits are very very close, and a quick google search shows that this seems to be a thing in MPEG that libraries have to deal with. We'll fix the MP4 parsing first, then come back to the rollover issue. |
@joeyparrish , do you have any update? We want use fmp4 with HLS, but this issue is limiting us. |
No, I'm sorry. Not yet. |
I just pushed the first fix, which fixes assumptions about the timescale in MP4 HLS content. After that, we need to deal with rollover on load. After that, ideally, we should also deal with rollover which occurs during playback. Given that this happens every 1.1 days in TS or HLS+VTT, end-users will definitely encounter this in live streams. |
We can now parse the MP4 timescale from the MP4 init segment. Issue #1191 Change-Id: Ideaace6e1d5bfb5192a269b91601030b9b4ac53c
Thanks @joeyparrish . I just tested the fix for MP4 timescale and it works!. Can you migrate this fix to 2.3.x? |
Yes, this will be in v2.3.1. I hope to land rollover fixes in v2.3.1 as well. |
If we see that the timestamps of any HLS live stream are over the rollover limit, we will offset other streams by that limit until they and in the same range as the non-rollover streams. For example, an MP4 stream has no rollover, but an associated segmented VTT text stream will be mapped to MPEGTS timestamps which do rollover. So we offset the VTT timestamps until they are in the same range as the rest of the content. This does not handle the case where timestamps roll over during playback. Issue #1191 Change-Id: I53bd0c5925601f3a432d653ddfa8a2652db84d71
All of the rollover-related fixes are now in. |
We can now parse the MP4 timescale from the MP4 init segment. Issue #1191 Change-Id: Ideaace6e1d5bfb5192a269b91601030b9b4ac53c
If we see that the timestamps of any HLS live stream are over the rollover limit, we will offset other streams by that limit until they and in the same range as the non-rollover streams. For example, an MP4 stream has no rollover, but an associated segmented VTT text stream will be mapped to MPEGTS timestamps which do rollover. So we offset the VTT timestamps until they are in the same range as the rest of the content. This does not handle the case where timestamps roll over during playback. Issue #1191 Change-Id: I53bd0c5925601f3a432d653ddfa8a2652db84d71
When the MPEGTS field rolls over in HLS live WebVTT, we need to avoid our parsed cue timestamps rolling over as well. To achieve this, we simply ignore the X-TIMESTAMP-MAP tag once the segment index is built. Rollover in TS video and audio segments is handled by mux.js already. Closes #1191 Change-Id: Ie52734509921973ff47517fab34367ec413a6ca6
Cherry-picked to v2.3.1. |
Have you read the FAQ and checked for duplicate issues: Yes
What version of Shaka Player are you using: Master branch
Can you reproduce the issue with the latest code from
master
: YesAre you using the demo app or your own custom app: Demo
What browser and OS are you using: Chrome 63 / Firefox 57 in Ubuntu 17.10
What are the manifest and license server URIs:
(you can send the URIs to shaka-player-issues@google.com instead, but please use GitHub and the template for the rest)
https://cdn.demo.anevia.com/live/eds/dvb_txt/HLS-MP4/dvb_txt.m3u8 (HLS - Live stream with fMP4)
What did you do?
Load the stream
What did you expect to happen?
The video is reproduced
What actually happened?
The video is on infinite loading
The same stream in hls.js works: http://video-dev.github.io/hls.js/demo/
The text was updated successfully, but these errors were encountered: