mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Standardize timestamp units in Matroska muxer
This commit is contained in:
+6
-6
@@ -36,11 +36,12 @@
|
||||
canvas.height = 720;
|
||||
const context = canvas.getContext('2d');
|
||||
|
||||
let format = new Metamuxer.MkvOutputFormat();// new Metamuxer.Mp4OutputFormat({ fastStart: false });
|
||||
let format = new Metamuxer.WebMOutputFormat();// new Metamuxer.MkvOutputFormat();// new Metamuxer.Mp4OutputFormat({ fastStart: false });
|
||||
let target = new Metamuxer.ArrayBufferTarget();
|
||||
|
||||
let output = new Metamuxer.Output({ format, target });
|
||||
|
||||
/*
|
||||
let videoSource = new Metamuxer.EncodedVideoChunkSource('avc');
|
||||
output.addTrack(videoSource);
|
||||
|
||||
@@ -67,14 +68,14 @@
|
||||
|
||||
console.log(target);
|
||||
download(new Blob([target.buffer]), 'test.mkv');
|
||||
*/
|
||||
|
||||
/*
|
||||
let videoSource = new Metamuxer.CanvasSource(canvas, {
|
||||
codec: 'avc',
|
||||
codec: 'vp9',
|
||||
bitrate: 1e6
|
||||
});
|
||||
let audioSource = new Metamuxer.AudioBufferSource({
|
||||
codec: 'aac',
|
||||
codec: 'opus',
|
||||
bitrate: 128e3,
|
||||
});
|
||||
|
||||
@@ -100,6 +101,5 @@
|
||||
await output.finalize();
|
||||
|
||||
console.log(target);
|
||||
download(new Blob([target.buffer]), 'test.mp4');
|
||||
*/
|
||||
download(new Blob([target.buffer]), 'test.webm');
|
||||
</script>
|
||||
Reference in New Issue
Block a user