Ubuntu20.04编译ffmpeg

1.安装编译所需工具,GCC
2.安装yasm nasm

  • yasm和nasm是两个编译器,编译ffmpeg需要用到
  • 安装命令: sudo aptitude install yasm nasm
    3.安装ffmpeg依赖库
    sudo apt-get install libgmp3-dev
    sudo apt install pkg-config
    sudo apt install gnutls-bin
    sudo aptitude install libaom-dev
    sudo aptitude install libass-dev
    sudo aptitude install libbluray-dev
    sudo aptitude install libfdk-aac-dev
    sudo aptitude install libmp3lame-dev
    sudo aptitude install libopencore-amrnb-dev
    sudo aptitude install libopencore-amrwb-dev
    sudo aptitude install libopenmpt-dev
    sudo aptitude install libopus-dev
    sudo aptitude install libshine-dev
    sudo aptitude install libsnappy-dev
    sudo aptitude install libsoxr-dev
    sudo aptitude install libspeex-dev
    sudo aptitude install libtheora-dev
    sudo aptitude install libtwolame-dev
    sudo aptitude install libvo-amrwbenc-dev
    sudo aptitude install llibvpx-dev
    sudo aptitude install libwavpack-dev
    sudo aptitude install libwebp-dev
    sudo aptitude install libx264-dev
    sudo aptitude install libx265-dev
    sudo aptitude install libxvidcore-dev
    sudo aptitude install liblzma-dev
    4.下载ffmpeg;FFmpeg 源码下载地址:
    5.解压到指定文件夹,如下图所示

6.命令行进入到解压后的配置安装ffmpeg:./configure --prefix=/home/deng/ffmpeg_workspace --enable-static --enable-shared
7.执行make
8.执行make install
9.编译完成后如下图:

10.如果有需要可以配置ffmpeg的环境变量

posted @ 2020-09-29 14:22  冷月枫寂  阅读(2559)  评论(0编辑  收藏  举报