https://github.com/flavioribeiro/node-encoding-wrapper
A NodeJS wrapper for the Encoding.com API http://www.encoding.com/api/
https://github.com/flavioribeiro/node-encoding-wrapper
Last synced: 27 days ago
JSON representation
A NodeJS wrapper for the Encoding.com API http://www.encoding.com/api/
- Host: GitHub
- URL: https://github.com/flavioribeiro/node-encoding-wrapper
- Owner: flavioribeiro
- License: apache-2.0
- Created: 2015-12-01T17:07:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-26T00:06:43.000Z (over 9 years ago)
- Last Synced: 2025-02-09T23:51:16.784Z (3 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node Encoding Wrapper
> A NodeJS wrapper for the Encoding.com API http://www.encoding.com/api/## Running tests
1. Clone it:
```sh
$ git clone [email protected]:flavioribeiro/node-encoding-wrapper.git
```2. Then go to the project's folder:
```sh
$ cd node-encoding-wrapper
```3. And finally run:
```shell
$ chmod a+x runtests.sh && ./runtests.sh
```## Example
```js
var EncodingApi = require('src/lib');
var Utils = require('src/utils');var api = new EncodingApi(encodingLogin, encodingPassword);
// getProfileFromFile() receives the destination of output as second parameter
var hlsProfile = Utils.getProfileFromFile('profiles/hls.json', 'ftp://usr:[email protected]/hls_output/');api.addMedia('http://flv.io/video.mp4', hlsProfile, function(res) {
if (res.errors) {
throw new Error(res.errors.error);
} else {
console.log("done");
}
});
```## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-awesome-new-feature`
3. Commit your changes: `git commit -m 'Add some awesome feature'`
4. Push to the branch: `git push origin my-awesome-new-feature`
5. Submit a pull request## License
This code is under [Apache License](https://github.com/flavioribeiro/video-thumbnail-generator/blob/master/LICENSE).