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

feat: CMAF-Ham #87

Merged

Conversation

nicolaslevy
Copy link
Contributor

Description

This is the CMAF-Ham PoC done in the MonteVIDEO Summer camp 2024.

HLS and DASH stand as the predominant video streaming technologies currently. Consequently, users often encounter challenges such as converting between HLS and DASH, manipulating manifests, and programmatically understanding manifest structures.

The Common Media Application Format (CMAF) for segmented media (ISO/IEC 23000-19) addresses these challenges by defining a universal format based on ISOBMFF. Additionally, it introduces the Hypothetical Application Model, a framework illustrating the practical usage of CMAF segments and fragments in streaming applications. This project is inspired by the principles outlined in the CMAF standard and the [Hypothetical Application Model] (Hypothetical Application Model).

In this version it is possible to do a basic conversion between HLS <- HAM -> DASH.

Also a new sample/ folder is added to the project to showcase basic usage of the tools. The cmaf-ham-converter is a basic example of how to use CMAF-Ham to convert HLS <- HAM -> DASH from some basic HLS and DASH Manifests.

Requirements Checklist

  • Unit Tests updated or fixed
  • Docs/guides updated

NoeliaBentancor and others added 30 commits March 1, 2024 11:29
@nicolaslevy nicolaslevy requested review from a team as code owners May 8, 2024 16:05
@littlespex
Copy link
Collaborator

@nicolaslevy For some reason I'm not able to resolve the DCO issues. Are you able to run the steps to correct the missing DCO sing-offs?

https://github.com/streaming-video-technology-alliance/common-media-library/pull/87/checks?check_run_id=24739226164

Signed-off-by: Nicolas Levy <[email protected]>
@littlespex littlespex merged commit 5d55802 into streaming-video-technology-alliance:feat/cmaf-ham May 20, 2024
2 checks passed
littlespex added a commit that referenced this pull request Jun 5, 2024
* Fix line issue

* Add byterange and url to track

* feat: Upgraded way to get codecs, frame rate, sar and number of segments.

* Add map to hls manifest

* Add quotes

* feat: Set und as empty language. Upgrade getChannels feature

* Add quotes

* Add sample cases

* Delete unnecesary tests

* Fix mapMpdToHam to parse mimeType, name and SegmentList

* fix: Fix tests.

* Delete test files and update newline formatter

* Fix typo issue

* Format code

* feat: Add 4 more samples that should be playable with a player.

* Working on converting mpd to ham and ham to mpd making it playable

* Fix mapMpdToHam and mapHamToMpd to consider segment list case, now mpdsample5 is working

* Fix mapMpdToHam and mapHamToMpd to consider segment list case, now mpdsample5 is working

* Change tabs for spaces in mpdSample5.ts

* Put original mpdSample5 xml code

* feat: Fix audio properties. Reduce long functions file.

* Undo eslint brace style log level change

* Update test imports

* Add playlist for manifest samples and fix undefined issue

* Delete output folder

* Convert tracks types to lower case when comparing

* Change the way unhandled undefined attributes are set

* Change hls manifest url

* Fix mapHamToHls checks

* fix: fix types export

* Fix Manifest import

* feat: Add some CMAF-HAM documentation

* feat: Set version to alpha instead of beta.

* feat: Create default export for cmaf-ham

* Add media-sequence and playlist type in hls resulting manifest

* Add end list tag

* Add documentation for track validity

* Add documentation for track validity type

* fix: Fix duration from mapper.

* fix: Update doc description.

* Update lib/src/cmaf/ham/mapper/hls/mapHamToHls.ts

Co-authored-by: Patricio Carrau <[email protected]>
Signed-off-by: Noelia Bentancor <[email protected]>

* Delete unnecesary condition

* feat: Fix mapper from ham to dash

* feat: Fix mapper from ham to dash. Add function description

* feat: Add documentation.

* feat: Remove comment

* feat: Upgrade ham to mpd timescale conversion.

* feat: Change ham to mpd function names.

* Fix byterange

* Delete unnecesary test

* feat: Update function names. Create unit tests.

* feat: Add more tests

* Add check for segment byterange

* Add url init to ham

* Format init url

* Add init url

* Delete unnecesary comment

* Delete unnecesary manifest sample

* Change track name to filename

* Extract initialization url to another function

* Update lib/src/cmaf/ham/mapper/hls/mapHamToHls.ts

Co-authored-by: Matías Rodriguez <[email protected]>
Signed-off-by: Noelia Bentancor <[email protected]>

* Add white space and white space encoded

* Delete harcoded code

* Add constants file in utils

* Change attribute name for file

* Fix text track hls map

* Fix text track for concating

* Fix representation mime type

* Delete test

* Fix expression condition

* Fix get url init function@

* Refactor code

* Improve code

* Improve code

* feat: Create HLS integration tests.

* Change types to lowercase

* Place hls and dash manifest in mappers folder

* Delete manifest samples

* Fix HLS to DASH conversion

* Add documentation for track

* Refactor mapHlsToHam

* Add more unit tests. Remove byteRange when unnecessary

* feat: Refactor HLS to be easier to understand and test. Remove old files.

* Create three constants for timescale, and put comments to explain some temp decisions

* Update TODO comment

* Set sample rate values as constants.

* Fix TARGETDURATION in HLS conversion

* Add hls unit tests

* Change m3u8 to hls

* Fix consistency in hls and dash nomenclature

* Update documentation

* Fix nomenclature issue related to hls and dash

* Add documentation for track

* Change uppercase in track formats

* Change nomenclature

* Refactor code

* Update documentation

* Change names

* Change name

* Update documentation

* Add more documentation

* Add aligned switching set type

* Types improvements

* Change map ham to dash

* Fix variable names

* Refactor code@

* Place hls manifest at the top of the code

* Update MPD tests with new HAM. Reformat hsl to ham mapper.

* Fix merge

* Fix imports

* Add first approach of readme

* Modify readme

* Add overview and features of the project

* Add features of the project in readme

* Improve documentation

* Change readme

* Change frameRate to two attributes numerator and denominator

* Fix merge problems.

* Update sample rate comments and constants.

* comments

* Change frameRate to a type with two values and put some constants to retrieve frameRate

* Delete validation track

* Fix typo error and put FrameRate type definition at the bottom of VideoTrack

* feat: Fix border cases for HLS. Move HLS samples. Update and fix tests.

* Methods refactor

* Use zero instead of undefined for denominator

* feat: Separate code into functions. Create tests.

* Create validation service

* Upgrade HlsManifest type. Fix some border cases. Add and fix tests.

* Remove validateTracks.ts file

* Delete track validation

* Introduce prevValidation in the validate methods to do avoid repeating code

* Fix PR comments.

* Update lib/src/cmaf/README.md

* Delete arrow functions

* Add prevValidation param to the docs in validate methods and create tests

* Remove string constants with samples. Set all samples to mpd or m3u8.

* Readd samples

* Delete unused file

* Support having SegmentList tag outside Representation tag and update tests

* Fix frameRate parsing

* Fix how the audio and subtitle groups are handled

* Change subtitleTracks name to textTracks to use ham concepts

* Fix failing test and types import

* Move conversion of the track to VideoTrack inside the if statement

* Add frameRate to Representation in Dash

* Update manifest 3

* Add docs.

* Delete unnecesary playlists

* Remove unnecesary playlists

* Fix dash tests.

* Add condition in track

* Fix hls tests.

* Fix some ham tests.

* Add new case when getting url from template

* Fix sample 2

* Delete functions

* Add imports

* Delete unnecesary spaces

* Update imports

* fix: Fix multiple tests. Remove old hls sample. Add new tests.

* Changed deepEqual to deepStrictEqual. Fix hls tests.

* Add more typedoc documentation.

* Add examples to validate.ts

* Use fileName if exists or the track id if fileName attribute does not exist.

* Undo changes in package.json

* Add docs to ham to dash and ham to dash

* Fix HLS sample 1 references

* Fix documentation

* Fix documentation

* Fixes in punctuation

* fixes in validation

* Modify targer duration

* reorder cmaf-ham files

* cmaf-ham: move tests from src/ to test/

* samples: added cmaf-ham-conversion sample

* samples: cmaf-ham-conversion fix typo in readme

* mapHamToHls: change default HLS EXT-X-VERSION from 1 to 7

* cmaf-man-conversion: export a file with the result of the validations

* cmaf-ham-conversion: README improvements

* cmaf-ham-conversion: added serve and player instructions in README

* deleted prettier and unused packages

* Functions are separated in new files  and the imports are refactored

* cmaf-ham-conversion: rename output folder to dist

* cmaf-ham-conversion: fix dependencies

* cmaf-ham-conversion: remove not needed dependencies

* add samples to workspaces and move cmaf-ham-conversion folder

* fix remove prettier scripts from package.json

* cmaf-ham.ts: fix blank space in

* fix some doc warnings

* Update .eslintrc.json

Signed-off-by: Casey Occhialini <[email protected]>

* move types to separate files

* move types to separate files

Signed-off-by: Casey Occhialini <[email protected]>

* Updated CHANGELOG.md

Signed-off-by: Nicolas Levy <[email protected]>

---------
Signed-off-by: Noelia Bentancor <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Nicolas Levy <[email protected]>
Co-authored-by: Noelia Bentancor <[email protected]>
Co-authored-by: DuckyCB <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Patricio Carrau <[email protected]>
Co-authored-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
littlespex added a commit that referenced this pull request Jun 5, 2024
feat: CMAF-Ham (#87)

---------

Signed-off-by: hernan <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Hernán Reyes <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: hernan <[email protected]>
Signed-off-by: Hernán Reyes <[email protected]>
Signed-off-by: Nicolas Levy <[email protected]>
Signed-off-by: Noelia Bentancor <[email protected]>
Co-authored-by: Hernán Reyes <[email protected]>
Co-authored-by: Nicolas Levy <[email protected]>
Co-authored-by: Noelia Bentancor <[email protected]>
Co-authored-by: DuckyCB <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Patricio Carrau <[email protected]>
littlespex added a commit that referenced this pull request Jun 5, 2024
feat: CMAF-Ham (#87)

---------

Signed-off-by: hernan <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Hernán Reyes <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: hernan <[email protected]>
Signed-off-by: Hernán Reyes <[email protected]>
Signed-off-by: Nicolas Levy <[email protected]>
Signed-off-by: Noelia Bentancor <[email protected]>
Co-authored-by: Hernán Reyes <[email protected]>
Co-authored-by: Nicolas Levy <[email protected]>
Co-authored-by: Noelia Bentancor <[email protected]>
Co-authored-by: DuckyCB <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Patricio Carrau <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
littlespex added a commit that referenced this pull request Aug 28, 2024
feat: CMAF-Ham (#87)

---------

Signed-off-by: hernan <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Hernán Reyes <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: hernan <[email protected]>
Signed-off-by: Hernán Reyes <[email protected]>
Signed-off-by: Nicolas Levy <[email protected]>
Signed-off-by: Noelia Bentancor <[email protected]>
Co-authored-by: Hernán Reyes <[email protected]>
Co-authored-by: Nicolas Levy <[email protected]>
Co-authored-by: Noelia Bentancor <[email protected]>
Co-authored-by: DuckyCB <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Matías Rodriguez <[email protected]>
Co-authored-by: Patricio Carrau <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
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.

5 participants