2015-08-16 23:56:35 +00:00
This section explains how to build the project using **CentOS 64** but could be easily adapted for any _Linux_ , _Windows_ or _OS X_ .< br />
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
## Preparing the system ##
```
2012-12-05 12:00:22 +00:00
sudo yum update
2014-12-02 01:41:10 +00:00
sudo yum install make libtool autoconf subversion git wget libogg-devel gcc gcc-c++ pkgconfig nasm
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
The first step is to checkout Doubango 2.0 source code:
2015-08-16 23:56:35 +00:00
```
2016-08-01 11:26:28 +00:00
git clone https://github.com/DoubangoTelecom/doubango.git
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building libsrtp ###
2013-06-10 05:50:32 +00:00
libsrtp is optional.
2015-08-16 23:56:35 +00:00
```
2013-05-06 18:56:29 +00:00
git clone https://github.com/cisco/libsrtp/
cd libsrtp
2014-11-25 01:23:07 +00:00
git checkout v1.5.0
2013-04-01 06:06:16 +00:00
CFLAGS="-fPIC" ./configure --enable-pic & & make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building OpenSSL ###
**OpenSSL** is required if you want to use the _RTCWeb Breaker_ module or Secure WebSocket transport (WSS). **OpenSSL version _1.0.1_ is required if you want support for _DTLS-SRTP_** .< br />
2013-01-07 16:42:29 +00:00
This section is only required if you don’ t have _OpenSSL_ installed on your system or using version prior to _1.0.1_ and want to enable _DTLS-SRTP_ .< br />
2015-08-16 23:56:35 +00:00
A quick way to have _OpenSSL_ may be installing **openssl-devel** package but this version will most likely be outdated (prior to _1.0.1_ ). Anyway, you can check the version like this:
```
2013-01-07 16:42:29 +00:00
openssl version
2015-08-16 23:56:35 +00:00
```
2013-01-07 16:42:29 +00:00
To build OpenSSL:
2015-08-16 23:56:35 +00:00
```
2013-01-07 16:42:29 +00:00
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar -xvzf openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
./config shared --prefix=/usr/local --openssldir=/usr/local/openssl & & make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building libspeex and libspeexdsp ###
**libspeex** (audio codec) an **libspeexdsp** (audio processing and jitter buffer) are optional. It’ s highly recommended to enable libspeexdsp.
2013-06-10 20:37:32 +00:00
You can install the devel packages:
2015-08-16 23:56:35 +00:00
```
2013-06-10 20:37:32 +00:00
sudo yum install speex-devel
2015-08-16 23:56:35 +00:00
```
2013-06-10 20:37:32 +00:00
Or build the source by yourself:
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
wget http://downloads.xiph.org/releases/speex/speex-1.2beta3.tar.gz
tar -xvzf speex-1.2beta3.tar.gz
cd speex-1.2beta3
2013-06-10 20:37:32 +00:00
./configure --disable-oggtest --without-libogg & & make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building YASM ###
**YASM** is only required if you want to enable **VPX** (VP8 video codec) or **x264** (H.264 codec).
```
2012-12-05 12:00:22 +00:00
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar -xvzf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure & & make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building libvpx ###
2012-12-05 12:00:22 +00:00
_Date: December 1, 2012_ < br / >
2015-08-16 23:56:35 +00:00
**libvpx** adds support for **VP8** and is optional but highly recommended if you want support for video when using Google Chrome or Mozilla Firefox.
2013-06-10 20:37:32 +00:00
You can install the devel packages:
2015-08-16 23:56:35 +00:00
```
2013-06-10 20:37:32 +00:00
sudo yum install libvpx-devel
2015-08-16 23:56:35 +00:00
```
2013-06-10 20:37:32 +00:00
Or build the source by yourself:
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure --enable-realtime-only --enable-error-concealment --disable-examples --enable-vp8 --enable-pic --enable-shared --as=yasm
2013-06-08 12:04:05 +00:00
make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building libyuv ###
**libyuv** is optional. Adds support for video scaling and chroma conversion.
```
2012-12-05 12:00:22 +00:00
mkdir libyuv & & cd libyuv
svn co http://src.chromium.org/svn/trunk/tools/depot_tools .
./gclient config http://libyuv.googlecode.com/svn/trunk
./gclient sync & & cd trunk
make -j6 V=1 -r libyuv BUILDTYPE=Release
#cp out/Release/obj.target/libyuv.a /usr/local/lib
#mkdir /usr/local/include/libyuv && cp -r include/* /usr/local/include/libyuv
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building libopus ###
**libopus** is optional but highly recommended as it’ s an MTI codec for WebRTC. Adds support for [Opus audio codec ](http://www.opus-codec.org/ ).
```
2013-05-07 05:14:30 +00:00
wget http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz
tar -xvzf opus-1.0.2.tar.gz
cd opus-1.0.2
./configure --with-pic --enable-float-approx & & make & & make install
2015-08-16 23:56:35 +00:00
```
2013-05-07 05:14:30 +00:00
2015-08-16 23:56:35 +00:00
### Building opencore-amr ###
**opencore-amr** is optional. Adds support for **AMR** audio codec.
```
2012-12-05 12:00:22 +00:00
git clone git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/opencore-amr
2013-08-06 17:28:29 +00:00
cd opencore-amr & & autoreconf --install & & ./configure & & make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building libgsm ###
**libgsm** is optional. Adds support for **GSM** audio codec.
2013-06-10 20:37:32 +00:00
2015-08-16 23:56:35 +00:00
You can install the devel packages (**recommended**):
```
2013-06-10 20:37:32 +00:00
sudo yum install gsm-devel
2015-08-16 23:56:35 +00:00
```
2013-06-10 20:37:32 +00:00
Or build the source by yourself:
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
wget http://www.quut.com/gsm/gsm-1.0.13.tar.gz
tar -xvzf gsm-1.0.13.tar.gz
cd gsm-1.0-pl13 & & make & & make install
#cp -rf ./inc/* /usr/local/include
#cp -rf ./lib/* /usr/local/lib
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building g729 ###
**G729** is optional. Adds support for **G.729** audio codec.
```
2012-12-05 12:00:22 +00:00
svn co http://g729.googlecode.com/svn/trunk/ g729b
cd g729b
./autogen.sh & & ./configure --enable-static --disable-shared & & make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building iLBC ###
**iLBC** is optional. Adds support for **iLBC** audio codec.
```
2012-12-05 12:00:22 +00:00
svn co http://doubango.googlecode.com/svn/branches/2.0/doubango/thirdparties/scripts/ilbc
cd ilbc
wget http://www.ietf.org/rfc/rfc3951.txt
awk -f extract.awk rfc3951.txt
./autogen.sh & & ./configure
make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building x264 ###
2012-12-05 12:00:22 +00:00
_Date: December 2, 2012_ < br / >
2015-08-16 23:56:35 +00:00
**x264** is optional and adds support for **H.264** video codec (requires FFmpeg).
```
2012-12-05 12:00:22 +00:00
wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar -xvjf last_x264.tar.bz2
# the output directory may be difference depending on the version and date
cd x264-snapshot-20121201-2245
2013-07-05 17:26:38 +00:00
./configure --enable-shared --enable-pic & & make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building FFmpeg ###
2012-12-05 12:00:22 +00:00
_Date: December 2, 2012_ < br / >
2015-08-16 23:56:35 +00:00
**FFmpeg** is optional and adds support for **H.263** , **H.264** (requires **x264** ) and **MP4V-ES** video codecs.
```
2012-12-05 12:00:22 +00:00
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
2013-06-10 20:37:32 +00:00
2013-03-21 15:01:05 +00:00
# grap a release branch
git checkout n1.2
2013-06-10 20:37:32 +00:00
# configure source code
2012-12-05 12:00:22 +00:00
./configure \
--extra-cflags="-fPIC" \
--extra-ldflags="-lpthread" \
\
2013-06-10 20:37:32 +00:00
--enable-pic --enable-memalign-hack --enable-pthreads \
2012-12-05 12:00:22 +00:00
--enable-shared --disable-static \
2013-06-10 20:37:32 +00:00
--disable-network --enable-pthreads \
--disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe \
2012-12-05 12:00:22 +00:00
\
2014-04-28 00:01:57 +00:00
--enable-gpl --enable-nonfree \
2012-12-05 12:00:22 +00:00
\
2013-06-10 20:37:32 +00:00
--disable-debug
2014-04-28 00:01:57 +00:00
# to force enabling h264, append to the configure command: --enable-libx264 --enable-encoder=libx264 --enable-decoder=h264
# to force enabling h263 and h263+, append to the configure command: --enable-encoder=h263 --enable-encoder=h263p --enable-decoder=h263
2013-06-10 20:37:32 +00:00
# build and install
make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
2015-08-16 23:56:35 +00:00
### Building `OpenH264` ###
**OpenH264** is optional. Adds support for **H.264** constrained baseline video codec.
```
2014-12-02 03:10:54 +00:00
git clone https://github.com/cisco/openh264.git
cd openh264
2016-06-02 18:05:57 +00:00
git checkout v1.5.0
2014-12-02 03:10:54 +00:00
make ENABLE64BIT=Yes # Use ENABLE64BIT=No for 32bit platforms
make install
2015-08-16 23:56:35 +00:00
```
2014-12-02 03:10:54 +00:00
2015-08-16 23:56:35 +00:00
### Building Doubango ###
* Minimal build
```
2013-06-10 20:37:32 +00:00
cd doubango & & ./autogen.sh & & ./configure --with-ssl --with-srtp --with-speexdsp
2012-12-18 20:08:17 +00:00
make & & make install
2015-08-16 23:56:35 +00:00
```
* Recommended build
```
2013-06-10 20:37:32 +00:00
cd doubango & & ./autogen.sh & & ./configure --with-ssl --with-srtp --with-speexdsp --with-ffmpeg --with-opus
2012-12-18 20:08:17 +00:00
make & & make install
2015-08-16 23:56:35 +00:00
```
* Full build
```
2013-06-10 20:37:32 +00:00
cd doubango & & ./autogen.sh & & ./configure --with-ssl --with-srtp --with-vpx --with-yuv --with-amr --with-speex --with-speexdsp --enable-speexresampler --enable-speexdenoiser --with-opus --with-gsm --with-ilbc --with-g729 --with-ffmpeg
2012-12-18 20:08:17 +00:00
make & & make install
2015-08-16 23:56:35 +00:00
```
2012-12-05 12:00:22 +00:00
< br / >
2016-06-02 18:05:57 +00:00
Et voilà