forked from jpopilek/ffprobe-static
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ffprobe-static | ||
==== | ||
|
||
Static binaries for `ffprobe`. OSX only at the moment, please send a PR if you would like to help with adding support for other platforms. | ||
|
||
Based on <https://github.com/eugeneware/ffmpeg-static>. | ||
|
||
Usage | ||
---- | ||
|
||
```js | ||
var ffprobe = require('ffprobe-static'); | ||
console.log(ffprobe.path); | ||
``` | ||
|
||
Acknowledgements | ||
---- | ||
|
||
Special thanks to [eugenware](https://github.com/eugeneware) for <https://github.com/eugeneware/ffmpeg-static>, which this is based upon. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// With credits to https://github.com/eugeneware/ffmpeg-static | ||
// | ||
var os = require('os') | ||
var path = require('path') | ||
|
||
var platform = os.platform() | ||
if (platform !== 'darwin') { | ||
console.error('Unsupported platform.') | ||
process.exit(1) | ||
} | ||
|
||
var arch = os.arch() | ||
if (platform === 'darwin' && arch !== 'x64') { | ||
console.error('Unsupported architecture.') | ||
process.exit(1) | ||
} | ||
|
||
var ffprobePath = path.join( | ||
__dirname, | ||
'bin', | ||
platform, | ||
arch, | ||
platform === 'win32' ? 'ffprobe.exe' : 'ffprobe' | ||
) | ||
|
||
exports.path = ffprobePath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "ffprobe-static", | ||
"version": "1.0.0", | ||
"description": "Static binaries for ffprobe.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "tape tests/*" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/joshwnj/ffprobe-static.git" | ||
}, | ||
"keywords": [ | ||
"ffprobe", | ||
"ffmpeg" | ||
], | ||
"author": "joshwnj", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"tape": "^4.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var tape = require('tape'); | ||
var fs = require('fs'); | ||
var ffprobe = require('..'); | ||
|
||
tape('ffprobe path should exist on fs', function (t) { | ||
var stats = fs.statSync(ffprobe.path); | ||
t.ok(stats.isFile(ffprobe.path)); | ||
t.end(); | ||
}); |