Skip to content

Commit eed9d27

Browse files
committed
Add multiple-output example
1 parent 420b61b commit eed9d27

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

examples/node/multiple-output.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const fs = require('fs');
2+
const { createFFmpeg } = require('../../src');
3+
4+
const ffmpeg = createFFmpeg({ log: true });
5+
6+
(async () => {
7+
await ffmpeg.load();
8+
await ffmpeg.write('flame.avi', '../../tests/assets/flame.avi');
9+
await ffmpeg.run('-i flame.avi -map 0:v -r 25 out_%06d.bmp');
10+
ffmpeg.ls('/').filter((p) => p.endsWith('.bmp')).forEach((p) => {
11+
fs.writeFileSync(p, ffmpeg.read(p));
12+
});
13+
14+
process.exit(0);
15+
})();

0 commit comments

Comments
 (0)