Documentation

Find documentation for our Joomla extensions on this page.

Installation of video tools for JoomVideos

This document only for server administrators (who can manage his VPS or dedicated server), if you are using a shared web hosting then you will be able to see in JoomVideos dashboard if video conversion tools are installed or not.

Joomvideos require Ffmpeg program and other tools to be installed in your server to be able to convert uploaded videos from computer to HTML5 format.

To install these programs in your server you need to have permission to execute commands via a suitable network protocol such as SSH. Ffmpeg depend on other programs being installed first therefore, we have prepared this recommended installation sequence for all the software required to run JoomVideos.

The installation method described in this document is not the only alternative. Most of the codecs and conversion tools may be installed using the package manager tools included in most Linux distributions (apt-get for Debian/Ubuntu, yum for Red Hat/CentOS/Fedora). While this later method may be easier and faster, it has some important drawbacks :

  • Some important codecs are usually not included in the official repositories because of licensing restrictions
  • Sometimes repositories created by volunteers may have a more complete set of packages, but they are not always stable and recommended for a production server.
  • Binary packages usually provide older version of the software.
  • By compiling the source code in your server the tools are optimized for running in that specific processor, taking advantage of CPU optimizations.
  • In the binary packages code is compiled with more conservative options in order to be compatible with every existing processor, from Pentium I to Quad Core.

1) Install Development Tools

To compile most of the required software, the GNU C and C++ compilers and other development utilities must been installed first.

Installing Using YUM

For Red Hat/Fedora/CentOS systems, type these commands into SSH:

# yum groupinstall "Development Tools" -y

Installing Using APT-GET

For Debian/Ubuntu systems, type these commands into SSH:

# apt-get update # apt-get install build-essential

2) Dynamic Linked Libraries Path

Linux uses a system of shared libraries, similar to Windows dlls, for the efficient use of space and resources, and modularity. The search path for dynamic libraries is configured globally in /etc/ld.so.conf.

Type these commands into SSH:

# grep /usr/local/lib /etc/ld.so.conf || echo "/usr/local/lib" >> /etc/ld.so.conf

3) Install Yasm

Yasm is an assembler released under the BSD license. Although it is not strictly required for compiling the tools, it helps to improve the conversion speed of ffmpeg when using HD codecs, so its installation is highly recommended. yasm is frequently available in the repositories of most popular Linux distribution, but it is preferred to install the latest version by compiling its source code:

# cd /usr/local/src 
# wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
# tar zxf yasm-1.2.0.tar.gz
# cd yasm-1.2.0
# ./configure && make && make install

If the installation finished successfully we should be able to run the yasm command, for example:

# yasm --version 
yasm 1.2.0

4) Codecs and video conversion tools

In JoomVideos the heavy-lifting of the video conversion and thumbnail generation is performed by ffmpeg. Much of the power of ffmpeg comes from the integration with external libraries that add support for additional codecs, so it is important to add as many of them to handle popular audio and video formats.

Although in this guide we'll go through the installation of the latest version of ffmpeg, it is also possible to use its fork libav with little or no modification of the procedure.

4.1) Install Libogg

Ogg is a free, open standard container format maintained by the Xiph.Org Foundation. The Ogg format is unrestricted by software patents and is designed to provide for efficient streaming and manipulation of high quality digital multimedia.

Installation:

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
# tar zxvf libogg-1.3.0.tar.gz
# cd /usr/local/src/libogg-1.3.0
# make distclean
# ./configure && make clean && make && make install
# ldconfig
Checking:

If the installation process finished ok the compiled libraries will be placed at /usr/local/lib

# ls /usr/local/lib/libogg*
/usr/local/lib/libogg.a   /usr/local/lib/libogg.so.0
/usr/local/lib/libogg.la  /usr/local/lib/libogg.so.0.8.0

4.2) Install Libvorbis

Vorbis is a audio compression format. It is roughly comparable to other formats used to store and play digital music, such as MP3, VQF, AAC, and other digital audio formats. It is different from these other formats because it is completely free, open, and unpatented.

Installation

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
# tar zxvf libvorbis-1.3.3.tar.gz
# cd /usr/local/src/libvorbis-1.3.3
# make distclean
# ./configure && make clean && make && make install
Checking

If the installation process finished ok the compiled libraries will be placed at /usr/local/lib

