The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to install Mplayer and othe tools

Discussion in 'General Discussion' started by its_joe, Aug 31, 2007.

  1. its_joe

    its_joe Well-Known Member

    Joined:
    Feb 15, 2007
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    We have CentOS and WHM 11 on the server. I want to install following modules so how to install it on server:

    *FFMPEG (ffmpeg_source.tar.gz)
    *AMR 3gp Encoder (amrnb-6.1.0.4.tar.bz2)
    *ffmpeg-php (ffmpeg-php-0.5.0.tbz2)
    *Flvtool (flvtool2_1.0.5_rc6.tgz)
    *MPlayer (MPlayer-1.0rc1.tar.bz2)


    I have already istalled the following modules:
    *Lame
    *Libogg
    *Libvorbis
    *Codecs (essential-20061022.tar.bz2)

    Thanks for your suggestion and replies.

    its_joe
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    This is the walkthrough I posted for our customers for installing ffmpeg and its supporting software:

    To start out, enter into a temporary source directory and download all the binaries:

    cd /usr/src
    wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
    wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
    wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
    wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2


    Now extract everything:

    bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar
    tar zxvf flvtool2_1.0.5_rc6.tgz
    tar zxvf lame-3.97.tar.gz
    bunzip2 ffmpeg-php-0.5.0.tbz2; tar xvf ffmpeg-php-0.5.0.tar


    Created and import the Codecs directory:

    mkdir /usr/local/lib/codecs/
    mv essential-20061022/* /usr/local/lib/codecs/
    chmod -Rf 755 /usr/local/lib/codecs/


    Install Subversion and Ruby

    yum install subversion
    yum install ruby
    yum install ncurses-devel


    Get ffMPEG and MPlayer from SVN:

    svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
    svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer


    Install LAME:

    cd /usr/src/lame-3.97
    ./configure && make && make install


    Install libOgg and libVorbis:

    yum install libogg.i386
    yum install libvorbis.i386


    Install flvtool2

    cd /usr/src/flvtool2_1.0.5_rc6/
    ruby setup.rb config
    ruby setup.rb setup
    ruby setup.rb install


    Install MPlayer:

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


    Install ffMPEG:

    cd /usr/src/ffmpeg/
    ./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
    make && make install

    ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
    ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
    ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
    ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
    ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51


    You may get an error about a library path not being found, so you can just run this command:

    export LD_LIBRARY_PATH=/usr/local/lib


    If this is being installed on a dedicated server, you might also get an error about the /tmp directory not be executable, which is common when installing on a dedicated server with a separate /tmp partition. In this case, you will need to create a tmp dir in the ffmpeg folder and use that as the tmp disk for now:

    mkdir tmp
    chmod 777 tmp
    export TMPDIR=./tmp


    Then run the configure command. Don't forget to set the TMPDIR variable back to /tmp when you are done!

    export TMPDIR=/tmp


    Install ffMPEG-php

    cd /usr/src/ffmpeg-php-0.5.0/
    phpize
    ./configure && make && make install


    When the installation is complete, it will give you a long path to the shared libraries. This needs to be copied to the php.ini as so:

    [ffmpeg]
    extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so


    The 'no-debug-non-zts-xxxxxxxx' directory will be the one provided during installation. When this is done, restart Apache and check that the module is loaded in PHP:

    /etc/init.d/httpd restart
    php -r 'phpinfo();' | grep ffmpeg


    Look for this:

    ffmpeg
    ffmpeg support (ffmpeg-php) => enabled
    ffmpeg-php version => 0.5.0
    ffmpeg.allow_persistent => 0 => 0


    Also, test out ffmpeg for errors just by typing ffmpeg at the command line.


    ffmpeg: error while loading shared libraries: libavformat.so.51: cannot open shared object file: No such file or directory

    Edit /etc/ld.so.conf and add the line

    /usr/local/lib

    then save and exit.

    Now run this command:

    ldconfig -v
     
  3. redlorry919

    redlorry919 Well-Known Member

    Joined:
    Feb 14, 2004
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Great guide! Thanks for that it saved me loads of headscratching! :)
     
  4. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
  5. markfrompf

    markfrompf Well-Known Member

    Joined:
    Mar 27, 2006
    Messages:
    176
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles, CA
  6. radioraheem

    radioraheem Member
    PartnerNOC

    Joined:
    Mar 8, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lansing MI
    I tried this on my VPS running the latest current tree 11.23 and it failed.

    Oh well, worth a shot :)
     
  7. Shyam Mohammed

    Joined:
    Jul 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ernakulam, Kerala, IN
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page