75lb / handbrake-js

Video encoding / transcoding / converting for node.js
Other
568 stars 69 forks source link

Add option to set a custom HandBrakeCLI path #62

Closed SmolSoftBoi closed 3 years ago

SmolSoftBoi commented 3 years ago

To be able to pass our own HandBrake CLI Path as an option.

75lb commented 3 years ago

Handbrake-js installs the HandbrakeCLI binary in the node_modules/handbrake-js/bin folder, so as a temporary solution you can override the installed binary using symlinks.. For example, on a mac with handbrake-js installed globally, this will override the installed HandbrakeCLI with a new version stored in my Downloads folder:

ln -s ~/Downloads/HandbrakeCLI /usr/local/lib/node_modules/handbrake-js/bin/HandbrakeCLI
SmolSoftBoi commented 3 years ago

That works as a temporary solution, but would still really like to see this included.

75lb commented 3 years ago

Should this feature be added to the CLI, Node.js API or both?

If we're adding it to the CLI, should we add it as an extra option? E.g.

$ handbrake --input something.mov --output another.mp4 --HandbrakeCLI-path ./something/HandbrakeCLI

Or some other way? A config file?

SmolSoftBoi commented 3 years ago

I feel like this should be part of the API, the HandBrake CLI is the executable.

For example:

hbjs.spawn({
  input: 'something.avi',
  output: 'something.m4v',
  cliPath: './something/HandbrakeCLI'
});
75lb commented 3 years ago

This is fixed on master, will post again once it is released..

75lb commented 3 years ago

Released in v6.0.0

75lb commented 2 months ago

Can also now set HandbrakeCLI path via an environment variable