Improve docs

This commit is contained in:
Vanilagy
2025-09-21 23:41:10 +02:00
parent 608c769a7e
commit 63145c9ced
3 changed files with 19 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@ Here's a long list of stuff this library does:
- Input and output streaming, arbitrary file size support
- File location independence (memory, disk, network, ...)
- Utilities for compression, resizing, rotation, cropping, resampling, trimming
- Metadata tag reading & writing (title, artist, cover art, custom tags, attached files, etc.)
- Transmuxing and transcoding
- Microsecond-accurate reading and writing precision
- Efficient seeking through time
+15
View File
@@ -33,6 +33,14 @@ if (audioTrack) {
audioTrack.numberOfChannels;
audioTrack.sampleRate; // in Hz
}
// Extract metadata tags
const tags = await input.getMetadataTags();
tags.title; // Title
tags.date; // Release date
tags.images[0]; // Cover art
tags.raw['TBPM']; // Custom tags
// ...
```
::: info
@@ -242,6 +250,12 @@ const audioSource = new AudioBufferSource({
});
output.addAudioTrack(audioSource);
// Set some metadata tags
output.setMetadataTags({
title: 'My Movie',
artist: 'Me',
});
await output.start();
// Add some video frames
@@ -512,6 +526,7 @@ const conversion = await Conversion.init({
start: 0,
end: 60,
},
tags: {}, // Remove any metadata tags
});
await conversion.execute();