oeuillot / node-matroska

Matroska library written for nodejs
GNU General Public License v3.0
26 stars 12 forks source link

Update schema for Matroska v4 #9

Closed chrmcg closed 2 years ago

chrmcg commented 2 years ago

This PR updates lib/schema.js to include definitions from Matroska version 4.

To generate these changes, I parsed ebml_matroska.xml (referenced in https://www.matroska.org/technical/elements.html), then upserted the results into the existing schema.js list. Thus no elements were deleted, but many were updated.

This update allowed me to use ts-ebml to add a Range tag (defined in v4) to a WebM video generated in the browser. If anyone wants to do the same, you can update your package.json as follows (at least until this PR is accepted/published):

 "dependencies": {
    // ...
    "matroska": "https://github.com/ArcadeHQ/node-matroska.git#matroska-v4",
    "ts-ebml": "^2.0.2",
    // ...
  },
  "overrides": {
    "matroska": "https://github.com/ArcadeHQ/node-matroska.git#matroska-v4"
  },

Let me know if I can do anything to improve this PR or otherwise help out :)

brianneisler commented 2 years ago

hey @chrmcg, really appreciate your work here and we're about to use it in our own application to support Matroska v4.

Given that this package hasn't seen any movement in almost 5 years and it itself is a fork of node-ebml which has a new maintainer who's been recently active, maybe we could get this PR opened against that instead?

chrmcg commented 2 years ago

@oeuillot Thanks for the merge!

Any chance you could make an npm release for this change?

oeuillot commented 2 years ago

Yes ... I will do it !

oeuillot commented 2 years ago

I have pushed an updated version of package.json which includes security upgrades. Can you check if it breaks something in your projects. I don't have time to test it today (and tomorrow) Thanks

stijnvanderpol commented 2 years ago

Hello 👋

Thanks @chrmcg for the PR and @oeuillot for the package. The latest version of master is working on my end. @oeuillot do you have an indication of when you're planning to publish version 2.2.4?

Thanks

oeuillot commented 2 years ago

Done !

nklhtv commented 2 years ago

For me this fails with Error: Invalid ebmlName 'TimecodeScale'