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時,就會報上面錯誤。

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

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

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

3)切換路徑: cd yasm-1.3.0

4)執行配置: ./configure

5)編譯:make

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

這樣ffmpeg就安裝成功了。

ffplay: command not found
如果你要用到ffplay的時候,發現沒有這個命令的時候,是因為ffplay和ffmpeg不是在一起的,需要單獨下載。ffplay下載地址 http://evermeet.cx/ffmpeg/ 。把下載下來的文件雙擊打開運行,如果提示Permission denied,到系統偏好設置,打開安全與隱私,允許ffplay運行就可以了。運行完之后,再在.bash_profile文件配置ffplay path就可以了(這個路徑就是ffplay文件的位置)。

./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-libfreetype

##安裝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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM