Install FFmpeg on CentOS or RedHat EL 6.x

简介:

Install FFmpeg on CentOS or RedHat EL 6.x

The following install steps have been proven to work on RedHat Enterprise Linux 6.2. You can check which version you are running with


cat/etc/redhat-release

Additionally, we assume that you are connected and registered with the Red Hat network and/or updated the system with the latest updates from the repositories.


Follow this guide step by step!


Install the additional repo


rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Update repository


yum -y update

Install all necessary packages


yum install SDL-devel a52dec a52dec-devel alsa-lib-devel faac faac-devel faad2 faad2-devel

yum install freetype-devel giflib gsm gsm-devel imlib2 imlib2-devel lame lame-devel libICE-devel libSM-devel libX11-devel

yum install libXau-devel libXdmcp-devel libXext-devel libXrandr-devel libXrender-devel libXt-devel

yum install id3tag-devel libogg libvorbis vorbis-tools mesa-libGL-devel mesa-libGLU-devel xorg-x11-proto-devel xvidcore xvidcore-devel zlib-devel

yum install amrnb-devel amrwb-devel

yum install libtheora theora-tools

yum install glibc gcc gcc-c++ autoconf automake libtool

yum install ncurses-devel

yum install libdc1394 libdc1394-devel

yum install yasm nasm

yum install libvpx*

yum install git-core

yum install opencore-amr-devel

Install the essential codecs


wget http://www8.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2

bunzip2 all-20110131.tar.bz2; tar xvf all-20110131.tar

mkdir /usr/local/lib/codecs/

mkdir /usr/local/lib64/codecs/

cp all-20110131/* /usr/local/lib/codecs/

cp all-20110131/* /usr/local/lib64/codecs/

chmod -R 755/usr/local/lib/codecs/

chmod -R 755/usr/local/lib64/codecs/

Install LibOgg


wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz

tarxzvf libogg-1.3.0.tar.gz

cdlibogg-1.3.0

./configure

make

makeinstall

Install Libvorbis


wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz

tarxzvf libvorbis-1.3.3.tar.gz

cdlibvorbis-1.3.3

./configure

make

makeinstall

Install Libtheora


wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz

tarxzvf libtheora-1.1.1.tar.gz

cdlibtheora-1.1.1

./configure

make

makeinstall

Install Libvpx


git clone http://git.chromium.org/webm/libvpx.git

cdlibvpx

./configure--enable-shared --extra-cflags=-fPIC

make

makeinstall

Install Aacenc


wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.2.tar.gz

tarxzvf vo-aacenc-0.1.2.tar.gz

cdvo-aacenc-0.1.2

./configure--enable-shared

make

makeinstall

Install X264


git clone git://git.videolan.org/x264.git

cd x264

./configure --enable-shared --extra-cflags=-fPIC --extra-asflags=-D__PIC__

make

make install

Note: (Sometimes the network might be down. Then you can also grab it via wget at ftp://ftp.videolan.org/pub/videolan/x264/snapshots/last_stable_x264.tar.bz2)


Configure Libraries


exportLD_LIBRARY_PATH=/usr/local/lib/

echo/usr/local/lib> /etc/ld.so.conf.d/custom-libs.conf

ldconfig

Compile FFmpeg (the configure options have to be on one line)


git clone git://source.ffmpeg.org/ffmpeg.git

cd ffmpeg

git checkout n1.2

./configure --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac \

--enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid --disable-ffplay \

--enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --extra-cflags=-fPIC

make

make install

(The --arch=x86_64 option should only be used if you are on a 64Bit System!)


You can also use their Github repository at https://github.com/FFmpeg/FFmpeg.git.


That's it. This should give you a full functional FFMpeg installation for Razuna. Test it now with;


ffmpeg

This should give you the following back (yours might vary a bit);


FFmpeg version SVN-r20525, Copyright (c) 2000-2009Fabrice Bellard, et al.

configuration: --enable-gpl --enable-nonfree --enable-postproc --enable-libfaad --enable-avfilter

--enable-pthreads --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac

--disable-ffserver --disable-ffplay --enable-libamr-nb --enable-libamr-wb --enable-libtheora

--enable-libvorbis --disable-ffplay --enable-shared

libavutil     50. 4. 0/ 50. 4. 0

libavcodec    52.39. 0/ 52.39. 0

libavformat   52.39. 2/ 52.39. 2

libavdevice   52. 2. 0/ 52. 2. 0

libavfilter    1. 8. 0/  1. 8. 0

libswscale     0. 7. 1/  0. 7. 1

libpostproc   51. 2. 0/ 51. 2. 0

Try to convert a movie with;


ffmpeg -i movie.mov -vcodec libx264 -vpre hq -acodec libfaac movie.mp4



本文转自 holy2009 51CTO博客,原文链接:http://blog.51cto.com/holy2010/1288476

相关文章
|
Linux 开发工具 C语言
Centos8下编译安装最新版ffmpeg解决方案(含Centos8换源阿里云)
Centos8下编译安装最新版ffmpeg解决方案(含Centos8换源阿里云)
2607 3
|
存储 Linux
CentOS 7 上安装和使用 FFmpeg
FFmpeg 是一个用于处理多媒体文件的免费开源工具集合。它包含一组共享的音频和视频库,例如 libavcodec、libavformat 和 libavutil。使用 FFmpeg,您可以在各种视频和音频格式之间进行转换、设置采样率、捕获流音频/视频以及调整视频大小 #云库工具#。
2099 1
|
Linux Shell Python
centos执行pip3 install etcd3报错
centos执行pip3 install etcd3报错
|
关系型数据库 MySQL Linux
Linux部署实战前言,MySQL在CentOS安装【单机软件】,MySQL的安装需要root权限,yum install mysql,systemctl enable mysqld开机自启的意思
Linux部署实战前言,MySQL在CentOS安装【单机软件】,MySQL的安装需要root权限,yum install mysql,systemctl enable mysqld开机自启的意思
|
Linux Docker 容器
CentOS7 Install Docker Compose
CentOS7 Install Docker Compose
404 0
|
Linux 开发工具
centos 安装ffmpeg
centos 安装ffmpeg
946 0
|
缓存 网络协议 Linux
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
|
存储 缓存 运维
运维 --- Nginx介绍和在CentOS/Redhat下安装
运维 --- Nginx介绍和在CentOS/Redhat下安装
运维 --- Nginx介绍和在CentOS/Redhat下安装
|
Linux Shell
三行命令在CentOS 8上安装FFmpeg
三行命令在CentOS 8上安装FFmpeg
1717 0
|
监控 关系型数据库 MySQL
centos/redhat 7 下zabbix安装及使用
centos/redhat 7 下zabbix安装及使用
1207 0
centos/redhat 7 下zabbix安装及使用