Mac FFmpeg編譯和解決nasm/yasm not found or too old錯誤

FFmpeg編譯
下載代碼:git clone https://git.ffmpeg.org/ffmpeg.git
而後輸入命令進行編譯:找到下載的目錄下,而後用命令進入這個文件夾下cd ffmpeg,而後輸入./configure。
居然沒有編譯過出現錯誤是
nasm/yasm not found or too old. Use --disable-x86asm 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 "ffbuild/config.log" produced by configure as this will help
solve the problem.

分析:yasm是彙編編譯器,ffmpeg爲了提升效率使用了彙編指令,如MMX和SSE等。因此係統中未安裝yasm時,就會報上面錯誤。node

解決錯誤:安裝yasm編譯器。安裝方法以下:git

1)下載:[yasm的下載連接](http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz)安全

2)解壓:把下載下來的壓縮包進行解壓bash

3)切換路徑: cd yasm-1.3.0ide

4)執行配置: ./configureui

5)編譯:makethis

6)安裝:make install(提示:Permission denied,就執行sudo make install)

這樣ffmpeg就安裝成功了。.net

ffplay: command not found
若是你要用到ffplay的時候,發現沒有這個命令的時候,是由於ffplay和ffmpeg不是在一塊兒的,須要單獨下載。ffplay下載地址 http://evermeet.cx/ffmpeg/ 。把下載下來的文件雙擊打開運行,若是提示Permission denied,到系統偏好設置,打開安全與隱私,容許ffplay運行就能夠了。運行完以後,再在.bash_profile文件配置ffplay path就能夠了(這個路徑就是ffplay文件的位置)。debug

./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-small --arch=x86_64 --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-libfreetypeblog

##安裝libx264下載地址http://download.videolan.org/pub/videolan/x264/snapshots/./configure --enable-shared#make#make install————————————————版權聲明:本文爲CSDN博主「厚德.」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處連接及本聲明。原文連接:https://blog.csdn.net/qqqq245425070/article/details/83961218