mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-04-27 12:32:23 +02:00
16 lines
434 B
TypeScript
16 lines
434 B
TypeScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
export class FFmpegFactory {
|
|
public static get(): any {
|
|
const ffmpeg = require('fluent-ffmpeg');
|
|
try {
|
|
const ffmpegPath = require('ffmpeg-static');
|
|
ffmpeg.setFfmpegPath(ffmpegPath);
|
|
const ffprobePath = require('ffprobe-static');
|
|
ffmpeg.setFfprobePath(ffprobePath.path);
|
|
} catch (e) {
|
|
// ignoring errors
|
|
}
|
|
return ffmpeg;
|
|
}
|
|
}
|