Archives

All posts for the month Май, 2015

Blocking based on GeoIP data

Finally, you can choose to block whole countries, based on GeoIP data provided by MaxMind. Your NGINX install needs to have GeoIP support enabled though, this can be done at compile-time.
First, you need to tell NGINX where the GeoIP database is located on the filesystem. You can do this inside the http {}; configuration block:

Continue Reading

Build steps:

  1. Clean & purge old packages

Remove every package from the following list: x264, libx264-dev, libavcodec, libavcodec, libavfilter, libavfilter, libavresample, libavutil, libpostproc, libswresample, libswscale, ffmpeg.

You can search them with:
dpkg -S <package_name>

and then remove them (with –purge if necessary):
sudo apt-get remove <package_name>

Make sure that none of the above libraries are left in the linker’s path. Search them again with:
ldconfig -p | grep <library_name>

apt install autoconf automake build-essential pkgconf git
apt install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libjpeg-dev

  1. Build & install libx264

apt install autoconf automake build-essential pkgconf git

git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-shared --disable-opencl
make
sudo make install && ldconfig

  1. Build & install ffmpeg with x264 support

git clone git://git.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --arch=armhf --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-shared
make
sudo make install && ldconfig

  1. Build & install Mr-dave’s Motion fork

git clone https://github.com/Mr-Dave/motion.git
cd motion
autoreconf -fiv
./configure
make
sudo make install && ldconfig

wget http://sourceforge.net/projects/bananapi/files/ffmpeg_2.4-1_armhf.deb
sudo dpkg -i ffmpeg_2.4-1_armhf.deb

Continue Reading