Use IDBFS and NODEFS to process big file

This commit is contained in:
Jerome Wu
2019-12-03 22:06:44 +08:00
parent 72a2ff6e84
commit 3ab760b5bb
20 changed files with 215 additions and 162 deletions

View File

@@ -33,7 +33,7 @@
await worker.load();
message.innerHTML = 'Start transcoding';
await worker.write(name, files[0]);
await worker.run(`-i ${name} output.mp4`);
await worker.run(`-i /data/${name} output.mp4`, { inputPath: name, outputPath: 'output.mp4' });
message.innerHTML = 'Complete transcoding';
const { data } = await worker.read('output.mp4');