feat: Add support for custom MP4 metadata with mdta format (#132)

* feat: Add support for custom MP4 metadata with mdta format

- Add metadataFormat option ('mdir' | 'mdta') to IsobmffOutputFormatOptions
- Implement complete mdta format with keys box generation
- Enable custom metadata fields readable by ffmpeg/ffprobe
- Maintain backward compatibility with default mdir format

* Refactor ISOBMFF metadata tag writing logic

* Autism

---------

Co-authored-by: tanfu <[email protected]>
Co-authored-by: Vanilagy <[email protected]>
This commit is contained in:
DragonZ
2025-09-18 23:41:08 +02:00
committed by GitHub
co-authored by tanfu Vanilagy
parent d426d36386
commit 420423bc0f
7 changed files with 141 additions and 65 deletions
+5 -3
View File
@@ -24,7 +24,9 @@
chunked: true,
chunkSize: 2**20
});
const outputFormat = new Mediabunny.FlacOutputFormat({});
const outputFormat = new Mediabunny.Mp4OutputFormat({
metadataFormat: 'mdta',
});
const button = document.createElement('button');
button.textContent = 'Cancel';
@@ -92,7 +94,7 @@
},
*/
video: () => ({
discard: true,
//discard: true,
//discard: true,
//crop: {
// left: 0,
@@ -126,7 +128,7 @@
//width: 200,
//height: 100,
}),
tags: {} ?? {
tags: {
title: 'Bigggy',
artist: 'Buck Bunny',
images: [{