Init commit
This commit is contained in:
10
examples/transcode.js
Executable file
10
examples/transcode.js
Executable 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);
|
||||
})();
|
||||
Reference in New Issue
Block a user