Skip to content

Installing FFmpeg

Kevin Van den Abeele edited this page May 12, 2020 · 7 revisions

The latest version of this plugin uses homebridge-camera-ffmpeg v1.0.0 which comes with a precompiled ffmpeg that support all the needed things (omx/aac-audio/...)

If you want a custom installation of ffmpeg please continue down below: FFmpeg is required for this plugin to work. Note that not al precompiled FFmpeg binaries have support for audio! The Raspberry pi section contains the script needed to build a version that has support for audio!

If your FFmpeg does not support audio make sure to disable the audio in the video configuration! Otherwise FFmpeg will crash!

Mac OS (X64-86)

install via homebrew: brew install ffmpeg

Raspberry pi/other dev boards (ARM)

The new official Homebridge Raspberry Pi image comes with a precomiled FFmpeg with audio support, I suggest using that!

Compile ffmpeg and install it on the device:

#!/bin/bash

# install build tools
sudo apt-get install git pkg-config autoconf automake libtool libx264-dev

# (optional) if you need alsa support you will need the ALSA runtime library
sudo apt-get install libasound2-dev

# download and build fdk-aac
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./autogen.sh
./configure --prefix=/usr/local --enable-shared --enable-static
make -j4
sudo make install
sudo ldconfig
cd ..

# download and build ffmpeg
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
./configure --prefix=/usr/local --arch=armel --target-os=linux --enable-omx-rpi --enable-nonfree --enable-gpl --enable-libfdk-aac --enable-mmal --enable-libx264 --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-demuxer=rtsp
make -j4
sudo make install

cd ..
rm -rf FFmpeg
rm -rf fdk-aac

It might be handiest to put this in a script file and run it that way! This will take up to an hour, be patient!