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

相关文章
相关标签/搜索