01-ffmpeg 安装

安装

官网下载地址:https://ffmpeg.org/download.html#build-windows

windows 安装

windows 安装包下载地址

下载之后,解压安装包会得到如下目录:

1
2
3
bin
doc
LICENSE.txt

添加到环境变量

在此电脑界面下 右击选择属性 > 高级系统设置 > 环境变量

在用户环境变量 双击 path,选择新建(注意不要更改其他环境变量),将解压缩的 bin 路径粘贴进去

记得点下方的确定,再关闭当前窗口再点确定以保存

到这里,ffmpeg 的配置就差不多了,调用命令行(windows+R输入cmd)输入 ffmpeg -version,如果出现如下说明配置成功

1
2
3
4
5
6
7
8
9
10
11
ffmpeg version n4.4.1-50-ga4e1dd6940-20220324 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --disable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --disable-vulkan --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220324
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100

Linux 安装

官网下载地址:https://www.johnvansickle.com/ffmpeg/old-releases/

  1. 下载解压

    1
    2
    wget http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz
    tar -xvf ffmpeg-3.1.tar.gz
  2. 进入解压后目录,输入如下命令 /usr/local/ffmpeg 为自己指定的安装目录

    1
    2
    3
    cd ffmpeg-3.1
    ./configure --prefix=/usr/local/ffmpeg
    make && make install
  3. 配置变量

    1
    2
    3
    4
    5
    6
    7
    vi /etc/profile
    # 在最后PATH添加环境变量:
    export PATH=$PATH:/usr/local/ffmpeg/bin

    # 保存退出,查看是否生效
    # 设置生效
    source /ect/profile
  4. 查看版本

    1
    ffmpeg -version    查看版本

注意:

若安装过程中出现以下错误:

yasm/nasm not found or too old. Use –disable-yasm for a crippled build. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file “config.log” produced by configure as this will help solve the problem.

需要安装 yasm

1
2
3
4
5
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

01-ffmpeg 安装
https://flepeng.github.io/工具-11-FFmpeg-01-ffmpeg-安装/
作者
Lepeng
发布于
2021年3月12日
许可协议