zoukankan      html  css  js  c++  java
  • 编译最新版本ffmpeg 提供给CentOS Mono调用

    由于工作原因,需要使用ffmpeg在Linux下进行处理音频或视频文件

    下面是整个编译过程,这里特把一般步骤写下来,以做个记录。

    #!/bin/sh
    #pathDir="/usr/local/src/ffmpeg"
    pathDir=$(cd `dirname $0`; pwd)
    
    yum –y update
    yum -y install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel  cairo-devel
    
    yum install -y automake autoconf make gcc gcc-c++ libtool zlib zlib-devel curl curl-devel alsa-lib alsa-lib-devel gettext gettext-devel expat expat-devel
    
    echo "faac install ..."
    sleep 1
    cd ${pathDir}/faac/
    ./bootstrap
    ./configure --prefix/usr/local/ --enable-shared
    make && make install
    echo "faac installed"
    sleep 1
    
    
    echo "lame install ..."
    sleep 1
    cd ${pathDir}/lame-3.98.4/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "lame installed"
    sleep 1
    
    
    echo "libogg install ..."
    sleep 1
    cd ${pathDir}/libogg-1.3.0/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "libogg installed"
    sleep 1
    
    
    echo "libtheora install ..."
    sleep 1
    cd ${pathDir}/libtheora-1.1.1/
    ./configure --prefix=/usr/local/ --enable-shared
    ldconfig -v
    make && make install
    echo "libtheora installed"
    sleep 1
    
    
    echo "libvorbis install ..."
    sleep 1
    cd ${pathDir}/libvorbis-1.3.3/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "libvorbis installed"
    sleep 1
    
    
    
    echo "vo-aacenc install ..."
    sleep 1
    cd ${pathDir}/vo-aacenc-0.1.2/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "vo-aacenc installed"
    sleep 1
    
    
    echo "xvidcore install ..."
    sleep 1
    cd ${pathDir}/xvidcore/build/generic/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "xvidcore installed"
    sleep 1
    
    
    echo "yasm install ..."
    sleep 1
    cd ${pathDir}/yasm-1.2.0/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "yasm installed"
    sleep 1
    
    
    echo "x264 install ..."
    sleep 1
    cd ${pathDir}/x264-snapshot-20130505-2245-stable/
    ./configure --prefix=/usr/local/ --enable-shared --enable-pic
    make 
    make install
    echo "x264 installed"
    sleep 1
    
    
    echo "libraw1394 install ..."
    sleep 1
    cd ${pathDir}/libraw1394-2.0.5/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "libraw1394 installed"
    sleep 1
    
    
    echo "libdc1394 install ..."
    sleep 1
    cd ${pathDir}/libdc1394-2.2.1/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "libdc1394 installed"
    sleep 1
    
    
    echo "libfreetype install ..."
    sleep 1
    cd ${pathDir}/libfreetype2-master/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "libfreetype installed"
    sleep 1
    
    
    echo "fribidi install ..."
    sleep 1
    cd ${pathDir}/fribidi-0.19.4/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "fribidi installed"
    sleep 1
    
    
    echo "fontconfig install ..."
    sleep 1
    cd ${pathDir}/fontconfig-2.9.0/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "fontconfig installed"
    sleep 1
    
    
    echo "libass install ..."
    sleep 1
    cd ${pathDir}/libass-0.10.1/
    export PKG_CONFIG=/usr/bin/pkg-config
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "libass installed"
    sleep 1
    
    
    echo "openssl install ..."
    sleep 1
    cd ${pathDir}/openssl-1.0.1c/
    ./config --prefix=/usr/local/ --openssldir=/usr/local/openssl threads zlib-dynamic shared
    make && make install
    echo "openssl installed"
    sleep 1
    
    
    echo "librtmp install ..."
    sleep 1
    cd ${pathDir}/rtmpdump-2.3/
    make #SYS=posix
    make install
    echo "librtmp installed"
    sleep 1
    
    
    echo "speex install ..."
    sleep 1
    cd ${pathDir}/speex-1.2rc1/
    ./configure --prefix=/usr/local/ --enable-shared --enable-sse
    make && make install
    echo "speex installed"
    sleep 1
    
    
    
    echo "twolame install ..."
    sleep 1
    cd ${pathDir}/twolame-0.3.13/
    ./configure --prefix=/usr/local/ --enable-shared
    make && make install
    echo "twolame installed"
    sleep 1
    
    
    echo "ffmpeg install ..."
    sleep 2
    cd ${pathDir}/ffmpeg-2.6.3/
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    ./configure --prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libx264 --enable-libxvid --enable-pic --enable-pthreads --enable-libdc1394 --enable-libass --enable-pic --enable-openssl --enable-libtwolame --enable-libspeex --enable-libfreetype 
    #./configure --prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libx264 --enable-libxvid --enable-pic --enable-pthreads --enable-libdc1394 --enable-libass --enable-pic --enable-openssl --enable-libtwolame --enable-libspeex --enable-librtmp --enable-libfreetype 
    make
    make install
    echo "安装完成"
    echo "/usr/local/lib/" >> /etc/ld.so.conf
    echo "/usr/local/lib64/" >> /etc/ld.so.conf
    echo "/usr/lib64/" >> /etc/ld.so.conf
    ldconfig
    

      

    Blog都是随笔,只当做笔记,不会有详细介绍,测试请慎重。。。
  • 相关阅读:
    感觉每天打开自己的博客园, 想编程的心情就多了起来~~~
    算法图解相关代码整理
    github cli
    What's WebFlux ? And how to use it ? 一股有咖喱味的WebFlux简介
    style
    gradle 1
    gradle打包可运行jar
    外面下着雨
    天晴朗 看花儿多多开放
    Full Stack Reactive with React and Spring WebFlux
  • 原文地址:https://www.cnblogs.com/JerryBaxia/p/4776260.html
Copyright © 2011-2022 走看看