源码安装ffmpeg(带libx264)
环境:CentOS6.2_64
1、下载源码包
wget ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20120718-2245-stable.tar.bz2
解压:tar jxvf x264-snapshot-20120718-2245-stable.tar.bz2
wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.gz
解压:tar zxvf ffmpeg-0.11.1.tar.gz
2、安装x264
2.1 安装依赖包
缺少yasm
安装:yum install yasm -y
2.2 安装x264
./configure --prefix=/usr --enable-shared && make && make install
重新加载配置:ldconfig
3、安装ffmpeg
ffplay必须依赖于sdl库
yum install SDL -y
安装:
./configure --enable-libx264 --enable-gpl && make && make install
附(自动安装脚本):
#! /bin/bash echo "Install yasm ..." yum install yasm SDL* gtk+* -y echo "Install libx264 ..." wget ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20120718-2245-stable.tar.bz2 tar jxvf x264-snapshot-20120718-2245-stable.tar.bz2 cd x264-snapshot-20120718-2245-stable ./configure --enable-shared && make && make install ldconfig echo "Install ffmpeg ..." cd .. wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.gz tar zxvf ffmpeg-0.11.1.tar.gz cd ffmpeg-0.11.1 ./configure --enable-libx264 --enable-gpl && make && make install
· 编码之道,道心破碎。
· 记一次 .NET 某发证机系统 崩溃分析
· 微服务架构学习与思考:SOA架构与微服务架构对比分析
· tomcat为什么假死了
· 聊一聊 Linux 上对函数进行 hook 的两种方式
· 编码之道,道心破碎。
· 知名开源项目Alist被收购!惹程序员众怒,开团炮轰甲方
· 千万级大表,如何做性能调优?
· 不写代码,让 AI 生成手机 APP!保姆级教程
· 记一次 .NET 某发证机系统 崩溃分析