Raspberry PI

Normen Hansen edited this page Mar 5, 2018 · 2 revisions

FFmpeg

A suggested compilation configuration for ffmpeg on RasPi with enabled hardware H264 ENcoder and DEcoder that can also handle the RasPi internal camera stream as well as audio encoding looks as follows:

# 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
./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
  • You can use h264_omx as the "vcodec" parameter in the config.json to use the hardware h264 ENcoder
  • You can use -vcodec h264_mmal before the source URL to use the hardware h264 DEcoder, e.g. -vcodec h264_mmal -re -i rtsp://192.168.2.26/ipcam_h264.sdp
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.