How to install ClipBucket requirements on RedHat Enterprise 5 Server with cPanel

Hey folks!

Since I have received tons of messages about what hosting provider I recommend to run ClipBucket with FFMPEG I have decided to share with you this great company where I moved all my websites to, they are Linode. They offer GREAT SERVICE & SUPPORT (They answered my ticket to add an additional IP to my VPS in less than 5 minutes!) and also they have pretty cheap rates starting at $19.95 for a 512Mb Linux VPS with 16Gb of RAM. For more info click the image below:

Linode VPS for FFMPEG and ClipBucket (YouTube clone script)


Last update: 06/08/2010

Due to the high amount of messages and questions on this post, we at AM Technology & Systems thought that will be great to offer this installation or troubleshoot FFMPEG issues as one of our services, so…

Get this software installed by Experts! Check AM Technology & Systems


The other day I had to install some software for a customer to run the Clip Bucket (http://www.clip-bucket.com) script on their server. It was a lot of steps so I documented it and now I am sharing with you so you don’t have to research like I did to met all the requirements for Clip Bucket because in their website they don’t have a guide showing how to install it. Let’s get our hands dirty!

Install Development Tools:

yum groupinstall ‘Development Tools’

Install RPMForge Repository:

For 32 Bits installations: rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.i386.rpm

For 64 Bits installations: rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

Install yasm package:

yum install yasm

Install SVN (subversion) package:

yum install subversion

Install OpenCore-AMR:

cd /usr/src
wget http://sourceforge.net/projects/opencore-amr/files/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz/download
tar -zxvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure
make
make install

Install Lame (libmp3lame):

Note that the command has –with (It is double -)

cd /usr/src
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz/download
tar -zxvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure –with-vorbis
make
make install

Install Ogg codec:

cd /usr/src
wget http://svn.xiph.org/releases/ogg/libogg-1.2.0.tar.gz
tar -zxvf libogg-1.2.0.tar.gz
cd libogg-1.2.0
./configure
make
make install

Refresh Libraries installed in the system:

ldconfig -v

Install Vorbis:

cd /usr/src
svn checkout -r 17000 http://svn.xiph.org/trunk/vorbis/ vorbis
cd vorbis
./autogen.sh
make
make install

Install XVid codec:

cd /usr/src
wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
tar -zxvf xvidcore-1.2.2.tar.gz
cd xvidcore
cd build/generic
./configure
make
make install

Install x264 codec:

Note that the command has –enable-shared (It is double -)

cd /usr/src
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20101101-2245.tar.bz2
tar -xvjf x264-snapshot-20101101-2245.tar.bz2
cd x264-snapshot-20101101-2245
./configure –enable-shared
make
make install

Install FAAD2:

cd /usr/src
wget http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.7/faad2-2.7.tar.gz/download
tar -zxvf faad2-2.7.tar.gz
cd faad2-2.7
./configure
make
make install

Install FAAC:

cd /usr/src
wget http://sourceforge.net/projects/faac/files/faac-src/faac-1.28/faac-1.28.tar.bz2/download
tar -xvjf faac-1.28.tar.bz2
cd faac-1.28
./configure
make
make install

Install FFMPEG:

Note that the command has –enable…. (It is double -)

cd /usr/src
svn checkout -r 25620 svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg

./configure –prefix=/usr/local –enable-pthreads –enable-pic –enable-gpl –enable-version3 –enable-libmp3lame –enable-nonfree –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libvorbis –disable-mmx –enable-shared –enable-libxvid –enable-libx264 –enable-libfaac

make
make install

Note: If you get an error like this when running the ./configure command:

Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity test failed.

Then you will have to create a directory for example /usr/src/tmp and set the TMPDIR environment variable doing export TMPDIR=/usr/src/tmp and try again.

Configure LD to add the path where FFMPEG is installed:

echo “/usr/local/lib” > /etc/ld.so.conf.d/ffmpeg.conf

Refresh the LD cache: ldconfig -v

Install MP4Box (gpac):

cd /usr/src
wget http://sourceforge.net/projects/gpac/files/GPAC%20extra%20libs/GPAC%20extra%20libs%200.4.5/gpac_extra_libs-0.4.5.tar.gz/download
tar -zxvf gpac_extra_libs-0.4.5.tar.gz
wget http://sourceforge.net/projects/gpac/files/GPAC/GPAC%200.4.5/gpac-0.4.5.tar.gz/download
tar -zxvf gpac-0.4.5.tar.gz
cd gpac_extra_libs
cp -R * ../gpac/extra_lib
cd ../gpac
chmod +x configure
./configure –use-js=no
make lib
make apps
make install-lib
make install
cp bin/gcc/libgpac.so /usr/lib

Configure LD to add the path where gpac is installed:

echo “/usr/lib” > /etc/ld.so.conf.d/gpac.conf

Refresh the LD cache: ldconfig -v

Install Ruby (Needed for FLVTool2):

cd /usr/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p376.tar.gz
tar -zxvf ruby-1.9.1-p376.tar.gz
cd ruby-1.9.1-p376
ls
./configure
make
make  install

Install FLVTool2:

cd /usr/src
wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
tar -zxvf flvtool2-1.0.6.tgz
cd flvtool2-1.0.6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

And that should be all! After you install the above software remember to change the paths for all in the Website Configuration settings in your ClipBucket website.

If you followed all the guide the correct paths of the software should be like the ones in the images which are:

FFMPEG: /usr/local/bin/ffmpeg

PHP: /usr/bin/php

FLVTool2: /usr/local/bin/flvtool2

MP4BOX: /usr/local/bin/MP4Box

Here is a screenshot with all the required software up & running on the server:


Prior Updates:

Last update: 02/08/2010

I have made some corrections and adds to the howto, for example running ldconfig -v in some places to refresh libraries in the system, upgrading FFMPEG version to 22733 because as Arandas said the old version break swscale lib. I have found some issues with the ClipBucket not detecting libfaac or libtheora with the version 22733 but it is enabled and working in FFMPEG, so have that in mind when you do the module check.


Last update: 23/07/2010

I have fixed a typo in the FAAC download link, thanks to Arandas comment


Last update: 17/06/2010

I have changed the version of FFMPEG (r22608) after some issues with last FFMPEG trunk versions with MP4Box(gpac). Also I have changed some links to make them easier to copy and paste.

    • Kyle
    • November 30th, 2010

    I did this on ubuntu and I didn’t have an issue at all except the first few things are irrelevant, everything else installed minus a few changes.

    In FAAC you’ll get an error, Remove line 126 containing strcasecmp from mpeg4ip.h as a temporary workaround.

    Then you shouldn’t get any errors

    • Kyle
    • November 30th, 2010

    Last update, i will be writing a script for this way and for general linux users.

  1. Hi,

    I receive below error while trying to install OGG.

    root@vid [/usr/src/vorbis]# cd /usr/src
    root@vid [/usr/src]# svn checkout http://svn.xiph.org/trunk/ogg/ ogg
    Checked out revision 17790.
    root@vid [/usr/src]# cd ogg
    root@vid [/usr/src/ogg]# ./autogen.sh
    checking for autoconf…
    checking for automake 1.11 or later… no
    checking for aclocal 1.11 or later… no

    You must have automake installed to compile libogg.
    Download the appropriate package for your distribution,
    or get the source tarball at ftp://ftp.gnu.org/pub/gnu/
    root@vid [/usr/src/ogg]#

    But automake latest version is already installed.

    Can you help me with this?

  2. Hi Kevin,

    You can try this:

    hash -r

    To refresh the path of the installed apps, if it doesn’t work after that then you should check if automake is properly installed and if it is where the autogen.sh is expecting to be.

    If you have further questions or need assistance, you can contact us at http://amtechhelp.com/ffmpeg-installation/

    Thanks!
    Andres Montalban

  3. Hi, I tried that but it didnt work. Is there anyway to reinstall from the beginning?

    Thanks

  4. Hi Kevin,

    Well you can start from the beginning again, what was not working for you?

    Thanks,
    Andres Montalban

    • A.K
    • February 16th, 2011

    Hi, luv your tutorial but i wanna ask, can this work with Ubuntu 10? i already tried installing and compiling like is said all over the web but my videos on clip-bucket dont work still, i use the xampp server, please kindly assist me because i have tried and tried:( @Andres Montalban

  5. Hi,

    Can you post the errors that you are getting? Without that I can’t help you. If you want to make it work you can also contact us at http://amtechhelp.com and we will do it for you.

    Have a great day!

    All the best,
    Andres Montalban

  6. i make all step and still my ffmpeg do not work. can you hel me?
    i run a OS centos 64bit and plesk 9.2

  7. These steps look quite confusing

  8. Will restart this momentarily. Thanks for posting the steps for installation! =)

    http://www.DrewryMedia.com

    • Bruno Scota
    • July 26th, 2011

    I was stopped in this step for hours, but i solve it just typing: “export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib”

    in that case we’re adding an environment variable to set where’s our ogg path.

    It’s working!

    Tested with CentOs 5.6 final.

    Thank you so much for your “HowTo”.

    @Andres Montalban

    • Brian
    • September 29th, 2011

    FFMPEG does not use SVN anymore (See: http://ffmpeg.org/download.html).

    Use instead:
    wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
    tar -xvjf ffmpeg-snapshot.tar.bz2

    • Tom
    • September 29th, 2011

    This tut is very out of date. I would not reccomend anyone use it till its updated.
    downloading ffmpeg gives error:
    svn: warning: Error handling externals definition for ‘ffmpeg/libswscale’:
    svn: warning: URL ‘svn://svn.ffmpeg.org/mplayer/trunk/libswscale‘ at revision 34160 doesn’t exist
    Checked out revision 25620.

    using latest ffmpeg causes issue with outdated x264.

    Using latest x264 causes issue with latest ffmpeg!!
    libavcodec/libavcodec.so: undefined reference to `x264_encoder_open 118′

    • Deemah
    • October 17th, 2011

    Hello. I am trying to install Clipbucket and all its required modules on Ubuntu 11.4. I have followed your tutorial and have everything installed except for FAAC and MP4BOX.

    FAAC –> Error in common/mp4v2 and 3gp.o

    MP4BOX –> error [libgpac.so] missing -lglut found in ‘usr/build’

    The most important one of the two is the MP4BOX which is not being installed properly.

    Help!

    • Eichcj
    • December 30th, 2011

    I have installed all modules and they are working correctly for Clipbucket V2 except for Mp4Box. The build dies in the first ./configure

    #./configure -use-js=no
    /usr/bin/ld: cannot find -lglut
    collect2: ld returned 1 exit status
    make[1]: ***[libgpac.so] Error 1
    make[1]: Leaving directory ‘/usr/local/src/gpac/src’
    make: *** [lib] Error 2

    Obviously, continuing the build fails. I would like to get Mp4box installed it is the last module that is required.

  9. do you have this documentation for ubuntu 11.04 server ?
    I think I need it too.
    my site seems to be working but it not processing most of the uploaded videos, specially those *.3gp

    any input will be greatly appreciated. thank you

    • Gagandeep Singh
    • January 22nd, 2012

    How much do you guys do all of this for

  1. No trackbacks yet.