Install ffmpeg on CentOS (RHEL/Fedora)

本文提供了一套详细的FFmpeg及其相关组件的编译安装步骤,包括yasm、x264、lame等,适用于CentOS系统。通过这些步骤可以搭建一个完整的音视频处理环境。

mkdir ffmpeg_sources

cd ffmpeg_sources/


yasm

wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar zxvf yasm-1.2.0.tar.gz
./configure
make && sudo make install


x264

git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static
make && sudo make install


lame

curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar zxf lame-3.99.5.tar.gz
./configure --enable-nasm
make && sudo make install


ogg

wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
tar zxvf libogg-1.3.0.tar.gz
cd libogg-1.3.0
./configure
make && sudo make install


libvorbis

curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
tar zxvf libvorbis-1.3.4.tar.gz
./configure --with-ogg
make && sudo make install


libvpx

git clone git:////github.com/webmproject/libvpx.git
cd libvpx/
./configure
make && sudo make install
sudo echo /usr/local/lib > /etc/ld.so.conf.d/local-libs.conf
sudo ldconfig


ffmpeg

git clone git://git.videolan.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-libmp3lame --enable-gpl --enable-libx264 --enable-libxvid --enable-postproc --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libfaac
make && sudo make install


ffmpeg -headers "X-Forwarded-For: 160.53.186.194" -i http://stmw.rthk.hk/aod/_definst_/radio/archive/radio1/City_Snapshot/mp3/mp3:20150824.mp3/playlist.m3u8 -c copy City_Snapshot-20150824-.mp3

the option "headers" must be put here for download this m3u8


Reference

https://trac.ffmpeg.org/wiki/CompilationGuide/Centos

http://injustfiveminutes.com/2013/07/17/how-to-compile-latest-version-of-ffmpeg-on-centos-5/


转载于:https://my.oschina.net/l1z2g9/blog/498050

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值