Saturday, 11 April 2015

Build and Install Doubango webrtc2sip on ubuntu

By vm  |  05:52 No comments

In an effort to verify webRTC driven new service operations, Doubango webrtc2sip codes are compiled and installed from source. Following the procedures provided by the Doubango guide here, the following procedures are verified with additional minor corrections during the build and installation process on Ubuntu 12.10.
  1. Download the webrtc2sip source codes
  2. Download Doubango IMS Framework v2.0:
    svn checkout http://doubango.googlecode.com/svn/ doubango-source
  3. Install all necessary packages such as “make, libtool, autoconf, subversion, git, cvs, wget, libogg-dev” etc.
  4. get and install “libsrtp”:
    git clone https://github.com/cisco/libsrtp/
    cd libsrtp
    CFLAGS=”-fPIC” ./configure –enable-pic && make && make install
  5. check OpenSSL version and make sure version 1.0c is installed: openssl version
  6. install libspeex-dev and libspeexdsp-dev
  7. build and install YASM (for VP8 video codec)
    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
  8. install libvpx and libvpx-dev (for VP8 video codec support)
  9. build and install libyuv
    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/source
    make -j6 V=1 -r libyuv.a BUILDTYPE=Release (makefile is missing in the original source, created one to do the job)
    cp libyuv.a /usr/local/lib
    mkdir –parents /usr/local/include/libyuv/libyuv
    cp -rf ../include/libyuv.h /usr/local/include/libyuv
    cp -rf ../include/libyuv/*.h /usr/local/include/libyuv/libyuv
  10. build and install libjpeg_turbo
    Makefile was not found in the downloaded webrtc2sip package, installed the libjpeg_turbo package by using other linux installation tool. It seems working fine so far.
  11. build and install opencore-amr
    git clone git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/opencore-amr
    cd opencore-amr && autoreconf –install && ./configure && make && make install
  12. build and install opus
    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
  13. build and install libgsm
    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 (need to specify the installation path in Makefile before install — e.g. INSTALL_ROOT = /usr/local)
  14. build and install g729
    svn co http://g729.googlecode.com/svn/trunk/ g729b
    cd g729b
    ./autogen.sh && ./configure –enable-static –disable-shared && make && make install
  15. build and install iLBC
    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
  16. Build and install x264
    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
    ./configure –enable-static –enable-pic && make && make install (default install path is /usr/local/lib, set prefix=/usr in config.mak after “configure” if you want to install in /usr/lib instead — this might be required in building and installing ffmpeg)
  17. Build and install FFmpeg
    git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
    cd ffmpeg
    git checkout n1.2
    ./configure –extra-cflags=”-fPIC” –extra-ldflags=”-lpthread” –enable-pic –enable-memalign-hack –enable-shared –disable-static –disable-network –disable-protocols –disable-pthreads –disable-devices –disable-filters –disable-bsfs –disable-muxers –disable-demuxers –disable-parsers –disable-hwaccels –disable-ffmpeg –disable-ffplay –disable-ffserver –disable-encoders –disable-decoders –disable-zlib –enable-gpl –disable-debug –enable-encoder=h263 –enable-encoder=h263p –enable-decoder=h263 –enable-encoder=mpeg4 –enable-decoder=mpeg4 –enable-libx264 –enable-encoder=libx264 –enable-decoder=h264 (may need to install libx264_dev)
    make && make install
  18. Build and install Doubango
    • Minimum
      cd doubango-source/branches/2.0/doubango && ./autogen.sh && ./configure –with-ssl –with-srtp
      make && make install
    • Recommended
      cd doubango-source/branches/2.0/doubango && ./autogen.sh && ./configure –with-ssl –with-srtp –with-speexdsp –enable-speexjb –with-ffmpeg –with-h264
      make && make install
    • Full
      cd doubango-source/branches/2.0/doubango && ./autogen.sh && ./configure –with-ssl –with-srtp –with-vpx –with-yuv
      –with-amr –with-speex –with-speexdsp –enable-speexresampler –enable-speexjb –enable-speexdenoiser –with-gsm –with-ilbc –with-g729 –with-ffmpeg –with-h264
      make && make install
    • Build errors and handlings
      • /usr/local/include/libyuv/libyuv/compare.h:14:32: fatal error: libyuv/basic_types.h: No such file or directory
        • make symbol links for all header files from “/usr/local/include/libyuv/libyun” to “/usr/local/include/libyuv”
      • src/codecs/h263/tdav_codec_h263.c:186:93: error: parameter 3 (‘encoder’) has incomplete type
        • make sure your ffmpeg is from branch n1.2
  19. Build and install webrtc2sip
    export PREFIX=/opt/webrtc2sip
    # use –with-doubango=PATH to set path to the doubango installation (‘lib’ and ‘include’ folders).
    cd webrtc2sip && ./autogen.sh && ./configure –prefix=$PREFIX –with-doubango=/usr/local
    make clean && make && make install
    cp -f ./config.xml $PREFIX/sbin/config.xml
    export PATH=$PATH:/opt/webrtc2sip/sbin(to export the executable “webrtc2sip” path)
Run webrtc2sip
  1. issue “webrtc2sip” command
    • webrtc2sip –config=/opt/webrtc2sip/config.xml
  2. “export PREFIX=/opt/webrtc2sip” if command not found
  3. “export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib” if complains libraries not found, such as “webrtc2sip: error while loading shared libraries: libtinySAK.so.0: cannot open shared object file: No such file or directory”
Attachment
    1. libyuv Makefile

CC = gcc
CPP = g++
AR = ar
RM = rm -f
CFLAGS = -O3 -Wall -pedantic -I../include -I../include/libyuv
OBJ = compare.o \
compare_common.o \
compare_neon.o \
compare_posix.o \
compare_win.o \
convert.o \
convert_argb.o \
convert_from.o \
convert_from_argb.o \
convert_jpeg.o \
convert_to_argb.o \
convert_to_i420.o \
cpu_id.o \
format_conversion.o \
mjpeg_decoder.o \
mjpeg_validate.o \
planar_functions.o \
rotate.o \
rotate_argb.o \
rotate_mips.o \
rotate_neon.o \
row_any.o \
row_common.o \
row_mips.o \
row_neon.o \
row_posix.o \
row_win.o \
scale.o \
scale_argb.o \
scale_argb_neon.o \
scale_mips.o \
scale_neon.o \
video_common.o
ASMOBJ = memcpy_mips.o \
row_x86.o \
x86inc.o
BIN = libyuv.a
%.o: %.cc
$(CPP) -c -o $@ $< $(CFLAGS)
$(BIN): $(OBJ)
ar r $(BIN) $(OBJ)
ranlib $(BIN)
clean:
$(RM) *.o *.a
Source : Geeksforum 

Author: vm

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

0 comments:

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

© 2014 VOIP4Learn. WP themonic converted by Bloggertheme9. Powered by Blogger.
TOP