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指定安装路径即可
  • 相关阅读:
    牛客-小V和gcd树
    CF-Codeforces Round #639 (Div. 2)-D-Monopole Magnets
    牛客-牛牛染颜色
    CF-637
    提高办公效率——快捷键
    FusionComputer虚拟机克隆后出现网卡服务重启失败解决办法
    centos7.5mini中Firewalld端口不通解决办法及想法
    FusionConputer热迁移过程记录
    Java集合框架之Iterable接口
    初识Java集合框架
  • 原文地址:https://www.cnblogs.com/zhanggaofeng/p/14616891.html
Copyright © 2011-2022 走看看