Trying to build and install ffmpeg with hardware encoder and rtsp streaming enabled. Attempted to follow instructions here: (https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki/Raspberry-PI) but running ffmpeg command to test installation immediately results in "Illegal instructions".

Copying code from website here:

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

# download and build fdk-aac
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./configure --prefix=/usr/local --enable-shared --enable-static
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
sudo make install

Tried installing it this way (https://superuser.com/a/1082860), which didn't work -- resulted in "can't find command".

Tried this way (https://superuser.com/a/1069053), and couldn't even get past configure.

I'm at a complete lost. I figured I probably need instructions for cleaning up the mess I probably created from my attempts as well as how to actually get ffmpeg either compiled or downloaded for use with homebridge-camera-ffmpeg.



I also installed libfdk-aac-dev from deb-multimedia's list because the ffmpeg's .configure still complained about missing fdk-aac after the fdk-aac build. Is the deb-multimedia list installation the cause of my issues and did I officially put my RPi in hell? (see: https://www.raspberrypi.org/forums/viewtopic.php?p=1055179)

  • This may be of use raspberrypi.org/forums/viewtopic.php?f=38&t=199775 – CoderMike Feb 15 at 19:15
  • as far as I can see, the stock standard ffmpeg has RTSP enabled (I could be wrong about this), but omx-rpi and mmal are definitely present - also, the only reason to use fdk-aac is if you want to use HE-AAC, otherwise the builtin aac codec is on par with fdk-aac for 128kbit audio - and as SOON as I hit post, I see the magic word jessie in the title ... – Jaromanda X Feb 15 at 22:55
  • @JaromandaX Is Jessie the magic word that breaks all assumptions? Would upgrading to Stretch help things? I've read that stock ffmpeg are compiled for armv7 instead of armv6 that's in the Zero, thus the illegal instructions. Sorry, still a noob at this. – Matthew Wong Feb 15 at 23:18
  • it's just that as I said, ffmpeg in stretch probably has what you want without needing to compile – Jaromanda X Feb 16 at 0:00
  • @JaromandaX Great, thanks, I'll give it a shot. – Matthew Wong Feb 16 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.