diff --git a/bin/linux/x64/ffprobe b/bin/linux/x64/ffprobe new file mode 100755 index 0000000..1f17536 Binary files /dev/null and b/bin/linux/x64/ffprobe differ diff --git a/index.js b/index.js index 8897a81..7084cb3 100644 --- a/index.js +++ b/index.js @@ -1,19 +1,24 @@ // // With credits to https://github.com/eugeneware/ffmpeg-static // -var os = require('os') -var path = require('path') +var os = require('os'); +var path = require('path'); -var platform = os.platform() -if (platform !== 'darwin') { - console.error('Unsupported platform.') - process.exit(1) +var platform = os.platform(); +if (platform !== 'darwin' && platform !=='linux') { + console.error('Unsupported platform.'); + process.exit(1); } -var arch = os.arch() +var arch = os.arch(); if (platform === 'darwin' && arch !== 'x64') { - console.error('Unsupported architecture.') - process.exit(1) + console.error('Unsupported architecture.'); + process.exit(1); +} + +if (platform === 'linux' && arch !== 'x64') { + console.error('Unsupported architecture.'); + process.exit(1); } var ffprobePath = path.join( @@ -22,6 +27,6 @@ var ffprobePath = path.join( platform, arch, platform === 'win32' ? 'ffprobe.exe' : 'ffprobe' -) +); exports.path = ffprobePath;