[FFMPEG] Error with libx264 not found
Hi,
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 . I try running Code:
./configure --enable-shared --enable-gpl --enable-libmp3lame --enable-libamr-nb --enable-libfaac --enable-libfaad --enable-nonfree --enable-libx264 Code:
ERROR: libx264 not found I have searched through a lot of forums but could not find a solution. |
Which Fedora ? ? Or CentOS ?
I guess, that the command : 'env | grep PATH' shows no path /usr/local/lib And also /etc/ld.so.conf + /etc/ld.so.conf.d/ .. ... No path /usr/local/lib ? So you will either have to include /usr/local/lib in your LD_LIBRARY_PATH or install x264 to ' --prefix=/usr ' Or you can do # yum install x264-devel .. 'x264-devel' is in the rpmfusion.repo : http://rpmfusion.org/Configuration ..... |
$ find / -iname '*libx264*'
or $ ls /usr/lib/libx264* 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. |
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. Another bad experience with CentOS...sigh! |
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.
|
echo $PATH
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. |
Quote:
'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. ..... |
I reinstalled libx264 with --enable-shared and --prefix=/usr . Here's the result for ldconfig
Code:
$ sudo /sbin/ldconfig -p | grep libx264 Code:
$ ldd $(which ffmpeg) |
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. |
All times are GMT -5. The time now is 07:44 PM. |