-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the HANDBRAKECLI_PATH environment variable.
- Loading branch information
Showing
5 changed files
with
73 additions
and
20 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
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
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
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,25 @@ | ||
import hbjs from 'handbrake-js' | ||
import path from 'path' | ||
import currentModulePaths from 'current-module-paths' | ||
const { __dirname } = currentModulePaths(import.meta.url) | ||
|
||
async function start () { | ||
const options = { | ||
input: path.resolve(__dirname, '../test/video/demo.mkv'), | ||
output: './tmp/output.mp4', | ||
preset: 'Very Fast 480p30' | ||
} | ||
|
||
const result = await hbjs.run(options) | ||
console.log(result) | ||
} | ||
|
||
start().catch(console.error) | ||
|
||
/* | ||
Run this example with the `HANDBRAKECLI_PATH` environment variable set, e.g.: | ||
$ HANDBRAKECLI_PATH=./tmp/HandbrakeCLI node examples/handbrakecli-path-env.js | ||
*/ |
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