zoukankan      html  css  js  c++  java
  • Centos8.2源码安装ffmpeg4.3.1

    一、安装依赖

    1.1 安装tiff、png、gif等依赖
    dnf -y install   automake autoconf libtool make gcc gcc-c++
    dnf --enablerepo=PowerTools -y install giflib-devel
    dnf --enablerepo=PowerTools -y install libexif-devel
    dnf -y install bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel  cairo-devel fribidi-devel

    1.2  安装yasm (源码编译安装)

       cd /tmp
       wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
       tar zxvf yasm-1.3.0.tar.gz
       cd  yasm-1.3.0
       ./configure 
       make 
       make install

    1.3 安装nasm(源码编译安装)

      cd /tmp
      wget https://www.nasm.us/pub/nasm/releasebuilds/2.15/nasm-2.15.tar.gz
      tar xvf nasm-2.15.tar.gz
      cd nasm-2.15
      ./configure 
      make 
      make install

    1.4 安装libx264(源码编译安装) H264编码器

       cd /tmp
       yum install git (可选)
       git clone https://code.videolan.org/videolan/x264.git
       cd x264
       ./configure  --enable-shared
       make 
       make install

    1.5 安装 libmp3lame(源码编译安装) mp3编码器

       cd /tmp
       wget https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz
       tar zxvf lame-3.100.tar.gz
       cd lame-3.100
       ./configure --enable-shared
       make 
       make install

    1.6安装图形库

     cd /tmp
      wget http://download.mono-project.com/sources/libgdiplus/libgdiplus0-6.0.5.tar.gz
      tar zxvf libgdiplus0-6.0.5.tar.gz
      cd libgdiplus-6.0.5
      ./configure
      make 
      make install
     echo "/usr/local/lib" >> /etc/ld.so.conf
      ldconfig

    二、安装ffmpeg

       cd /tmp
       wget http://ffmpeg.org/releases/ffmpeg-4.3.1.tar.gz
       tar zxvf  ffmpeg-4.3.1.tar.gz
       cd ffmpeg-4.3.1
       ./configure   --enable-gpl --enable-libx264  --enable-libmp3lame  --enable-libfreetype --enable-libfontconfig --enable-libfribidi
       make
       make install

    三、测试

    ffmpeg

    四、常见问题

    [error while loading shared libraries: libx264.so.138: cannot open shared object file: No search File]

    https://blog.csdn.net/ai2000ai/article/details/55260929

    https://www.cnblogs.com/blackhumour2018/p/9400415.html

    作者: jamesbing
    提示: 欢迎转载,但是必须保留本文的署名 jamesbing (包含链接)
  • 相关阅读:
    Java集合(二)-Set集合
    Java集合类
    Java构造器和初始化块
    学习OpenStack-Neutron网络服务
    Error response from daemon: Get https://index.docker.io/v1/search?q=tomcat&n=25: net/http: TLS handshake timeout
    学习OpenStack-Nova计算服务
    学习OpenStack-Glance组件部署
    报错:rsync同步报错
    报错:创建nginx镜像时出现报错
    报错:重启Docker报错如何解决
  • 原文地址:https://www.cnblogs.com/gaobing/p/14501676.html
Copyright © 2011-2022 走看看