for i386:
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.i686.rpm

for x86_64:
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

Install the utilites of ffmpeg.

RedHat/Centos:

# yum groupinstall -y “Development Tools”

or

yum install zlib-devel automake autoconf gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran gcc-c++ mesa-libGL-devel mesa-libGLU-devel libXi-devel libXmu-devel freeglut-devel freeglut libtool ncurses-devel

Debian/Ubuntu:

#apt-get install build-essential

Dynamic Linked Libraries Path

Linux uses a system of shared libraries, similar to Windows dlls, for the efficient use of space and resources, and modularity.

Add those  below entry in  /etc/ld.so.conf

/usr/local/lib
/usr/lib

ldconfig

Proceed with installing FFMPEG and some development packages

yum install ffmpeg-devel php-devel re2c php-xml ffmpeg

verifyFFMPEGis installed successfully by executing

ffmpeg

you should get something like

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder

6. Compile and install the FFMPEG-PHP extension

mkdir /srv/build
cd /srv/build
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0/ phpize
./configure

now run the following to prevent compilation failure with something likeffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)

sed -i 's#PIX_FMT_RGBA32#PIX_FMT_RGB32#' ./ffmpeg_frame.c

and compile and install using

make
make install

you should end up with something like

Installing shared extensions:     /usr/lib64/php/modules/

7. Load the FFMPEG-PHP extension and reload Apache

echo -e "extension=ffmpeg.son" > /etc/php.d/ffmpeg.ini

restart the webserver by

/etc/init.d/httpd restart

verify that theFFMPEG-PHPextension is loaded

php -i | grep ffmpeg
php -m | grep ffmpeg
 

FLVTOOL2

FLVTOOL2 is probably the most popular open source tool for injecting metadata in FLV files. It is written in Ruby, so it requires the installation of this programming language for it to work.
Installing Ruby
Installing Using YUM

Type these commands into SSH:

yum update
yum install ruby rubygems

Common Problems
WHM/Cpanel

WHM setup may prevent that Ruby can be installed using a package manager. To easily install Ruby in a WHM/cpanel server use the provided script

/scripts/installruby

The Installation Process

Once installed Ruby and Ruby gems, flvtool2 can be easily installed using:

gem install flvtool2

Alternatively, it can be installed using the following procedure:

Type these commands into SSH:

cd /usr/local/src
wget https://ffmpeg-install-centos.googlecode.com/files/flvtool2-1.0.6.tgz
tar zxvf flvtool2-1.0.6.tgz
cd /usr/local/src/flvtool2-1.0.6/
ruby setup.rb config && ruby setup.rb setup && ruby setup.rb install
 

MP4box install on centos

MP4Box is a MP4 multiplexer. It can import MPEG-4 video, DivX, XviD, 3ivx, h264 etc, audio streams and subtitles into the .mp4 container.

cd /usr/local/src
wget http://downloads.sourceforge.net/gpac/gpac-0.5.0.tar.gz
wget http://downloads.sourceforge.net/gpac/gpac_extra_libs-0.5.0.tar.gz
tar zxvf gpac-0.5.0.tar.gz
# tar zxvf gpac_extra_libs-0.5.0.tar.gz
cd  gpac
cp -r ../gpac_extra_libs/* extra_lib/
chmod +x configure
./configure
make lib
make apps
make install-lib
make install
cp bin/gcc/libgpac.so /usr/lib

最新文章

  1. Android进度条学习
  2. spring知识大全(3)
  3. Objective C 快速入门学习一
  4. 使用UIKit制作卡牌游戏(二)ios游戏篇
  5. Win7_刻录DVD
  6. jstl的forEach使用和jstl变量实现自增
  7. crm操作权限
  8. HDU 1796 Howmany integers can you find (容斥原理)
  9. List分页 参考
  10. webapp之路--apple私有属性apple-touch-icon
  11. 一个很好玩的命令:stty
  12. Xcode插件失效解决办法
  13. span表情输入框 --- Author: rose && lvyerose@163.com
  14. C++ WMI获取系统硬件信息(CPU/DISK/NetWork etc)
  15. Revit二次开发 推荐
  16. 微信JSAPI支付回调
  17. Nginx 简单安装
  18. mysql大全
  19. k8s总结(脑图图片)
  20. yolov2-tiny-voc.cfg 参数解析

热门文章

  1. rabbitMQ入门
  2. POJ3295 Tautology(枚举)
  3. HDU Train Problem I 1022 栈模拟
  4. 【转】(DT系列六)devicetree中数据和 struct device有什么关系
  5. HDOJ 1056 HangOver(水题)
  6. K - The Unique MST - poj 1679
  7. Java容器详解
  8. iOS 跑马灯 之 TXScrollLabelView
  9. hdu 4540 威威猫系列故事——打地鼠 dp小水题
  10. floor() 和 ceil()函数