zoukankan      html  css  js  c++  java
  • Sword ffmpeg源码安装

    1.安装RHEL/Centos7默认的开发工具,包含gcc,g++,make等等一系列工具

    yum groupinstall "Development Tools"

    2.创建生成资源目录

    mkdir -p /opt/soft/ffmpeg

    3.安装依赖yasm

    yasm支持汇编优化,若不需要汇编优化的支持,可在编译选项中关闭yasm即可(--disable-yasm)。

    tar -zxvf yasm-1.3.0.tar.gz
    cd yasm-1.3.0
    ./configure --prefix="/opt/soft/ffmpeg/build" --bindir="/opt/soft/ffmpeg/bin"
    make
    make install

    4.安装mp3依赖libmp3lame

    1.下载lame源文件
    https://sourceforge.net/projects/lame/files/lame/3.99/
    2.解压源文件
    tar -zxvf lame-3.100.tar.gz
    3.编译安装
    cd lame-3.100
    ./configure --prefix="/opt/soft/ffmpeg/build" --bindir="/opt/soft/ffmpeg/bin" --disable-shared
    make
    make install

    5.安装opus依赖libopus

    tar -xzvf opus-1.3.1.tar.gz
    cd opus-1.3.1
    ./configure --prefix="/opt/soft/ffmpeg/build" --disable-shared
    make
    make install

    6.安装ffmpeg

    设置环境变量
    export PATH=/opt/soft/ffmpeg/bin:$PATH
    export PKG_CONFIG_PATH=/opt/soft/ffmpeg/build/lib/pkgconfig
     
     
    tar -jxvf ffmpeg-snapshot.tar.bz2
    cd ffmpeg
    ./configure --prefix=/usr/local/ffmpeg --enable-shared --enable-yasm --enable-gpl --enable-pthreads --enable-libmp3lame --enable-libopus
    make -j4
    make insatll

    错误说明

    ERROR: opus not found using pkg-config

    PKG_CONFIG_PATH配置不正确,解决方案是在安装libopus指定安装路径即可
  • 相关阅读:
    Linux自定义服务文件编写
    Ubuntu PPA方式安装vim
    ubuntu PPA使用指南
    ubuntu安装最新emacs
    Docker支持中文
    C#调用Go版DLL
    C#调用exe程序
    golang编写动态库供c#程序调用
    科学正在追赶中医,中医将变得时髦(转载)
    常见.NET功能代码汇总 (3)
  • 原文地址:https://www.cnblogs.com/zhanggaofeng/p/14616891.html
Copyright © 2011-2022 走看看