How to install ffmpeg mplayer and mancoder on CentOS 6

Download PDF

Installing FFmpeg, MPlayer and MEncoder on CPanel and Centos 6

First, we need to install RPMforge repository on CentOS 6.

1. Install the DAG GPG key.

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

ffmpeg01

2. Download RPMforge-release package.

cd /home
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm (if your server x86)
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

ffmpeg02

3. Verify the RPMforge-release package you have downloaded.

rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

ffmpeg03

4. Install the RPMforge-release package.

rpm -i rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

ffmpeg04

5. Now we can install FFmpeg, MPlayer and MEncoder.

yum install ffmpeg ffmpeg-devel mplayer mencoder

ffmpeg06

6. You may get this error when you try to install components.

Requires: perl-SGMLSpm >= 1.03ii

ffmpeg07

7. Download perl-SGMLSpm package to CentOS.

wget http://ftp.twaren.net/Linux/Scientific/41/i386/SL/RPMS/perl-SGMLSpm-1.03ii-14.noarch.rpm

ffmpeg08

8. perl-SGMLSpm may require OpenJade.

ffmpeg09

9. Let’s install openjade on CentOS.

yum install openjade

ffmpeg10

10. Try re-install perl-SGMLSpm.

rpm -ivh perl-SGMLSpm-1.03ii-14.noarch.rpm

ffmpeg11

11. After perl-SGMLSpm installation, you can continue to install FFmpeg, MPlayer and MEncoder.

yum install ffmpeg ffmpeg-devel mplayer mencoder

ffmpeg12

12. Now, you can test your ffmpeg installation.

ffmpeg -v

ffmpeg13

19 replies
  1. Asch
    Asch says:

    This is amazing, thank you! It saved my life! I spent the past hour looking for a way to install mplayer but everything ended up resulting in errors!

    Reply
  2. Andrej OSmicro
    Andrej OSmicro says:

    If you need to install MP4Box (Gapac) as well, search in our forum for a tutorial.
    FFMPEG is in general very sensitive to missing dependencies and will often fail to compile if anything is missing. If you are running a server with WHM & cPanel installed and if you are a “root” you can buy a great plugin for WHM called “Cpanel Xtra Admin”, it installs FFMPEG, mp4box, mancoder, mplayer etc with one click. The plugin is subscription based $4 per month, but you only need it once and then you can cancel it.

    Reply
  3. Asch
    Asch says:

    I’m actually trying to get screenshots working on a video server of mine, and I “supposedly” had to install Mplayer. It however, isn’t working, it would seem, and I’m back to where I started now.

    Reply
  4. Asch
    Asch says:

    A video thumbnail that us auto generated using JW Player. I have thousands of videos, but no thumbnail appearing. I know other sites that use the same software, with the same version of JW Player, and the same JW Player skin, but for the life of me… I just can’t seem to get it to work.

    Reply
  5. Asch
    Asch says:

    XFileSharing Pro. With the Video mod. I’m not using it for file sharing, but for video streaming. It works great; I just cannot seem to auto generate a thumbnail no matter what I try.

    Reply
  6. Asch
    Asch says:

    Sadly, the video mod isn’t open source. I’d be more than happy to let you take a look at my server with the mod installed if you’re interested though. I’ve been searching for days. I’m currently paying $200/mo for this and can’t let it go live until I have the thumbnails working! lol

    Reply
  7. Asch
    Asch says:

    Hey Andrej,

    Sorry for the late reply. I actually managed to get it sorted out! Yay for me haha. Thanks anyway!

    Regards,

    Reply
  8. Alex
    Alex says:

    Thank you very much for these instructions. FTP download in section 7 did not work so I downloaded perl-SGMLSpm-1.03ii-21.el6.noarch.rpm from http://rpmfind.net/linux/rpm2html/search.php?query=perl-SGMLSpm.

    It worked and I just tested by converting a few files from one format to another. Except that I could not convert to mp4 format properly. To convert to mp4 I got a message “The encoder ‘aac’ is experimental but experimental codecs are not enabled, add ‘-strict -2’ if you want to use it”. I need to look in to this.

    Many thanks again for these very helpful instructions.

    Reply
    • Andrej OSmicro
      Andrej OSmicro says:

      Cheers mate, glad it helped! Look, I have installed more than dozen of ffmpeg servers and every single one had a different problem lol . The problem is that repos and packages keep changing versions and that will cause problems. Google the issue, pretty sure someone found a solution for this particular prob.. Lately I have been using only cPanel based servers and there is a plugin you can purchase for $4 p/m called Xtra Ultimate and it has an inbuilt FFMPEG installer together with all other things needed to run a media server and its all done with one click, so I don’t have to waste my time anymore.

      Reply
    • Andrej OSmicro
      Andrej OSmicro says:

      Since I have written this post, versions have upgraded, so the links provided may not be the latest. For cPanel, I recommend installing a tool called WHMXTRA > http://www.whmxtra.com . It is very cheap, like $3-4 per month from http://www.buycpanel.com . Once installed, the tool will give you an option (amongst many many other) to install FFMPEG, MP4Box, FLVtool etc. It will all install it with one click. Once installed and confirmed it works, you can easily stop monthly payments. This is the easiest way to install FFMPEG and its modules.
      Let me know if you need any help.

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply