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

Add support for multiple EXT-X-MAP tags (updated) #3859

Merged

Conversation

elv-peter
Copy link
Contributor

This PR will...

Support multiple EXT-X-MAP tags. I modified #3312 work on the current master (tag v1.0.2)

Why is this Pull Request needed?

Fix #1990 (Broken playback with multiple EXT-X-MAP in fmp4 HLS). That is, this allows splicing multiple videos together with discontinuities.

Verified with https://storage.googleapis.com/gaetan/hls.js/master-fmp4-bug.m3u8 (that it cuts to the commercial and back)

Are there any points in the code the reviewer needs to double check?

Instead of having one global init segment in LevelDetails, I gave each segment/fragment a pointer to its init segment (EXT-X-MAP declares the init segment for all subsequent media segments until the next EXT-X-MAP)

Resolves issues:

#1990

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@elv-peter elv-peter changed the title Support multiple EXT-X-MAP tags #3312 Add support for multiple EXT-X-MAP tags (updated) May 5, 2021
@robwalch robwalch added this to the 1.0.4 milestone May 5, 2021
@robwalch
Copy link
Collaborator

robwalch commented May 10, 2021

Hi @elv-peter,

I just pushed a change that resolves conflicts in stream-controller changes in v1.0.3.

I ran the functional tests locally (npm run test:func) and am seeing issues with the Apple LL-HLS fmp4 stream:
https://deploy-preview-3859--hls-js-dev.netlify.app/demo/?src=https%3A%2F%2Fll-hls-test.apple.com%2Fcmaf%2Fmaster.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==
This warning indicates that there is an issue with these changes:

[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes.

It looks like the init segment isn't being assigned properly in this case. Can you take a look?

@elv-peter
Copy link
Contributor Author

elv-peter commented May 13, 2021

I've been working on a fix for LL-HLS delta playlists - they may not have init segments so we have to get them from previous state - which shows improvement, but the passthrough-remuxer.ts still warns sometimes

@elv-peter
Copy link
Contributor Author

OK, I think I fixed it. Please take a look

src/loader/m3u8-parser.ts Show resolved Hide resolved
@robwalch robwalch merged commit b34e8b8 into video-dev:master May 17, 2021
@elv-peter elv-peter deleted the v1.0.2/bugfix/multi-ext-x-map-init branch June 9, 2021 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken playback with multiple EXT-X-MAP in fmp4 HLS.
2 participants