Solving Live Feed Issues with Homebridge and Unifi Protect

Hey everyone! I wanted to share my experience with setting up live feeds using Homebridge and the Unifi Protect plugin. Initially, I was facing some challenges, but I figured it out and thought I’d document the process for anyone else who might be stuck.

The Problem:
I installed Homebridge on my M1 Mac and set up the Unifi Protect plugin to stream live feeds from my cameras. Everything seemed to work fine at first, but when I tried to access the live feed, all I got was a snapshot that updated every few seconds. No smooth live video! I checked my ffmpeg installation through Homebrew, but the path wasn’t being recognized by the plugin. Frustrating!

The Solution:
After some research, I realized the issue was with how ffmpeg was being referenced. The path I was using /opt/homebrew/Cellar/ffmpeg/ wasn’t the correct one for the plugin. I needed to point it to the actual executable file. Here’s what worked for me:

  1. Install ffmpeg: If you haven’t already, install ffmpeg using Homebrew. Open Terminal and run:
    bash
    brew install ffmpeg

  2. Find the ffmpeg Path: Locate where ffmpeg is installed on your system. You can do this by running:
    bash
    which ffmpeg

This should return a path like /usr/local/bin/ffmpeg.

  1. Update Homebridge Plugin Settings: In the Unifi Protect plugin configuration, specify the full path to the ffmpeg executable. For example:

{
“ffmpegPath”: “/usr/local/bin/ffmpeg”,
" cameras": […]
}

  1. Restart Homebridge: After making these changes, restart Homebridge to apply the new settings.

The Result:
Now, I have smooth live feeds from all my cameras! It was a bit of a puzzle, but breaking it down step by step really helped. I hope this helps someone else avoid the frustration I felt.

Additional Tips:

  • Make sure your network connection is stable, as this can affect video streaming quality.
  • If you’re still having issues, check the Homebridge logs for any error messages. They often provide clues about what’s going wrong.
  • Don’t hesitate to reach out to the community for help. Someone might have encountered the same issue and found a workaround!

Happy streaming! :movie_camera::sparkles: