./configure --prefix=/usr/local/Cellar/ffmpeg/4.1.3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-nonfree --enable-ffplay --enable-gpl --enable-libaom --enable-libwebp --enable-libx264 --enable-libx265 --enable-videotoolbox --enable-filter=delogo --enable-debug --enable-optimizations --enable-libspeex --enable-hardcoded-tables
sudo make -j8 && sudo make install
#Installing FFmpeg:
1. Type `./configure` to create the configuration. A list of configure
options is printed by running `configure --help`.
`configure` can be launched from a directory different from the FFmpeg
sources to build the objects out of tree. To do this, use an absolute
path when launching `configure`, e.g. `/ffmpegdir/ffmpeg/configure`.
2. Then type `make` to build FFmpeg. GNU Make 3.81 or later is required.
3. Type `make install` to install all binaries and libraries you built.
NOTICE
------
- Non system dependencies (e.g. libx264, libvpx) are disabled by default.
最后发现并没有编译出ffplay,在使用ffplay播放视频的时候没有找到ffplay.然后查看configure生成的config.mak文件,发现其中的关于
FFPLAY的一行前面有感叹号:
!CONFIG_FFPLAY=yes
也就是在生成配置文件时由于某些原因并没有成功生成编译ffplay的配置,最后查找原因是由于缺少了1个库:
sdl2.0
解决办法:
brew install sdl2
brew link sdl2