install ffmpeg from source for OS X/ubuntu

本文档介绍了如何从源代码编译安装FFmpeg。首先,下载FFmpeg的git版本,然后按照步骤进行:1.运行./configure;2.执行make;3.使用make install(在Ubuntu下可能需要root权限)。在编译过程中遇到yasm未找到的问题,可以使用--disable-yasm参数以禁用yasm编译,但可能导致功能受限。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下载 ffmpeg 的 git版本git clone https://git.ffmpeg.org/ffmpeg后,
按照 install.md来安装 ffmpeg,
1. ./configure
2. make
3. make install
当然,ffmpeg也提供编译好的二进制文件,可以直接运行,但是这种就需要注意路径问题了,一般是作为备选。
./configure 时报错,

nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.

参考解决 ffmpeg yasm not found, use –disable-yasm for a crippled build,

brew install yasm

然后重新./configure, 完成配置后,make, 经过漫长的 编译时间后,再make install(ubuntu 下需要 root权限),就可以了。

$ffmpeg
ffmpeg version N-89395-g71421f382f Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.38)
  configuration: 
  libavutil      56.  5.100 / 56.  5.100
  libavcodec     58.  6.102 / 58.  6.102
  libavformat    58.  2.103 / 58.  2.103
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  6.100 /  7.  6.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
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'
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值