homebridge / ffmpeg-for-homebridge

Static FFmpeg binaries for Homebridge with support for audio (libfdk-aac) and hardware-accelerated decoding and encoding (h264_qsv, h264_v4l2m2m, videotoolbox).
109 stars 13 forks source link

Update the install package script to use /opt/homebridge/bin/node #50

Closed eoghanobrien closed 2 years ago

eoghanobrien commented 2 years ago

Is your feature request related to a problem? Please describe: Yes, https://github.com/dgreif/ring/issues/1072 - issue due to this project expecting node to be available on the system $PATH but homebridge has isolated/bundled node from the wider system (reasons available here: https://www.reddit.com/r/homebridge/comments/vusfib/homebridge_and_npm_node_locations_on_raspberry_pi/) ... leading to the homebridge-ring plugin failing to install.

Describe the solution you'd like: Update https://github.com/homebridge/ffmpeg-for-homebridge/blob/184e3c10633eea2b3d6c84d34800c572bab0c3e8/package.json#L16-L18

to:

  "scripts": {
    "install": "/opt/homebridge/bin/node install.js"
  },

Describe alternatives you've considered: It's possible to workaround the issue introduced here by updating ~/.homebridge/package.json and running /opt/homebridge/node npm install inside the ~/.homebridge directory.

Additional context: Can't think of anything else.

donavanbecker commented 2 years ago

Don't think this works with macOS though?

oznu commented 2 years ago

Node is in the $PATH when running in the Homebridge context.