mp4box.js icon indicating copy to clipboard operation
mp4box.js copied to clipboard

fix: add box(-like) names for sample entries

Open bradh opened this issue 5 months ago • 3 comments

Description

Adds display names for sample entries.

I use mp4box.js to display the file structure - https://gpac.github.io/mp4box.js/test/filereader.html or a local instance.

The box tree has names for most things, but not for sample entries. An example is shown below:

image

AFAICT, there are not really "box names" for these SampleEntry instances, but there is a reasonable description on the MP4RA web site - https://mp4ra.org/registered-types/codecs

Some of those aren't great, but I tried to keep close to the terms used there, especially for codecs that aren't very common.

bradh avatar Jun 28 '25 11:06 bradh

I fear these names might be too long to be displayed after the fourcc. Especially avs3. Maybe it would make sense to add these as description and display them when clicked on them or as an tooltip. What do you think?

DenizUgur avatar Jun 28 '25 16:06 DenizUgur

I agree with DenizUgur, maybe right above #boxtable Screenshot 2025-06-28 at 20 03 11

https://github.com/gpac/mp4box.js/blob/f714984222915b5954d4d50f1d7c4aa8949b2dc6/demo/filereader.html#L182-L183

Not sure, just a proposition :)

erwanvivien avatar Jun 28 '25 18:06 erwanvivien

I've reworked this to provide box(-like) names only where its what the specification describes. That sometimes means that there will not be an entry, such as where I didn't have the specification, or its not clear exactly what should be used. Not ideal, but no worse that what happens now, and can be extended later if anyone needs the sample entry types I didn't provide.

The upside is that its shorter, as well as more defensible. Being shorter, it can work with the current UI.

bradh avatar Jun 29 '25 00:06 bradh

:tada: This PR is included in version 1.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jul 10 '25 17:07 github-actions[bot]