mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 03:13:51 +02:00
Add support for reading/writing non-square pixel video frames (fixes #309)
This commit is contained in:
+4
-3
@@ -26,7 +26,7 @@
|
||||
chunked: true,
|
||||
chunkSize: 2**20
|
||||
});
|
||||
const outputFormat = new Mediabunny.MpegTsOutputFormat({});
|
||||
const outputFormat = new Mediabunny.Mp4OutputFormat({});
|
||||
|
||||
const button = document.createElement('button');
|
||||
button.textContent = 'Cancel';
|
||||
@@ -104,8 +104,9 @@
|
||||
},
|
||||
*/
|
||||
video: () => ({
|
||||
forceTranscode: true,
|
||||
width: 1280,
|
||||
//forceTranscode: true,
|
||||
//forceTranscode: true,
|
||||
//width: 1280,
|
||||
//forceTranscode: true,
|
||||
//allowRotationMetadata: false,
|
||||
//width: 720,
|
||||
|
||||
+4
-11
@@ -17,18 +17,11 @@
|
||||
source: new Mediabunny.BlobSource(file),
|
||||
});
|
||||
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
const track = await input.getPrimaryAudioTrack();
|
||||
const sink = new Mediabunny.AudioSampleSink(track);
|
||||
|
||||
for await (const sample of sink.samples()) {
|
||||
sample.close();
|
||||
}
|
||||
const videoTrack = await input.getPrimaryVideoTrack();
|
||||
const sink = new Mediabunny.VideoSampleSink(videoTrack);
|
||||
|
||||
console.log(i);
|
||||
}
|
||||
|
||||
console.log("Done")
|
||||
const sample = await sink.getSample(await videoTrack.getFirstTimestamp());
|
||||
console.log(sample);
|
||||
|
||||
/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user