-
Notifications
You must be signed in to change notification settings - Fork 2
/
ffmpeg.js
27 lines (23 loc) · 614 Bytes
/
ffmpeg.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const ffmpeg = require('fluent-ffmpeg')
/**
* Static `ffmpeg(1)` binary path.
* @public
*/
const { FFPROBE_BIN_PATH = require('ffmpeg-ffprobe-static').ffprobePath } = process.env
/**
* Static `ffprobe(1)` binary path.
* @public
*/
const { FFMPEG_BIN_PATH = require('ffmpeg-static') } = process.env
// initial configuration for `ffmpeg` and `ffprobe` binary paths
// consumers of `fluent-ffmpeg` can overload the path on their own
ffmpeg.setFfmpegPath(FFMPEG_BIN_PATH)
ffmpeg.setFfprobePath(FFPROBE_BIN_PATH)
/**
* Module exports.
*/
module.exports = {
FFPROBE_BIN_PATH,
FFMPEG_BIN_PATH,
ffmpeg
}