mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-01 04:43:51 +02:00
Merge branch 'main' into hls
This commit is contained in:
+11
-5
@@ -2,9 +2,11 @@
|
||||
|
||||
<script src="../dist/bundles/mediabunny.cjs"></script>
|
||||
<script src="../packages/mp3-encoder/dist/bundles/mediabunny-mp3-encoder.js"></script>
|
||||
<script src="../packages/ac3/dist/bundles/mediabunny-ac3.js"></script>
|
||||
|
||||
<script type="module">
|
||||
//MediabunnyMp3Encoder.registerMp3Encoder();
|
||||
MediabunnyAc3.registerAc3Encoder();
|
||||
|
||||
const fileInput = document.createElement('input');
|
||||
fileInput.type = 'file';
|
||||
@@ -24,7 +26,7 @@
|
||||
chunked: true,
|
||||
chunkSize: 2**20
|
||||
});
|
||||
const outputFormat = new Mediabunny.Mp4OutputFormat({});
|
||||
const outputFormat = new Mediabunny.MpegTsOutputFormat({});
|
||||
|
||||
const button = document.createElement('button');
|
||||
button.textContent = 'Cancel';
|
||||
@@ -56,7 +58,9 @@
|
||||
}),
|
||||
output,
|
||||
audio: (_, n) => ({
|
||||
discard: n > 1,
|
||||
//codec: 'eac3',
|
||||
//discard: true,
|
||||
//discard: n > 1,
|
||||
//codec: 'opus',
|
||||
//codec: 'opus',
|
||||
/*
|
||||
@@ -101,7 +105,9 @@
|
||||
*/
|
||||
video: () => ({
|
||||
forceTranscode: true,
|
||||
allowRotationMetadata: false,
|
||||
width: 1280,
|
||||
//forceTranscode: true,
|
||||
//allowRotationMetadata: false,
|
||||
//width: 720,
|
||||
//frameRate: 30,
|
||||
//bitrate: Mediabunny.QUALITY_VERY_LOW,
|
||||
@@ -181,8 +187,8 @@
|
||||
}
|
||||
},
|
||||
trim: {
|
||||
start: 0,
|
||||
//end: 4
|
||||
//start: 0,
|
||||
//end: 10
|
||||
},
|
||||
});
|
||||
console.log(conversion);
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<script src="../dist/bundles/mediabunny.cjs"></script>
|
||||
<script src="../packages/ac3/dist/bundles/mediabunny-ac3.js"></script>
|
||||
|
||||
<script type="module">
|
||||
MediabunnyAc3.registerAc3Decoder();
|
||||
|
||||
const fileInput = document.createElement('input');
|
||||
fileInput.type = 'file';
|
||||
document.body.append(fileInput);
|
||||
@@ -51,6 +54,8 @@
|
||||
}
|
||||
*/
|
||||
|
||||
console.log("Done")
|
||||
|
||||
/*
|
||||
|
||||
//const secondPacket = await sink.getNextPacket(firstPacket);
|
||||
|
||||
Reference in New Issue
Block a user