mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Fix faulty MP3 bitrate and frame size calculation (fixes #134)
This commit is contained in:
+1
-3
@@ -24,9 +24,7 @@
|
||||
chunked: true,
|
||||
chunkSize: 2**20
|
||||
});
|
||||
const outputFormat = new Mediabunny.Mp4OutputFormat({
|
||||
metadataFormat: 'mdta',
|
||||
});
|
||||
const outputFormat = new Mediabunny.Mp3OutputFormat({});
|
||||
|
||||
const button = document.createElement('button');
|
||||
button.textContent = 'Cancel';
|
||||
|
||||
+12
-1
@@ -14,7 +14,18 @@
|
||||
source: new Mediabunny.BlobSource(file),
|
||||
});
|
||||
|
||||
console.log(await input.getMetadataTags());
|
||||
console.log(await input.computeDuration());
|
||||
return;
|
||||
|
||||
const audioTrack = await input.getPrimaryAudioTrack();
|
||||
const sink = new Mediabunny.EncodedPacketSink(audioTrack);
|
||||
|
||||
for await (const packet of sink.packets()) {
|
||||
console.log(packet)
|
||||
}
|
||||
|
||||
console.log("Done")
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user