homebrew已经支持,建议直接 brew install ffmpeg
。以下方式会缺少一些库且较为麻烦~
参见此项目:https://github.com/ssut/ffmpeg-on-apple-silicon
前提是已经安装homebrew,网上有很多教程,不再赘述。
git clone https://github.com/ssut/ffmpeg-on-apple-silicon.git
cd ffmpeg-on-apple-silicon
然后运行
./build.bash
等待编译。
cd workdir/compile/ffmpeg
sudo make install
ffmpeg
输出
ffmpeg version git-2021-09-09-0b4d009 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.5 (clang-1205.0.22.11)
configuration:
libavutil 57. 5.100 / 57. 5.100
libavcodec 59. 7.103 / 59. 7.103
libavformat 59. 5.100 / 59. 5.100
libavdevice 59. 0.101 / 59. 0.101
libavfilter 8. 7.101 / 8. 7.101
libswscale 6. 1.100 / 6. 1.100
libswresample 4. 0.100 / 4. 0.100
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'