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

Support WebM file format #582

Open
vibbix opened this issue Jun 16, 2022 · 1 comment
Open

Support WebM file format #582

vibbix opened this issue Jun 16, 2022 · 1 comment

Comments

@vibbix
Copy link

vibbix commented Jun 16, 2022

We are looking to read metadata from a WebM file. WebM is a subset of the MKV standard and is documented here:
https://www.webmproject.org/docs/container/

Examples are included here:
https://www.webmfiles.org/demo-files/
https://commons.wikimedia.org/wiki/File:Volcano_Lava_Sample.webm

@drewnoakes drewnoakes changed the title [SUGGESTION] Support WebM file format Support WebM file format Jun 16, 2022
@nikolajovickg
Copy link

nikolajovickg commented Aug 28, 2024

I've created some EBML parser inside metadata-extractor for extracting metadata from matroška and webm. I'll need to tidy up the code and decide which metadata to extract and which to ignore.
Don't know whether to recursively parse all the data, I think seek locations could be ignored, and some other things.
For MVP I think audio/video codecs, doctype, mux and writing program names, framerate, duration, resolution should suffice. Perhaps, some user tags too but due to nested and repetitive structure I don't know how to name them (should I flatten them with some suffix attached or something?)
Some derivative metadata is needed to be useful, I think (such as frameRate and duration which is derived from several fields)
The crude output for volcano webm sample is:

Id: EBML_READ_VERSION size: 1 value 1
Id: EBML_MAX_ID_LENGTH size: 1 value 4
Id: EBML_MAX_SIZE_LENGTH size: 1 value 8
Id: DOCTYPE size: 4 value webm
Id: DOCTYPE_VERSION size: 1 value 2
Id: DOCTYPE_READ_VERSION size: 1 value 2
Id: SEGMENT size: 53054851 value MASTER: 
--Id: SEEK_HEAD size: 46 value MASTER: 
----Id: SEEK size: 11 value MASTER: 
------Id: SEEK_ID size: 4 value 0x1549A966
------Id: SEEK_POSITION size: 1 value 223
----Id: SEEK size: 12 value MASTER: 
------Id: SEEK_ID size: 4 value 0x1654AE6B
------Id: SEEK_POSITION size: 2 value 300
----Id: SEEK size: 14 value MASTER: 
------Id: SEEK_ID size: 4 value 0x1C53BB6B
------Id: SEEK_POSITION size: 4 value 53053999
--Id: VOID size: 162 value VOID
--Id: SEGMENT_INFO size: 65 value MASTER: 
----Id: TIMESTAMP_SCALE size: 3 value 1000000
----Id: MUXING_APP size: 11 value Lavf54.20.4
----Id: WRITING_APP size: 11 value Lavf54.20.4
----Id: SEGMENT_UUID size: 16 value 0xFFFFFFFFFDFFDFFF
----Id: DURATION size: 8 value 165468.0
--Id: TRACKS size: 4091 value MASTER: 
----Id: TRACK_ENTRY size: 64 value MASTER: 
------Id: TRACK_NUMBER size: 1 value 1
------Id: TRACK_UID size: 1 value 1
------Id: 0x9C [ unknown ] size: 1 value null 156
------Id: 0x22B59C [ unknown ] size: 3 value null 2274716
------Id: CODEC_ID size: 5 value V_VP8
------Id: TRACK_TYPE size: 1 value 1
------Id: 0x23E383 [ unknown ] size: 2 value null 2352003
------Id: 0xE0 [ unknown ] size: 22 value null 224
----Id: TRACK_ENTRY size: 4009 value MASTER: 
------Id: TRACK_NUMBER size: 1 value 2
------Id: TRACK_UID size: 1 value 2
------Id: 0x9C [ unknown ] size: 1 value null 156
------Id: 0x22B59C [ unknown ] size: 3 value null 2274716
------Id: CODEC_ID size: 8 value A_VORBIS
------Id: TRACK_TYPE size: 1 value 2
------Id: 0xE1 [ unknown ] size: 17 value null 225
------Id: 0x63A2 [ unknown ] size: 3949 value null 25506
--Id: CLUSTER size: 477741 value MASTER: `


nikolajovickg pushed a commit to nikolajovickg/metadataaddspatial that referenced this issue Aug 30, 2024
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

No branches or pull requests

2 participants