Giter Club home page Giter Club logo

Comments (21)

tsightler avatar tsightler commented on September 23, 2024

Is ffmpeg in the system PATH environment under which Homebridge is run? You can try setting "ffmpegPath" config option explicitly.

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

tsightler avatar tsightler commented on September 23, 2024

I suggest trying to add the ffmpegPath option to the Ring Homebridge config.

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

tsightler avatar tsightler commented on September 23, 2024

It really shouldn't be required, but I'm guessing some weird side effect running on Windows. It should be as simple as adding something like this just before the "platform": "Ring" (just tested and it let me add it):

"ffmpegPath": "C:\ffmpeg\bin\ffmpeg.exe",

I've not personally tested this plugin code on native Windows (the author potentially has but I have not) so I'm guessing a little bit, but as Windows as some unique path handling in node, I wonder if there's something wrong here.

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

tsightler avatar tsightler commented on September 23, 2024

And this only started with version 12.0.0 after Dusty made improvements to the audio.

What is confusing about that is that there were no changes in the way ffmpeg is referenced and the audio improvements were just the addition of a handful of additional flags to the existing ffmpeg options which produce a more consistent audio stream. There were no other changes (I know, I submitted the PR for the audio improvements).

It almost seems like your ffmpeg-for-homebridge package failed to install the binary, as that is the one that should be used. I don't understand why it is not being found.

Did you change anything else? Perhaps upgrade Node at the same time? I see you are on a pretty old version, perhaps try updating to the latest LTS version which is v18.17.1.

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

tsightler avatar tsightler commented on September 23, 2024

Try this adding this to the config and restarting:

"ffmpegPath": "ffmpeg",

That should force it to search the system path. Just a shot.

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

tsightler avatar tsightler commented on September 23, 2024

So I just went through the process of installing Homebridge on a Windows system, installed the Ring plugin, connected to Ring account, added to Home app, view a camera, worked perfectly. Found ffmpeg from the ffmpeg-for-homebridge package, no problem. Unfortunately, I don't know any other things to suggest. I'm using Node v18.17.1, but that's about the only difference I can think of. Followed the instructions at https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Windows-10 which I assume are the same steps you used.

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

tsightler avatar tsightler commented on September 23, 2024

Definitely 64-bit node, filename is node-v18.17.1-x64.msi. I don't do anything with 32-bit code anymore, and haven't for years on x86 platforms.

The code that is generating the message is super basic and largely unchanged going back years, so it's hard for me to even theorize what could be going wrong. Basically there's a single call to a function which is part of the @homebridge/camera-utils package, specifically, doesFfmpegSupportCodec('libfdk_aac', getFfmpegPath()). The primary goal of this call is to determine if the ffmpeg binary has libfdk_aac included, but a secondary result is if ffmpeg is not found at all.

Unless the ffmpegPath option has been manually set, as we tried above, the getFfmpegPath() call will return undefined and so camera-utils will use the path returned from importing ffmpegForHomebridgePath from the ffmpeg-for-homebridge package.

Is there definitely an ffmpeg.exe in you path in the ffmpeg-for-homebridge package? Should be in a path similar to:

C:\Users\<your_username>\AppData\Roaming\npm\node_modules\homebridge-ring\node_modules\ffmpeg-for-homebridge

And, if there is one in this path, what happens when you run ffmpeg.exe -version or ffmpeg.exe -codecs?

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

from ring.

tsightler avatar tsightler commented on September 23, 2024

So that version of ffmpeg probably doesn't help much since it doesn't have libfdk_aac, the output from that version of ffmpeg:
DEAIL. aac AAC (Advanced Audio Coding) (decoders: aac aac_fixed) (encoders: aac aac_mf)

Output of codecs from ffmpeg-for-homebridge:
DEAIL. aac AAC (Advanced Audio Coding) (decoders: aac aac_fixed libfdk_aac ) (encoders: aac libfdk_aac aac_mf )

I'd probably uninstall that ffmpeg version and focus on getting the ffmpeg-for-homebridge working as that is the recommended setup and should definitely work. Is there definitely an ffmpeg.exe in the homebridge-ring/node_modules/ffmeg-for-homebridge directory?

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

definitely

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

C:\Users\Admin\AppData\Roaming\npm\node_modules\homebridge-ring\node_modules\ffmpeg-for-homebridge.build\ffmpeg.exe

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

Its located in:
C:\Users\Admin\AppData\Roaming\npm\node_modules\homebridge-ring\node_modules\ffmpeg-for-homebridge.build\ffmpeg.exe

so I removed the ffmpeg path from the JSON config. Updated the node.js to the same 18.17.1.
still get the error.

I notice my ffmpeg.exe is in a folder called .build. Is that correct?

from ring.

arolnick1 avatar arolnick1 commented on September 23, 2024

And that fixed it. i moved the ffmpeg.exe into the ffmpeg-for-homebridge foler, out of the .build folder and that fixed it. Your help was invaluable!!!!

from ring.

tsightler avatar tsightler commented on September 23, 2024

Interesting, so for some reason the install of ffmpeg-for-homebridge failed. The ffmpeg-for-homebridge package is basically just a small javascript file which downloads the correct pre-compiled binary for your platform. Immediately after installing the package this script is run and it creates the ffmpeg-for-homebridge.build folder to download the release binary into, then it should copy it to the ffmpeg-for-homebridge directory and delete the temporary directory. Obviously those last two steps didn't happen in your case. Very strange, but glad you got it working.

I'll go ahead a close this.

from ring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.