# ls /usr/local/lib/libvorbis*
/usr/local/lib/libvorbis.a            /usr/local/lib/libvorbisfile.so
/usr/local/lib/libvorbisenc.a         /usr/local/lib/libvorbisfile.so.3
/usr/local/lib/libvorbisenc.la        /usr/local/lib/libvorbisfile.so.3.3.5
/usr/local/lib/libvorbisenc.so        /usr/local/lib/libvorbis.la
/usr/local/lib/libvorbisenc.so.2      /usr/local/lib/libvorbis.so
/usr/local/lib/libvorbisenc.so.2.0.9  /usr/local/lib/libvorbis.so.0
/usr/local/lib/libvorbisfile.a        /usr/local/lib/libvorbis.so.0.4.6
/usr/local/lib/libvorbisfile.la

4.3) Install Theora

Theora is a free and open video compression format from the Xiph.org Foundation. It can be used to distribute film and video online and on disc without the licensing and royalty fees or vendor lock-in associated with other formats.

Installation

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
# tar zxvf libtheora-1.1.1.tar.gz
# cd /usr/local/src/libtheora-1.1.1
# make distclean
# ./configure && make clean && make && make install
Checking

If the installation process finished ok the compiled libraries will be placed at /usr/local/lib

# ls /usr/local/lib/libtheora*
/usr/local/lib/libtheora.a            /usr/local/lib/libtheoraenc.so
/usr/local/lib/libtheoradec.a         /usr/local/lib/libtheoraenc.so.1
/usr/local/lib/libtheoradec.la        /usr/local/lib/libtheoraenc.so.1.1.2
/usr/local/lib/libtheoradec.so        /usr/local/lib/libtheora.la
/usr/local/lib/libtheoradec.so.1      /usr/local/lib/libtheora.so
/usr/local/lib/libtheoradec.so.1.1.4  /usr/local/lib/libtheora.so.0
/usr/local/lib/libtheoraenc.a         /usr/local/lib/libtheora.so.0.3.10
/usr/local/lib/libtheoraenc.la

4.4) Install Libx264

x264 is a free software library for encoding video streams into the H.264/MPEG-4 AVC format. It is released under the terms of the GNU General Public License.

Installation

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-`date -d "-1 days" +%Y%m%d`-2245-stable.tar.bz2
# tar jxf x264-snapshot-`date -d "-1 days" +%Y%m%d`-2245-stable.tar.bz2
# cd /usr/local/src/x264-snapshot-`date -d "-1 days" +%Y%m%d`-2245-stable
# make distclean
# ./configure --enable-shared && make clean && make && make install

The x264 project creates a daily snapshot with the format x264-snapshot-yyyymmdd-2245.tar.bz2 . We recommend to use the last available snapshot.

Checking

If the installation process finished ok the compiled libraries will be placed at /usr/local/lib (the actual version number after libx264.so.* may vary)

# ls /usr/local/lib/libx264*
/usr/local/lib/libx264.so  /usr/local/lib/libx264.so.124
Common Problems
No suitable assembler found. Install 'yasm' to get MMX/SSE optimized code. If you really want to compile without asm, configure with <--disable-asm.

If you get this error, then you should use the disable asm option, or install yasm (version 0.6.1) using your distribution package manager (apt-get,yum.etc) or compiling it from the source. We do not recommend compiling the x264 libraries without yasm, as it noticeably reduces the HD decoding and decoding speed.

4.5) Install Amr

3GP is a simplified version of the MPEG-4 Part 14 (MP4) container format, designed to decrease storage and bandwidth requirements in order to accommodate mobile phones. It stores video streams as MPEG-4 Part 2 or H.263 or MPEG-4 Part 10 (AVC/H.264), and audio streams as AMR-NB, AMR-WB, AMR-WB+, AAC-LC or HE-AAC. A 3GP file is always big-endian, storing and transferring the most significant bytes first. It also contains descriptions of image sizes and bitrate.

Opencore-amr is a free implementation of the of AMR-NB and AMR-WB codecs under Apache License V2.0

Installation

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
# tar zxf opencore-amr-0.1.3.tar.gz
# cd /usr/local/src/opencore-amr-0.1.3
# make distclean
# ./configure && make clean && make && make install
Checking

If the installation process finished ok the compiled libraries will be placed at /usr/local/lib

