Init commit

This commit is contained in:
Jerome Wu
2019-10-20 22:37:37 +08:00
commit a1334c60f3
15 changed files with 160 additions and 0 deletions

10
examples/transcode.js Executable file
View File

@@ -0,0 +1,10 @@
const fs = require('fs');
const ffmpeg = require('../src');
const { argv } = process;
const [,, inputPath, outputPath] = argv;
(async () => {
await ffmpeg.load();
const data = ffmpeg.transcode(inputPath, outputPath.split('.').pop());
fs.writeFileSync(outputPath, data);
})();