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).
106 stars 12 forks source link

Possible install issue on Apple Silicon #44

Closed shamoon closed 2 years ago

shamoon commented 2 years ago

Describe The Bug: Hey, I noted the install bug in v0.0.11 , after a few users reported issues with my plugin I upgraded the dependency to v0.1.0 but still a bunch of users are having the same issue, everything installs but binary never does. Im having trouble getting clear reports but essentially when my plugin goes to use the binary, its not there. They have tried installing with UI and CLI. If youre curious heres the thread: https://github.com/homebridge-simplisafe3/homebridge-simplisafe3/discussions/334 .

To Reproduce: I cant test myself, users are installing on M1 macs

Expected behavior: Plugin dependency installs and pulls ffmpeg binary

install output:

node install.js downloading ffmpeg from https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg -darwin-x86_64. tar. gz
Download Complete yld(57041]: Library not loaded: /usr/local/opt/libx11/lib/libX11.6.dylib 
Referenced from: /Users/blandgren/.npm/_ffmpeg_for_homebridge/ffmpeg 
Reason: tried: '/usr/local/opt/libx11/lib/libX11.6.dylib' (no such file), '/usr/local/lib/libX11.6.dylib' (no such file), '/usr/lib/libX11.6.dylib' (no such file)

Screenshots:

Environment:

Thanks for the plugin, its been great overall.

Edit: updated to reflect that I think this is related to Apple Silicon installs

shamoon commented 2 years ago

Finally got a helpful report,

node install.js downloading ffmpeg from https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg -darwin-x86_64. tar. gz
Download Complete yld(57041]: Library not loaded: /usr/local/opt/libx11/lib/libX11.6.dylib 
Referenced from: /Users/blandgren/.npm/_ffmpeg_for_homebridge/ffmpeg 
Reason: tried: '/usr/local/opt/libx11/lib/libX11.6.dylib' (no such file), '/usr/local/lib/libX11.6.dylib' (no such file), '/usr/lib/libX11.6.dylib' (no such file)

So looks like it downloaded x86. I assume should be https://github.com/homebridge/ffmpeg-for-homebridge/releases/download/v0.1.0/ffmpeg-darwin-arm64.tar.gz , Im asking them to try that

bjurusik commented 2 years ago

I had homebridge-ring and ffmpeg-for-homebridge setup and running fine on my Apple silicone Mac for the past several weeks. I performed a clean OS install the other day and went to re-install homebridge and the various plugins, and I now get the "Streaming video only - ffmpeg was not found. See https://github.com/dgreif/ring/wiki/FFmpeg for details" even though I installed ffmpeg. I tried a few previous versions with the same result. Is this also related to the binary not being found as described above?

UPDATE (5/16): Installing the ARM64 version addressed the issue and now I no longer get the "ffmpeg was not found" error. Is it possible to update the install instructions on the main page with the link to the ARM64 version of the file?

shamoon commented 2 years ago

Was this fixed by #45?

(certainly seems so e.g. https://github.com/homebridge/ffmpeg-for-homebridge/compare/v0.1.0...v0.1.4#diff-0822e3f136b1cdc9851b85ef5ee5b55c2f8a0b5570413bd20cb8d02804fadb5aR21 but I dont have an m1 to test)

donavanbecker commented 2 years ago

this was fixed in v0.1.0

shamoon commented 2 years ago

this was fixed in v0.1.0

This report was based on 0.1.0 and it looks like there are significant changes referring to M1 merged after that. Anyway, Im happy to update my plugin to 0.1.4 and will ask users to see if its resolved for them.

Thanks as always for your work!

donavanbecker commented 2 years ago

Use v0.1.0

Newest build will include updated versions of ffmpeg build