summaryrefslogtreecommitdiff
path: root/node_modules/ffmpeg-static/index.js
blob: acaf01825ca8e6b367e25e339f2d08b67c6af794 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var os = require('os')
var path = require('path')

var binaries = Object.assign(Object.create(null), {
  darwin: ['x64'],
  linux: ['x64', 'ia32', 'arm64', 'arm'],
  win32: ['x64', 'ia32']
})

var platform = os.platform()
var arch = os.arch()

var ffmpegPath = path.join(
  __dirname,
  platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg'
)

if (!binaries[platform] || binaries[platform].indexOf(arch) === -1) {
  ffmpegPath = null
}

module.exports = ffmpegPath