Update 20131007: The ffmpeg package in this repo isn’t exactly new, so if you’re looking for the latest and greatest featureset consider using the static builds.

I ran into some trouble installing ffmpeg on Amazon linux and while there are some guides out there I didn’t like that they just told you to “Figure out the repo conflicts”. I’m very paranoid about mixing repos especially on production servers so whenever I need to use another repo I explicitly allow only the packages I want with includepkgs. To save others the headache of tracking down dependencies, I’ve decided to record my work here. Before you do anything, make sure all your packages are up to date.

For starters, you’ll need to create the repository files under /etc/yum.repos.d:

dag.repo

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el6/en/x86_64/dag/
gpgcheck=1
gpgkey=http://apt.sw.be/RPM-GPG-KEY.dag.txt
enabled=1
includepkgs=ffmpeg ffmpeg-* faac a52dec x264 opencore-amr lame librtmp schroedinger libva dirac orc

centos.repo

[centos]
name=CentOS-6 – Base
baseurl=http://mirror.centos.org/centos/6/os/x86_64/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
enabled=1
priority=1
protect=1
includepkgs=SDL libtheora gsm libdc1394 libdrm liboil mesa-dri-drivers mesa-dri1-drivers mesa-dri-filesystem libraw1394 libpciaccess cppunit

After that, simply install ffmpeg and you’re good to go!

I used these two guides as a resource:

http://ivan.manida.com/2012/11/installing-ffmpeg-on-amazon-ami-centos-6.html
http://www.technowise.in/2012/07/installing-ffmpeg-on-amazon-ami.html

Update 20130426: Added in some missing dependencies

7 responses


Do you want to comment?

Comments RSS and TrackBack Identifier URI ?

Was this on 32 or 64 bit. I am still having problems with 64 bit… See:

Finished Dependency Resolution
Error: Package: ffmpeg-0.6.5-1.el6.rf.x86_64 (dag)
Requires: libschroedinger-1.0.so.0()(64bit)
Error: Package: ffmpeg-0.6.5-1.el6.rf.x86_64 (dag)
Requires: libva.so.1()(64bit)
Error: Package: ffmpeg-0.6.5-1.el6.rf.x86_64 (dag)
Requires: libdirac_encoder.so.0()(64bit)
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest

April 21, 2013 1:47 pm

I’ll need to update the post, I found extra deps like you when setting up another machine.

Use yum whatprovides to find out what package you need. It’s going to be a pain in the ass though, comment out “includepkgs” and run the command in this fashion:

yum whatprovides */libschroedinger-1.0.so.0

And add the package to includepkgs, once you’ve got all the packages uncomment “includepkgs” and try installing, you may find more dep errors.

April 21, 2013 1:58 pm

This worked perfect for me… Thanks!

June 22, 2013 4:06 pm

I can get ffmpeg installed, but not ffmpeg-devel:

--> Finished Dependency Resolution
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: gsm-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: opencore-amr-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: libdc1394-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: schroedinger-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: libtheora-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: x264-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: faad2-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: imlib2-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: faac-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: librtmp-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: dirac-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: lame-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: a52dec-devel
Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: SDL-devel
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

yum whatprovides */ffmpeg-devel-0.6.5-1.el6.rf.x86_64

returns “No Matches found”

July 19, 2013 6:34 am

I only use ffmpeg, ffmpeg-devel requires a different set of dependencies (at a guess, the same packages with -devel appended). You’re on the right track, look at the top two comments for how to use whatprovides. In you’re case it looks like it’s already providing you the package name. For example, for this line:

Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (dag)
           Requires: gsm-devel

run “yum whatprovides gsm-devel” to identify the package needed for it. It’s probably going to be gsm-devel though since yum looks to be returning the actual package names rather than file/library name.

July 19, 2013 11:11 am

Installed as described without any issue, however getting ‘Unrecognized option’ on issuing various commands. For example:
-qscale:v
-filter
-filter:v
-vprofile
-preset

When -vcodec libx264 is specified, ‘broken ffmpeg default settings detected’ message appears on execution and suggests that I have entered erroneous BR, MaxBR when none are specified.

The furthest I have got,… when i issue “ffmpeg -i infile.MTS -qscale 1 outfile.mpg” I get ‘number of reference frames exceeds max (probably corrupt input), discarding one’ followed by numerous ‘buffer underflow’ and ‘packet too large’ messages during conversion, maybe a concequence, the output file is less than half the duration of the input file tho no frames appear to be lost.

All the ffmpeg commands have failed yet they are executed from a script that is tested, and proven to work!

August 19, 2013 3:29 pm

Amazing. This worked. Thank you very much.

October 20, 2014 9:37 am

Comment now!
















Trackbacks