zoukankan      html  css  js  c++  java
  • ffmepg-nginx-nginx-rtmp-module配置脚本

    把上个月写的的配置脚本贴一下:

    #!/bin/bash
    #version:2016-10-27
    #create by itn
    #dis: this is used to auto install ffmpeg+nginx+nginx-rtmp-module.
    #ffmpeg inatall
    echo "###############Now we start to install ffmpeg!###############"
    cd /usr/local
    wget http://ffmpeg.org/releases/ffmpeg-3.1.4.tar.bz2
    tar -jxvf ffmpeg-3.1.4.tar.bz2
    cd /usr/local/ffmpeg-3.1.4
    yum -y install yasm
    ./configure --enable-shared --prefix=/usr/local/ffmpeg
    make && make install
    cd /etc/ld.so.conf.d
    touch ffmpeg.conf
    echo "/usr/local/ffmpeg/lib" > ffmpeg.conf
    ldconfig
    ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/
    ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/
    ln -s /usr/local/ffmpeg/bin/ffserver /usr/local/bin/
    echo "###############ffmpeg intsallment finished!###############"
    #nginx install
    #update gcc 
    yum -y install gcc gcc-c++ autoconf automake
    #download openssl/zlib/pcre dependent libraries & nginx-rtmp-module &nginx
    cd /usr/local
    wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz
    wget http://nchc.dl.sourceforge.net/project/pcre/pcre/8.32/pcre-8.32.tar.gz
    wget http://heanet.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
    wget https://codeload.github.com/arut/nginx-rtmp-module/zip/master
    wget http://nginx.org/download/nginx-1.5.9.tar.gz
    tar -xzvf pcre-8.32.tar.gz
    tar -xzvf openssl-1.0.2j.tar.gz
    tar -xzvf zlib-1.2.8.tar.gz
    tar -xzvf nginx-1.5.9.tar.gz
    unzip master
    #  ngixn configure
    cd /usr/local/nginx-1.5.9
    ./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre-8.32 --with-zlib=/usr/local/zlib-1.2.8 --with-openssl=/usr/local/openssl-1.0.2j --add-module=/usr/local/nginx-rtmp-module-master
    make && make install
    echo "then you may need some manual operation! please refer to "https://github.com/arut/nginx-rtmp-module#example-nginxconf" "
    echo "done"

    安装成功后,ffmpeg运行结果会显示如下:

    nginx 成功启动后如下:

  • 相关阅读:
    Oracle RMAN快速入门指南
    防止SQL注入
    脚本获取参数 
    回车下一个
    DataTable
    C# Eval
    C#过滤所有HTML代码的函数
    反射
    gridview格式化问题
    绑定
  • 原文地址:https://www.cnblogs.com/tinmh/p/6047432.html
Copyright © 2011-2022 走看看