Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "ffdevices", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "List all available media devices on FFMPEG. Supports Windows, OSX and Linux(coming soon)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,5 +0,55 @@ | ||
# ffdevices | ||
FFDevices for Node.js | ||
=== | ||
List all available media devices on [FFmpeg](https://www.ffmpeg.org/). Supports Windows, OSX and Linux(coming soon) | ||
## Sample Windows result | ||
## Installation | ||
Via npm: | ||
```sh | ||
$ npm install ffdevices --save | ||
``` | ||
## Prerequisites | ||
#### FFmpeg | ||
You need to have ffmpeg version >= 2.0.7 for this to work. This is the oldest version I tested but it may work on older version also. | ||
Note: If you downloaded the static build most probably `FFMPEG_PATH` environment variable is not yet set. You have two options: | ||
1. Find the location of the ffmpeg `bin` directory and add it to your `PATH`. | ||
2. Set the custom `FFMPEG_PATH` using the [`ffdevices.#ffmpegPath`](#ffmpegPath) | ||
## Usage | ||
```js | ||
var ffdevices = require('ffdevices') | ||
ffdevices.getAll(function(error, devices) { | ||
if(!error) { | ||
console.log(devices) | ||
} | ||
}) | ||
``` | ||
## .ffmpegPath | ||
You can set custom `FFMPEG_PATH` using `ffdevices.ffmpegPath` | ||
```js | ||
ffdevices.ffmpegPath = 'C:\\ffmpeg\\bin\\ffmpeg.exe' //PATH to the ffmpeg file. | ||
ffdevices.getAll(function(error, devices){ | ||
if(!error) { | ||
console.log(devices) | ||
} | ||
}) | ||
``` | ||
## .gdigrab(Windows only) | ||
[gdigrab](https://ffmpeg.org/ffmpeg-devices.html#gdigrab) is the desktop capturer for windows. By default it is enabled, you can disable it if you don't want to include it. Pass this command before you call `.getAll()`. | ||
```js | ||
ffdevices.gdigrab = false | ||
ffdevices.getAll(...) | ||
``` | ||
### Sample Windows result | ||
``` | ||
[ { name: 'Desktop Capture', | ||
@@ -32,3 +82,3 @@ type: 'video', | ||
## Sample OSX result | ||
### Sample OSX result | ||
``` | ||
@@ -51,1 +101,7 @@ [ { name: 'Built-in iSight', | ||
``` | ||
## TODO | ||
* Linux support([video4linux2](https://ffmpeg.org/ffmpeg-all.html#video4linux2_002c-v4l2)) | ||
* Compatibility test to other platforms and machines. | ||
## Related Package | ||
* [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg) - Fluent ffmpeg-API for node.js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18437
106