• fs


    yum install -y make expat-devel git gcc-c++ autoconf automake libtool wget python-devel ncurses-devel zlib-devel
    libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel
    speex-devel ldns-devel libedit-devel libxml2-devel libdb4* libidn-devel
    unbound-devel libuuid-devel lua-devel libsndfile-devel yasm-devel libtiff-devel
    readline-devel unixODBC unixODBC-devel mysql-connector-odbc

    echo "/usr/local/lib" >> /etc/ld.so.conf
    ldconfig

    cd /opt
    wget http://www.lua.org/ftp/lua-5.3.5.tar.gz
    tar xzvf lua-5.3.5.tar.gz
    cd lua-5.3.5
    make linux
    make install
    ln -sf /usr/local/bin/lua /usr/bin
    ln -sf /usr/local/bin/luac /usr/bin

    cd /opt
    wget https://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.gz
    tar xzvf nasm-2.14.tar.gz
    cd nasm-2.14
    ./configure
    make
    make install

    cd /opt
    wget https://downloads.sourceforge.net/libpng/libpng-1.6.35.tar.xz
    tar xJvf libpng-1.6.35.tar.xz
    cd libpng-1.6.35
    ./configure
    make
    make install
    /bin/cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/

    cd /opt
    wget https://archive.mozilla.org/pub/opus/opus-1.3.tar.gz
    tar xzvf opus-1.3.tar.gz
    cd opus-1.3
    ./configure
    make
    make install
    /bin/cp /usr/local/lib/pkgconfig/opus* /usr/lib64/pkgconfig/

    cd /opt
    wget https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20190225-2245.tar.bz2
    tar xjvf x264-snapshot-20190225-2245.tar.bz2
    cd x264-snapshot-20190225-2245
    ./configure --enable-shared --enable-static --disable-opencl
    make
    make install
    /bin/cp /usr/local/lib/pkgconfig/x264* /usr/lib64/pkgconfig

    cd /opt
    wget https://libav.org/releases/libav-12.3.tar.xz
    tar xJvf libav-12.3.tar.xz
    cd libav-12.3
    sed -i 's/x264_bit_depth/X264_BIT_DEPTH/' libavcodec/libx264.c
    ./configure --disable-static --enable-shared --enable-pic --enable-libx264 --enable-gpl
    make CXXFLAGS="-fPIC"
    make install
    /bin/cp /usr/local/lib/pkgconfig/libav*.pc /usr/lib64/pkgconfig/
    /bin/cp /usr/local/lib/pkgconfig/libsw*.pc /usr/lib64/pkgconfig/

    cd /opt
    wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.8.5.tar.xz
    tar xJvf freeswitch-1.8.5.tar.xz
    cd freeswitch-1.8.5
    perl -i -pe 's/^#applications/mod_av/applications/mod_av/g' modules.conf
    perl -i -pe 's/^applications/mod_signalwire/#applications/mod_signalwire/g' modules.conf
    perl -i -pe 's/^codecs/mod_opus/#codecs/mod_opus/g' modules.conf
    ./configure --prefix=/opt/fs --with-openssl --enable-optimization
    make
    make install
    make sounds-install
    make moh-install
    make samples
    ln -sf /opt/fs/bin/freeswitch /usr/bin
    ln -sf /opt/fs/bin/fs_cli /usr/bin

    rm -rf /opt/fs/etc/freeswitch/sip_profiles/*ipv6*
    perl -i -pe 's/"::"/"127.0.0.1"/g' /opt/fs/etc/freeswitch/autoload_configs/event_socket.conf.xml
    perl -i -pe 's/OPUS,G722,PCMU,PCMA,VP8"/OPUS,G722,PCMU,PCMA,VP8,H264"/g' /opt/fs/etc/freeswitch/vars.xml
    perl -i -pe 's/<!--<load module="mod_h26x"/>-->/<load module="mod_h26x"/>"/g' /opt/fs/etc/freeswitch/autoload_configs/modules.conf.xml

    /opt/fs/etc/freeswitch/autoload_configs/conference.conf.xml
    对应profile修改视频混屏转码模式
    <param name="conference-flags" value="transcode-video|minimize-video-encoding"/>
    <param name="video-mode" value="transcode"/>

    sysctl -w net.core.rmem_max=16777216
    sysctl -w net.core.wmem_max=16777216
    sysctl -w kernel.core_pattern=core.%p
    /opt/fs/bin/freeswitch -nonat -nc

    freeswitch -stop
    fs_cli

    wget https://codeload.github.com/j0sh/crtmpserver/zip/centosinit
    unzip centosinit
    cd crtmpserver-centosinit/builders/cmake
    cmake .
    make
    ./crtmpserver/crtmpserver ./crtmpserver/crtmpserver.lua

    bgapi originate user/1001 &conference(3000@default)
    conference 3000-47.93.177.234 recording /tmp/testrecord.mp4
    conference 3000-47.93.177.234 recording /tmp/testrecord.fsv
    conference 3000-47.93.177.234 record rtmp://127.0.0.1/live/stream1
    conference mute all 静音
    conference unmute all 取消静音
    conference 3000-47.93.177.234 vid-layout 2x2
    floor 大屏
    conference stop all
    conference 3000-47.93.177.234 play /usr/local/xxx.mp4 播放视频文件
    file_seek 翻页
    kitk 剔除成员
    conference 3000-47.93.177.234 vid_floor 1 force 强制设置大画面
    vid-codec-grop 多方编码不一致

  • 相关阅读:
    iptables阐述防火墙
    升级openssh基于openssl
    Linux密钥认证错误解决
    keychain实现ssh对秘钥免登陆免输入密码
    rpcbind服务死活启动不了
    samba温故知新
    Linux下umask的缺省默认权限
    tomcat在线部署且查看堆栈状态
    mariadb多实例搭建
    rarlinux基于linux-x64
  • 原文地址:https://www.cnblogs.com/xdcr/p/10531415.html
Copyright © 2020-2023  润新知