jscodec / jswebm

A javascript implementation of the Webm Demuxer (matroska)
https://jscodec.github.io/jswebm-demo/
MIT License
87 stars 14 forks source link

How does one extract the metadata? #9

Open blurymind opened 6 years ago

blurymind commented 6 years ago

The example file doesn't seem to do anything. Is this library capable of extracting the metadata of the webm file?

If so, can you please provide a simple example of opening a webm file and logging its metadata to console? :)

brianxautumn commented 6 years ago

It does, do you have a specific sample file you were interested in, I’ll post a demo

blurymind commented 6 years ago

Hi, Thank you in advance. It doesn't have the greatest data - just some test strings

bird-meta.zip capture

I inserted the whole description of mkvtoolsinx inside the document title meta tag - just to test if I will hit a string character limit

If you can get any of these strings to print out, your library is awesome!

brianxautumn commented 6 years ago

Okay cool, I’ll post tonight, I’ll update the readme too, it’s pretty outdated

blurymind commented 6 years ago

Thank you @brianxautumn looking forward to it. I will also try (and use) it in my project :)

brianxautumn commented 6 years ago

I just threw something together super fast but I was able to demux your file. You actually have more elements that are technically not supported by webm, but it still parsed the majority of it. I can add in the missing elements. I need to overhaul a lot, and polish up the api, but if its useful to you let me know and I can add in specific functions for you.

brianxautumn commented 6 years ago

If okay with you I can post a demo with that file

blurymind commented 6 years ago

Of course its ok :) i would love to see a code snippet - I just need to extract a metadata string

What is the simplest way to do that with your library

blurymind commented 6 years ago

@brianxautumn can you share a link to the code snippet or just paste it here please :) I am eager to give this a try

blurymind commented 6 years ago

@brianxautumn was this ever made possible? :) it's such a trivial feature, yet there seem to be no pure javascript implementations out there to embed or retrieve metadata from webm files. It is kind of surprising how obscure this is

brianxautumn commented 6 years ago

Hey, don't know if you're still looking into this but putting together a reworked api and demo https://jscodec.github.io/jswebm/

blurymind commented 6 years ago

@brianxautumn I am still interested in this yes. Can the new implementation write/read/both metadata from a webm file? The link https://jscodec.github.io/jswebm/ leads to what looks like a json file - is that the result of an extracted metadata from an example webm?