DefinitelyTyped/types/ffmpeg/ffmpeg-tests.ts
Piotr Błażejewicz (Peter Blazejewicz) 491f394a3e
🤖 Merge PR #45892 feat(ffmpeg): async version of save by @peterblazejewicz
Promisified version of the `save`:

https://github.com/damianociarla/node-ffmpeg#save-the-file

Thanks!

/cc @msrumon

Closes #45882
2020-07-05 01:19:21 -07:00

18 lines
382 B
TypeScript

import ffmpeg from 'ffmpeg';
new ffmpeg('./test/mymovie.avi')
.then((video) => {
video.setVideoAspectRatio('16:9');
});
/// save
(async () => {
const video = await new ffmpeg('./test/mymovie.avi');
try {
const file = await video.save('./test/otherVideo.avi');
file; // $ExpectType string
} catch (error) {
// no-opt
}
})();