下载 ffmpeg 的 git版本git clone https://git.ffmpeg.org/ffmpeg
后,
按照 install.md
来安装 ffmpeg,
1. ./configure
2. make
3. make install
当然,ffmpeg也提供编译好的二进制文件,可以直接运行,但是这种就需要注意路径问题了,一般是作为备选。
./configure
时报错,
nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.
参考解决 ffmpeg yasm not found, use –disable-yasm for a crippled build,
brew install yasm
然后重新./configure
, 完成配置后,make
, 经过漫长的 编译时间后,再make install
(ubuntu 下需要 root权限),就可以了。
$ffmpeg
ffmpeg version N-89395-g71421f382f Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.38)
configuration:
libavutil 56. 5.100 / 56. 5.100
libavcodec 58. 6.102 / 58. 6.102
libavformat 58. 2.103 / 58. 2.103
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 6.100 / 7. 6.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'