Add VP9 and AV1 bitstream parsers for extracting codec info

This commit is contained in:
Vanilagy
2025-01-11 21:28:10 +01:00
parent 2d4df211d8
commit 61a4f1483a
4 changed files with 513 additions and 44 deletions
+3 -3
View File
@@ -39,7 +39,7 @@
const context = canvas.getContext('2d');
let format = new Metamuxer.WebMOutputFormat({ streamable: false });
format = new Metamuxer.Mp4OutputFormat({ fastStart: 'fragmented' }); // 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();
/*
@@ -84,7 +84,7 @@
*/
let videoSource = new Metamuxer.CanvasSource(canvas, {
codec: 'vp9',
codec: 'av1',
bitrate: 1e6
});
let audioSource = new Metamuxer.AudioBufferSource({
@@ -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.mp4');
download(new Blob([target.buffer]), 'test.webm');
</script>