Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to add libx264 support to my already existing ffmpeg installation. However, installer just can't see the installed libx264 on my server machine. Here's what I've done so far:
Installed libx264 from Videolan's git repo with --enable-shared . I have it installed under /usr/local/lib .
ERROR: libx264 not found
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.
I have already run ldconfig and can locate the library in my path using locate libx264.so . So I know it's there, in place.
I have searched through a lot of forums but could not find a solution.
should be a .a, .so, and a .so.67 (or whatever version you have). If you don't have it, visit videolan.org and get it. Or use your distro's installer (yum?). Also note that ffmpeg can be quite picky about having multiple versions of libx264 (and other libs) laying about. So you might need to remove / move those other versions. Also check for /usr/local/lib/libx264* as you might have stuff over there too. One of the perils of installing from source on top of distro packages, and otherwise using multiple repositories for ones goals.
Basically did you install it? By source? Or by distro package? Note that by source that libx264 does NOT default to --enable-shared. You have to tell libx264 --enable-shared in order for --enable-shared to be an option with ffmpeg. I mention it here, because your distro might not have packaged it that way. Which could account for your issues. It's more likely that you don't have it installed. libx264 is very beta-ish IMO. i.e. still a work in progress, so it might not be included by default in a lot of distros. Also from source, things default to /usr/local/ where distros tend to install to /usr/, you might need to override with --prefix=/usr in order for things to line up properly.
videolan.org
ffmpeg.mplayerhq.hu
HTH
Now that I reread, yes $PATH is most likely at fault. You seemed to have covered the other bases. The PATH environment variable doesn't default with /usr/local/ stuff. So either change $PATH, or don't install to /usr/local/, I normally choose the latter.
Last edited by Shadow_7; 09-19-2009 at 09:20 AM.
Reason: inability to read the OP.
Ok..I'm trying to install x64-devel from rpmfusion. But I'll still need this dependency to be independent of the distro. I have to try this out on a Debian system as well, so rpmfusion won't be much of a use there.
I'm using CentOS 5 and a Debian system. Regarding the libx64 installation, I can see /usr/local/lib/libx264.so.75 when I do a "locate libx264.so" . I believe that means I have my libx264 in place.
My /etc/ld.so.conf.d has one file which reads /usr/local/lib which also means my ldconfig paths are in place. I still cannot figure out the reason why ffmpeg cannot see an installed libx264 when locate and ldconfig can see it.
I'm not relying upon yum at all. I need to have this running using the source compilations.
libx264, libmp3-lame and the other packages were perfectly installed using their source tarball archives.
You did mention running ldconfig. Is /usr/local/lib/ in /etc/ld.so.conf?
Use "ldconfig -g | grep libx264" to check if the library can be found.
Also look at "ldd /usr/local/bin/ffmpeg" or "ldd $(which ffmpeg)"
This will show the libraries the program uses.
eg:
libx264.so.75 => /usr/lib64/libx264.so.75 (0x00007feec658e000)
If the /usr/lib/ location is hardwired, you could create a symbolic link in /usr/lib/ pointing to the library in /usr/local/lib/ and rerun "sudo /sbin/ldconfig".
Best thing to do is always install things in '/usr/lib' especially dependencies. I've found that even if /usr/local/lib is in /etc/ld.so.conf some programs refuse to find the library there.
it's not going to look where it's not told to look. But I agree that if you're compiling from source always use --prefix=/usr to override the default. It's just easier to be able to remain relatively dumb on paths and the likes. And you can install your distro's version, then compile it from source and overwrite that version. This allows you to install packages that claim it as a dependency, with out actually having to know how to make a package that meets that dependency.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Quote:
I can see
/usr/local/lib/libx264.so.75 when I do a "locate libx264.so" .
I believe that means I have my libx264 in place.
No, you cannot compile against 'libx264.so.75'.
'libx264.so' must be present as a link to 'libx264.so.75'.
Reason : Say, you have two or more versions libx264.so.XX.
Then it's your decision, which one to be used at runtime.
And the the '.so' link takes care that you link to the right one.
.....
What version of ffmpeg are you trying to compile ? I've had problem with older ffmpeg and newer libx264, so I always use the latest ffmpeg to avoid problems ... like the daily tarball.
Post the exact error message. Also provide the config.err file. Provide information on the ffmpeg source code, such as version and where it is from. Someone may want to download it and see if they have the same results.
If you installed libx264 from a package, make sure both libx264 and libx264-devel are installed. A devel package will provide the static libraries and header files for the library. One or both are often needed of a dependency when building from source.
Also provide all of the options you are using for ./configure.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.