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

[HLSTree] Reworked multivariant playlist parser #1349

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

CastagnaIT
Copy link
Collaborator

@CastagnaIT CastagnaIT commented Aug 3, 2023

Description

Superseed closed PR #1342 because i preferred rewrite part of the parser to solve in better way the parsing problem mentioned here #1342 (comment)

Problem solved:

  • On manifest with multi-codec video streams we are creating adaptation sets with mixed codecs, this was causing problems with the "Ask quality" stream selector (show mixed codecs) and adaptive streaming, also because currently we cant know in advance what codecs are supported, as dash spec we should have when possible each adaptation set with a single codec
  • On manifests that contains EXT-X-STREAM-INF audio variants, was wrongly added as a video streams causing broken playback, this can be shown by using "Ask quality" stream selector where wrong video streams are shown with lack of metadata
  • On manifests that contains EXT-X-STREAM-INF audio only and no video streams, are unplayable

Other changes:
The HLS parser now dont have the needs of the "adaptation sets merging" that was inside the AdaptiveTree::SortTree method, so now has been reworked for dash case only, the reason behind is due to amazon manifests that appears to have uncommon adaptation sets with same data, for this reason i have add a new test case AdaptionSetMerge so to not forgot in future this peculiarity.

AdaptiveTree::SortTree method now does exactly what it describes and does not merge adpsets.

i am somewhat puzzled as to how "adaptation sets merging" was in the past implemented because:

  • wipe out adaptation sets data
  • for example on this manifest SwitchingManifestExample.txt there are different protection levels i may be wrong but it would be good to keep this and other possible different data

Moving this code i have also limited the adaptation set merging with adaptation sets containing the same codec, currently mixing more codecs to the same adaptation set can cause broken playback, because we have no way to determine supported codecs in advance and also currently there is no way to fallback if playback dont works with a specific codec

fix #1259

How has this been tested?

https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-hoh-subs.ism/.m3u8
https://storage.googleapis.com/shaka-demo-assets/apple-advanced-stream-ts/master.m3u8

and HLS audio stream from
https://stream.rtl.lu/live/hls/radio/rtllx

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • I have read the Contributing document
  • My code follows the Code Guidelines of this project
  • My change requires a change to the Wiki documentation
  • I have updated the documentation accordingly

@CastagnaIT CastagnaIT added Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality Component: HLS v21 Omega labels Aug 3, 2023
@CastagnaIT CastagnaIT merged commit a3782c1 into xbmc:Omega Aug 15, 2023
9 checks passed
@CastagnaIT CastagnaIT deleted the hls_rework_multivariant branch August 15, 2023 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: HLS Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inputstream adaptive can not play hls without video
2 participants