ffprobe-static
Version:
Static binaries for ffprobe.
28 lines (23 loc) • 603 B
JavaScript
//
// With credits to https://github.com/eugeneware/ffmpeg-static
//
var os = require('os');
var path = require('path');
var platform = os.platform();
if (platform !== 'darwin' && platform !=='linux' && platform !== 'win32') {
console.error('Unsupported platform.');
process.exit(1);
}
var arch = os.arch();
if (platform === 'darwin' && arch !== 'x64' && arch !== 'arm64') {
console.error('Unsupported architecture.');
process.exit(1);
}
var ffprobePath = path.join(
__dirname,
'bin',
platform,
arch,
platform === 'win32' ? 'ffprobe.exe' : 'ffprobe'
);
exports.path = ffprobePath;