# ls /usr/local/lib/libopencore*
/usr/local/lib/libopencore-amrnb.a
/usr/local/lib/libopencore-amrnb.la
/usr/local/lib/libopencore-amrnb.so
/usr/local/lib/libopencore-amrnb.so.0
/usr/local/lib/libopencore-amrnb.so.0.0.3
/usr/local/lib/libopencore-amrwb.a
/usr/local/lib/libopencore-amrwb.la
/usr/local/lib/libopencore-amrwb.so
/usr/local/lib/libopencore-amrwb.so.0
/usr/local/lib/libopencore-amrwb.so.0.0.3

4.6) Install Libfaac

FAAC is an MPEG-4 and MPEG-2 AAC encoder. Installing the libfaac libraries enable ffmpeg to encode audio stream using the AAC codec.

Installation

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
# tar zxvf faac-1.28.tar.gz
# cd /usr/local/src/faac-1.28
# ./configure && make clean && make && make install
Checking

If the installation process finished ok the compiled libraries will be placed at /usr/local/lib.

# ls /usr/local/lib/libfaac*
/usr/local/lib/libfaac.a   /usr/local/lib/libfaac.so    /usr/local/lib/libfaac.so.0.0.0
/usr/local/lib/libfaac.la  /usr/local/lib/libfaac.so.0
Common Problems

In recent Linux distrubutions (Centos 6, Debian 6, Ubuntu 12.04) the compilation may fail with the following error:

In file included from mp4common.h:29, from 3gp.cpp:28:mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’

That is because the C function strcasestr declared in the libfaac sources is already declared in a system-wide library. To solve it: Edit the file /usr/local/src/faac-1.28/common/mp4v2/mpeg4ip.h and delete the following line (around line 126)

char *strcasestr(const char *haystack, const char *needle);

Then run

# make clean && ./configure && make && make install

4.7) Install Lame

LAME is an open source application used to encode audio into the MP3 file format. The name LAME is a recursive acronym for LAME Ain't an MP3 Encoder, reflecting LAME's early history when it was not actually an encoder, but merely a set of patches against the freely available ISO demonstration source code.

Installation

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
# tar zxvf lame-3.99.5.tar.gz
# cd lame-3.99.5
# make distclean
# ./configure && make clean && make && make install
Checking

If the installation process finished ok the compiled libraries will be placed at /usr/local/lib

# ls /usr/local/lib/libmp3lame*
/usr/local/lib/libmp3lame.a   /usr/local/lib/libmp3lame.so.0
/usr/local/lib/libmp3lame.la  /usr/local/lib/libmp3lame.so.0.0.0
/usr/local/lib/libmp3lame.so

4.8) Install libvpx

VP8 is an open video compression format, aimed at providing high picture quality at lower bitrate. libvpx provide decoding and encoding capabilities for the VP8 format.

Installation

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# wget http://webm.googlecode.com/files/libvpx-v1.1.0.zip
# unzip libvpx-v1.1.0.zip
# cd libvpx-v1.1.0
# ./configure --enable-vp8 --enable-pic --enable-shared && make && make install && ldconfig
Checking

If the installation process finished ok the compiled libraries will be placed at/usr/local/lib/

# ls /usr/local/lib/libvpx*
/usr/local/lib/libvpx.a /usr/local/lib/libvpx.so.1 /usr/local/lib/libvpx.so.1.1.0
/usr/local/lib/libvpx.so /usr/local/lib/libvpx.so.1.1

4.9) Install Ffmpeg

FFMPEG is a computer program that can record, convert and stream digital audio and video in numerous formats.[1] FFMPEG is a command line tool that is composed of a collection of free software / open source libraries. It includes libavcodec, an audio/video codec library used by several other projects, and libavformat, an audio/video container mux and demux library. The name of the project comes from the MPEG video standards group, together with "FF" for "fast forward".

Installation:

Type these commands into SSH:

# mkdir /usr/local/src
# cd /usr/local/src
# mkdir /usr/local/src/tmp
# chmod 777 /usr/local/src/tmp
# export TMPDIR=/usr/local/src/tmp
# wget http://ffmpeg.org/releases/ffmpeg-0.11.tar.gz
# tar xzf ffmpeg-0.11.tar.gz
# cd ffmpeg-0.11
# make distclean
# ./configure  --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencore-amrnb  --enable-libtheora 
# make clean && make && make install
# make tools/qt-faststart
# cp tools/qt-faststart /usr/local/bin/
# ldconfig

Other tutorials to install video tools quickly

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok