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

fix(toDash): Format grouping into AdaptationSets #462

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

absidue
Copy link
Collaborator

@absidue absidue commented Aug 4, 2023

This pull request should fix the long standing issue with dash.js' getBitrateInfoListFor not working correctly, that was reported on the discord server a while back. It also addresses the more recent issue with some videos that have multiple audio tracks, also having a broken one.

FreeTubeApp/FreeTube#3843

Instead of the previous AdaptationSet groupings that were done with the entire mime type with codecs parameter string and by audio track id, this pull request uses the mime type, codec without the level and profile information, the colour information and the audio track ids. This new grouping system will make sure that all AV1 and h264 streams go into one adaption set each, instead of a different one for every different profile and level, while making sure that the VP9 streams are still correctly separated into SDR and HDR groups.

Test URLs:
Video with broken audio track: https://youtu.be/UJeSWbR6W04
4K HDR with surround sound: https://youtu.be/njX2bu-_Vw4
Multiple audio languages: https://youtu.be/1WEAJ-DFkHE

@LuanRT LuanRT merged commit 1ff3e1a into LuanRT:main Aug 9, 2023
@absidue absidue deleted the fix-dash-sets branch August 9, 2023 21:53
Wykerd added a commit that referenced this pull request Aug 9, 2023
LuanRT added a commit that referenced this pull request Aug 18, 2023
* deps: update linkedom

* refactor!: remove YTNodeGenerator in favour of namespaced pure functions

BREAKING CHANGES:
- Removes `YTNodeGenerator` from `import('youtubei.js').Generator` and exposes its functions directly in `import('youtubei.js').Generator`

* refactor!: replace Parser class with pure functions

- Remove Parser class in favour of pure functions
- Merge duplicate classes `AppendContinuationItemsAction` into a single class
- Move continuation parsers into a seperate file
- Add better custom logging support to parser methods as per issue #460

* refactor!: replace Proto class with pure functions

* chore: update package-lock.json

* refactor!: replace FormatUtils with pure functions and JSX components

- Replace linkedom DASH manifest generation with a dependency free JSX implementation
- Remove FormatUtils class in favour of pure functions
- Remove DOMParser requirement
- Remove duplicate types

* refactor: implement changes from #462

* chore: lint

* fix: deno support

* fix: render valid xml document

* fix: wrong function call in DashUtils

* fix: typo in parser

Co-authored-by: LuanRT <[email protected]>

* refactor!: move streaming info logic into seperate function

This allows users to access the same data available in the dash manifest while also simplifying the manifest generation

* chore: lint

* refactor: readability improvements & fixes

Remove redundant getAudioTrackGroups
General readability improvements in StreamingInfo.ts
Share response object between `getBitrate` and `getMimeType` as to not make duplicate requests

* build: remove unnecessary step in deno build

Co-authored-by: absidue <[email protected]>

* refactor: move types to `types` directory

* docs: add back comments lost during refactor

* chore: lint

---------

Co-authored-by: LuanRT <[email protected]>
Co-authored-by: absidue <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants