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

Issue/118 iso box parsing #124

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Issue/118 iso box parsing #124

wants to merge 16 commits into from

Conversation

littlespex
Copy link
Collaborator

@littlespex littlespex commented Jan 22, 2025

Description

Resolves #118

Adds ISO BMFF box parser and utilities.

import { findBoxByType, filterBoxesByType, parseBoxes, ftyp, mvhd, sidx, styp } from '@svta/common-media-library/isobmff';

const url = 'test_frag.mp4';
const response = await fetch(url);
const arrayBuffer = await response.arrayBuffer();
const config = { 
  parsers: { 
    ftyp, 
    styp, 
    mvhd, 
    sidx 
  }, 
  recursive: true,
};

const parsed = parseBoxes(arrayBuffer, config);
const box = findBoxByType('stsd', arrayBuffer, config)
const boxes = filterBoxesByType('mfhd', arrayBuffer, config);

Requirements Checklist

  • All commits have DCO sign-off from the author
  • Unit Tests updated or fixed
  • Docs/guides updated

@littlespex littlespex requested review from a team as code owners January 22, 2025 03:20
see: #118
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
@littlespex littlespex force-pushed the issue/118-iso-box-parsing branch from 0e5a9d5 to 0abb0c3 Compare January 22, 2025 03:23
Signed-off-by: Casey Occhialini <[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.

Implement ISO Box parsing
1 participant