mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Promisified version of the `save`: https://github.com/damianociarla/node-ffmpeg#save-the-file Thanks! /cc @msrumon Closes #45882
18 lines
382 B
TypeScript
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
|
|
}
|
|
})();
|