First, remove the actual ffmpeg installation
yum remove ffmpeg ffmpeg-devel, you will have to install the DAG RPM repositories which contains huge amount of rpm packages. It’s very easy. Just install the latest rpmforge-release package for your distribution and architecture.
This will automatically install the configuration and GPG keys that are for safely installing RPMforge packages.
nano -w /etc/yum.repos.d/dag.repo
name=Dag RPM Repository for Red Hat Enterprise Linux
Then save the repo file also you can update RPM through rpmforge :-
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
yum install ffmpeg ffmpeg-devel
If Seems there is some lib problems along the way so in /etc/ld.so.conf add
also check /etc/ld.so.conf.d and make sure there are no .conf files that may be loading other files.