Linux下编译FFmpeg

1、下载ffmpeg
下载网址:http://www.ffmpeg.org/download.html


2、环境

PC操作系统:Ubuntu kylin 14.04

FFmpeg Source:ffmpeg-3.2.2.tar.bz2


3、安装SDL

网上常见的SDL安装步骤介绍如下:

SDL是一个开源的多媒体开发库,可以设置图像和视频的绘制等操作。如果不安装SDL,FFMPEG将不能生成ffplay.exe播放器。在Ubuntu下安装SDL也很简单,只需要依次执行下列命令:

sudo apt-get install libsdl1.2-dev
sudo apt-get install libsdl-image1.2-dev
sudo apt-get install libsdl-mixer1.2-dev
sudo apt-get install libsdl-ttf2.0-dev
sudo apt-get install gfx1.2-dev

在./configure后,发现ffplay不支持,查到原因是ffmpeg 3.2.2版本不再支持sdl1.2,需要使用sdl2。所以安装sdl2后可以configure出ffplay。执行命令:

sudo apt-get install libsdl2-dev

FFmpeg官网说明如下:

http://www.ffmpeg.org/index.html#news

September 24th, 2016, SDL1 support dropped.

Support for the SDL1 library has been dropped, due to it no longer being maintained (as of January, 2012) and it being superseded by the SDL2 library. As a result, the SDL1 output device has also been removed and replaced by an SDL2 implementation. Both the ffplay and opengl output devices have been updated to support SDL2.

4、安装yasm

yasm用于x264中汇编语言优化

在Ubuntu下安装yasm也很简单,只需要执行如下命令:

sudo apt-get install yasm


5、配置
./configure --prefix=/usr/local/ffmpeg


6、编译安装
make
make install


7、ffplay播放测试

./ffplay xx.mp4

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值