How to compile Openmeetings: an audio and video conferensing program for Linux (Part 2)

If you are trying to build Openmeetings read the previous part of the guide first:http://www.techtimejourney.net/?p=875

Disclaimer: Remember that everything in this post is provided purely on educational purposes. If any harm should come to your system the author of this website withdraws from any responsibility. Also you should be noted that in case of Ffmpeg different codes of conduct may be applied to the usage of the Ffmpeg depending on your location.

Note: The things showcased in this post were done in .deb base but they should be suitable for a good adaptability in other distro bases as well (provided that some values and commands are changed accordingly. In the following Ffmpeg is build without Pulseaudio support because Pulseaudio can be quite resource hungry sometimes. For instructions on how to use Alsa see here: http://www.techtimejourney.net/?p=833

Definition: Ffmpeg

Ffmpeg is a set of programs which help your Linux box to provide a better multimedia experience. Also Ffmepg can be used to transcode some file types to another format if needed. The license is usually GPL but it can also be not free if certain non-free codecs exist in the host system.

Note: Please keep in mind that the actual package names presented in the following may be different depending on your system of choice. So if you see a dev package missing search it for example via package manager

Why build Ffmpeg manually?
You might need the later software sometimes or just some more functionality and control over your system. In this case the aim has been to provide  more functionality in order to prepare the ground for  Openmeetings video conferencing environment. The Ffmpeg plays essential role in Openmeetings functionality so that is one of the reason  it deserved some detailed attention.

Before you start:Remove libav-tools

Most systems these days have libav-tools installed as a default ( a fork of Ffmpeg doing similar things) and that causes a conflict. We do want to reduce the amount of conflicts of course  so we are removing libav-tools out of the way. As a root or a sudo do:

apt-get remove libav-tools

1.0 Making sure that the essential dependencies  are installed as they should be –> Do as a sudo or a root user in a terminal:

apt-get build-dep ffmpeg (installs at least the following: libatk1.0-dev libcairo-script-interpreter2 libcairo2-dev libcv-dev libcvaux-dev libdc1394-22-dev libgdk-pixbuf2.0-dev libgtk2.0-dev libhighgui-dev libilmbase-dev libjasper-dev libopencv-calib3d-dev libopencv-calib3d2.3 libopencv-contrib-dev libopencv-contrib2.3 libopencv-core-dev libopencv-core2.3 libopencv-dev libopencv-features2d-dev libopencv-features2d2.3 libopencv-flann-dev libopencv-flann2.3 libopencv-gpu-dev libopencv-gpu2.3 libopencv-highgui-dev libopencv-highgui2.3 libopencv-imgproc-dev libopencv-imgproc2.3 libopencv-legacy-dev libopencv-legacy2.3 libopencv-ml-dev libopencv-ml2.3 libopencv-objdetect-dev libopencv-objdetect2.3 libopencv-video-dev libopencv-video2.3 libopenexr-dev libpango1.0-dev libpixman-1-dev libtbb2 libxcb-render0-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxi-dev libxrandr-dev x11proto-composite-dev x11proto-damage-dev  x11proto-randr-dev)

1.1 Install some more packages to boost the functionality

apt-get install subversion yasm sox checkinstall binutils build-essential git-svn git-core libgnutls-dev librtmp-dev libv4l-dev libvpx-dev libx264-dev libopenal-dev libmp3lame-dev libmp3lame0 subversion x11proto-core-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-video-dev x11proto-xext-dev xindy xindy-rules xtrans-dev yasm zlib1g-dev yasm sox libunistring0 libvdpau-dev libvdpau1 libvorbis-dev libbz2-dev libc-dev-bin libc6-dev libcaca-dev libasound2-dev libglu1-mesa-dev  libslang2-dev libsm-dev libdirectfb-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxext-dev libxfixes-dev libxt-dev libaudio-dev manpages-dev mesa-common-dev libxv-dev libxvmc-dev linux-libc-dev libice-dev libaudiofile-dev libavahi-client-dev libfaad-dev libaa1-dev libpulse-dev libogg-dev  libopenjpeg-dev autotools-dev dpkg-dev libdirac-dev  libsysfs-dev  libschroedinger-dev libfreetype6-dev libgif-dev libgl1-mesa-dev libspeex-dev libgsm1-dev  libidn11 libimlib2-dev libtheora-dev libltdl-dev libavahi-common-dev libass-dev libiec61883-dev libass-dev libmodplug-dev libpulse-ocaml-dev libdx4-dev

NOTE: The actual package names might be different in your system of choice.

Attention: If you want to be completely sure that you do not delete important files as a normal user I advice you to first navigate inside /opt directory before continuing further.

1.2 Configuring and building

cd /opt

git clone git://source.ffmpeg.org/ffmpeg.git

cd ffmpeg

configure parameters for the program: 

./configure –prefix=/usr –enable-avfilter –enable-vdpau –enable-bzlib  –enable-libgsm –enable-libopenjpeg –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-libvorbis –enable-pthreads –enable-zlib –disable-stripping –enable-runtime-cpudetect –enable-libmp3lame –enable-libv4l2 –enable-openal –enable-libvpx –enable-librtmp –enable-gnutls –enable-gpl –enable-postproc –enable-swscale –enable-x11grab –enable-libcaca –enable-libcdio  –enable-frei0r –enable-libmodplug

Note: Worldress shows to config line malformed. See the correct form from the pdf but do remember that some browser built-in pdf readers might not show the file correctly. If in any doubt download the pdf and open it with a pdf reader. config line

Note: with the config presented above the license should be: License: GPL version 2 or later. IF you add the option – -enable-nonfree to the config then of course the package will be non-free. You may however need to add aditional repositories to your system (Debian Multimedia, Mediubuntu, RPM Fusion…) if you choose to use non-free option and get some additional functions out of Ffmpeg

Do the following as a normal  user or as a a root or a sudo if  needed. If you use the folder /opt then you should use a root or a sudo. In any case  be patient as the following  steps may take some time.

make

After the command make has finnished type make install as a root or a sudo.

To see the Ffmpeg details and verify that it was indeed installed and configured as planned issue this command in a terminal (as a normal user)

ffmpeg

2.0 Cleaning the config / Upgrading the Ffmpeg / Removing the FfMPEG build directory

in the FfMPEG folder as a root:

make uninstall –> This removes the Ffmpeg installation

make clean     –> This purges the build environment so you can start fresh. After this you should do configuring and building again.

If you want to upgrade the Ffmpeg:

issue this command:

git pull

inside the program’s  directory and rebuild the program from the start.

Again: Do remember that everything in this post is provided purely on educational purposes and without any warranty.

Part 3 of the guide: http://www.techtimejourney.net/?p=918