Implement more powerful copy conversions, add conversion copy config, add OutputFormat.negativeTimestampSupport, fix Matroska duration from metadata computation

This commit is contained in:
Vanilagy
2026-09-08 14:42:03 +02:00
parent e1f3b5252b
commit a1ba54d337
7 changed files with 806 additions and 116 deletions
+15 -4
View File
@@ -25,7 +25,7 @@
chunked: true,
chunkSize: 2**20
});
const outputFormat = new Mediabunny.MovOutputFormat();
const outputFormat = new Mediabunny.Mp4OutputFormat();
const p = document.createElement('p');
p.textContent = 'Capturing...';
@@ -99,6 +99,8 @@
input,
output,
audio: {
discard: true,
//discard: true,
//codec: 'aac',
//forceTranscode: true,
//forceTranscode: true,
@@ -129,7 +131,9 @@
},
*/
video: {
height: 320,
forceTranscode: true,
//forceTranscode: true,
//height: 320,
//codec: 'avc',
//bitrate: new Mediabunny.Quality({
// quality: Infinity,
@@ -158,7 +162,8 @@
}
},
trim: {
end: 5,
//start: -60,
//end: 60,
//start: -2,
//end: 10,
//start: 300.14984567374756 - 100,
@@ -167,6 +172,12 @@
//start: startTime,
//end: startTime + 2,
},
copy: {
//mode: 'forced',
//mode: 'forced',
//shiftTolerance: Infinity,
//boundaryPolicy: 'shrink',
},
});
//console.log(conversion);
console.log(conversion.discardedTracks);
@@ -213,4 +224,4 @@
conversion = null;
input = null;
}, { once: true });
</script>
</script>