mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 10:53:50 +02:00
Fix interleaving of chunks in finalize()
This commit is contained in:
+3
-3
@@ -39,7 +39,7 @@
|
||||
const context = canvas.getContext('2d');
|
||||
|
||||
let format = new Metamuxer.WebMOutputFormat({ streamable: false });
|
||||
//format = new Metamuxer.Mp4OutputFormat({ fastStart: false }); // new Metamuxer.MkvOutputFormat();// new Metamuxer.Mp4OutputFormat({ fastStart: false });
|
||||
format = new Metamuxer.Mp4OutputFormat({ fastStart: 'fragmented' }); // new Metamuxer.MkvOutputFormat();// new Metamuxer.Mp4OutputFormat({ fastStart: false });
|
||||
let target = new Metamuxer.BufferTarget();
|
||||
|
||||
/*
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
output.addVideoTrack(videoSource);
|
||||
output.addAudioTrack(audioSource);
|
||||
//output.addSubtitleTrack(subtitleSource);
|
||||
output.addSubtitleTrack(subtitleSource);
|
||||
|
||||
output.start();
|
||||
|
||||
@@ -174,5 +174,5 @@ Testing... <00:17.350>One... <00:18.125>Two...
|
||||
await output.finalize();
|
||||
|
||||
console.log(target);
|
||||
download(new Blob([target.buffer]), 'test.webm');
|
||||
download(new Blob([target.buffer]), 'test.mp4');
|
||||
</script>
|
||||
Reference in New Issue
Block a user