Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwnj committed Jul 20, 2015
1 parent d6ac458 commit 41c6ee3
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
19 changes: 19 additions & 0 deletions README.md
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 added bin/darwin/x64/ffprobe
Binary file not shown.
27 changes: 27 additions & 0 deletions index.js
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;
22 changes: 22 additions & 0 deletions package.json
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"
}
}
9 changes: 9 additions & 0 deletions tests/index.js
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();
});

0 comments on commit 41c6ee3

Please sign in to comment.