This file explains how to build picam yourself. The whole process takes under an hour on Raspberry Pi 2 or 3.
$ sudo apt-get install git cmake libcamera-dev libharfbuzz-dev libfontconfig-dev libasound-dev libdrm-dev libegl-dev libepoxy-dev libssl-dev liblzma-dev
(NOTE: $
denotes command prompt. Do not enter $
when entering commands.)
Install fdk-aac with the following commands.
$ wget https://downloads.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-2.0.3.tar.gz
$ tar zxvf fdk-aac-2.0.3.tar.gz
$ cd fdk-aac-2.0.3
$ ./configure
$ make -j4
(takes 3-4 minutes)
$ sudo make install
NOTE: Do not use apt-get
for installing ffmpeg.
Download ffmpeg source and configure it:
$ git clone https://git.ffmpeg.org/ffmpeg.git
$ cd ffmpeg
$ ./configure --enable-libfdk-aac
(takes about one minute)
In the output of configure
, make sure that there is libfdk_aac
in Enabled encoders
.
Run the following commands to build and install ffmpeg.
$ make -j4
(takes 25-40 minutes)
$ sudo make install
Run ldconfig
in order to resolve dynamic linker problems.
$ sudo ldconfig
$ git clone https://github.com/iizukanao/picam.git
$ cd picam
$ mkdir build
$ cd build
$ cmake ..
$ make -j4
You can save some disk space by running strip
.
$ strip picam
Check if picam runs without errors.
$ ./picam --help