请前往 模块插件 激活 UI Manage 然后刷新
webtechhost

Account Center

Support

  1. Home
  2. Knowledgebase
  3. Commonly tutorials
  4. FFmpeg Installation on a cPanel Server
Login
Knowledgebase

FFmpeg Installation on a cPanel Server

What is FFmpeg?

FFmpeg is a very fast video and audio converter. It can also convert between arbitrary sample rates and resize video on the fly with a high quality polyphase filter.

Installtion

First we need to install dependencies.

wget http://dl.fedoraproject.org/pub/epel/6/i386/yasm-1.2.0-1.el6.i686.rpm

rpm -Uvh yasm-1.2.0-1.el6.i686.rpm

cd /usr/local/src

wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.99.5.tar.gz

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

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

wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz

wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2

wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download

Untar all the mocules we have downloaded.

tar -zxvf lame-3.99.5.tar.gz
tar -zxvf libogg-1.3.1.tar.gz
tar -zxvf libvorbis-1.3.3.tar.gz
tar -zxvf flvtool2-1.0.6.tgz
tar -jxvf essential-20071007.tar.bz2
tar -jxvf ffmpeg-php-0.6.0.tbz2 

mkdir /usr/local/lib/codecs/

yum -y install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ncurses-devel -y

/scripts/installruby

DOWNLOAD FFMPEG and MPLAYER

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer

svn update

cd /usr/local/src/
mv /usr/local/src/essential-20071007/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

LAME

cd /usr/local/src/lame-3.99.5
./configure
make && make install

LIBOGG

cd /usr/local/src/libogg-1.3.1
./configure --enable-shared && make && make install
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

LIBVORBIS

cd /usr/local/src/libvorbis-1.3.3
./configure && make && make install

FLVTOOL2

cd /usr/local/src/flvtool2-1.0.6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

MPLAYER

cd /usr/local/src/mplayer
./configure && make && make install

FFMPEG

cd /usr/local/src/ffmpeg/
export TMPDIR=~/tmp-ffmpeg
mkdir $TMPDIR
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
make
make install
rm -rf $TMPDIR
export TMPDIR=
export LD_LIBRARY_PATH=/usr/local/lib/

ln -s /usr/local/lib/libavformat.so.52.93.0 /usr/lib/libavformat.so.52
ln -s /usr/local/lib/libavcodec.so.52.108.0 /usr/lib/libavcodec.so.52
ln -s /usr/local/lib/libavutil.so.50.36.0 /usr/lib/libavutil.so.50
ln -s /usr/local/lib/libmp3lame.so.0.0.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.52.93.0.51 /usr/lib/libavformat.so.52


FFMPEG-PHP

cd /usr/local/src/ffmpeg-php-0.6.0
vi ffmpeg_frame.c
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
:wq
phpize
./configure
make
make install

Then add the follwing line to php.ini file. 

extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/ffmpeg.so"

RESTART APACHE

/scripts/restartsrv httpd
  • 106 Users Found This Useful
Was this answer helpful?

Related Articles

How to change the display language on Windows Server 2012 R2 and Windows Server 2016

If you want to change the display language the following guide will help you to perform this on...

How to check Server hack and exim spamming issues

I am hereby providing some commands to have a basic checking on a server hack issue.  This will...

How to Install CSF in a cPanel server

What is CSF?CSF or Config server firewall is a firewall for Linux operating system. CSF has many...

How do I connect to my VPS/Dedicated server? (SSH) (Linux)

We recommend the program PuTTY for SSH. You can download it here:...

Harden and Secure a Linux/cPanel Server

Here I am describing some easier steps to secure a Linux based server. So of the steps are...