mac 安装ffmpeg以及各种编码器

首先用homebrew安装各种编码器

brew install automake fdk-aac git lame libass libtool libvorbis libvpx opus sdl shtool texi2html theora wget x264 x265 xvid nasm```

如果有安装过老版本ffmpeg的,可能需要更新(比如我在安装中发现以下几个依赖在我安装老版本的ffmpeg的时候安装过了,但是需要更新,否则后面运行ffmpeg会报错)

brew upgrade x265 libvpx libtool automake

最后带依赖安装ffmpeg

brew install ffmpeg  --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid```

环境变量设置参考我另一篇博文。最后查看版本:

ffmpeg -version 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在Mac安装FFmpeg,您可以按照以下步骤进行操作: 1. 打开终端(Terminal)应用程序。 2. 使用Homebrew包管理器来安装FFmpeg。如果您还没有安装Homebrew,可以在终端中输入以下命令进行安装: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` 3. 安装FFmpeg。在终端中输入以下命令: `brew install ffmpeg` 4. 等待安装完成。一旦安装完成,您就可以使用FFmpeg来处理音频和视频文件了。 现在,您可以使用FFmpeg的各种功能了。例如,要裁剪视频文件,您可以使用以下命令: `ffmpeg -i input.mp4 -an -vf "crop=240:480:120:0" -vcodec libx264 -b:v 600k output.mp4` 要转换音频文件的编码格式,您可以使用以下命令: `ffmpeg -i input.wav -acodec libfdk_aac output.aac` 最后,您可以验证FFmpeg是否成功安装。在终端中输入以下命令: `ffmpeg -version` 如果您看到打印出FFmpeg的版本信息,那么说明FFmpeg已经成功安装在您的Mac上了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Mac下的FFmpeg安装和基本使用](https://blog.csdn.net/qq_36261644/article/details/88726364)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [Mac版 下载安装FFmpeg](https://blog.csdn.net/qq_45956730/article/details/125301182)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值