LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 09-17-2009, 09:17 AM   #1
nikhil010586
Member
 
Registered: Oct 2007
Posts: 44

Rep: Reputation: 15
[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
And I can see
Code:
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.
 
Old 09-18-2009, 06:40 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
.....
 
Old 09-19-2009, 09:08 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
$ 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.

Last edited by Shadow_7; 09-19-2009 at 09:20 AM. Reason: inability to read the OP.
 
Old 09-22-2009, 03:26 AM   #4
nikhil010586
Member
 
Registered: Oct 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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.
 
Old 09-22-2009, 03:38 AM   #5
nikhil010586
Member
 
Registered: Oct 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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!
 
Old 09-22-2009, 05:16 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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".
 
Old 09-22-2009, 05:23 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 09-22-2009, 12:42 PM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
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.
 
Old 09-23-2009, 01:07 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.
.....

Last edited by knudfl; 09-23-2009 at 01:09 AM.
 
Old 09-23-2009, 02:02 AM   #10
nikhil010586
Member
 
Registered: Oct 2007
Posts: 44

Original Poster
Rep: Reputation: 15
I reinstalled libx264 with --enable-shared and --prefix=/usr . Here's the result for ldconfig

Code:
$ sudo /sbin/ldconfig -p | grep libx264    
        libx264.so.75 (libc6) => /usr/lib/libx264.so.75          
        libx264.so (libc6) => /usr/lib/libx264.so
After trying to configure ffmpeg, it still gave the same error. Here's the output for ldd on ffmpeg.

Code:
$ ldd $(which ffmpeg)
        linux-gate.so.1 =>  (0x00612000)
        libavdevice.so.52 => /usr/local/lib/libavdevice.so.52 (0x00a26000)
        libavformat.so.52 => /usr/local/lib/libavformat.so.52 (0x0036c000)
        libavcodec.so.52 => /usr/local/lib/libavcodec.so.52 (0x00a2d000)
        libavutil.so.49 => /usr/local/lib/libavutil.so.49 (0x00213000)
        libm.so.6 => /lib/libm.so.6 (0x009f8000)
        libc.so.6 => /lib/libc.so.6 (0x008b2000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00110000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x05d9b000)
        libdl.so.2 => /lib/libdl.so.2 (0x00a21000)
        libamrnb.so.3 => /usr/local/lib/libamrnb.so.3 (0x007d7000)
        libfaac.so.0 => /usr/local/lib/libfaac.so.0 (0x0069c000)
        libfaad.so.2 => /usr/local/lib/libfaad.so.2 (0x00123000)
        libmp3lame.so.0 => /usr/local/lib/libmp3lame.so.0 (0x00162000)
        /lib/ld-linux.so.2 (0x0088f000)
The above clearly indicates that ffmpeg has got no problem locating the libraries under /usr/lib or /usr/local/lib whatsoever.
 
Old 09-23-2009, 02:22 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 09-23-2009, 03:48 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
  


Reply

Tags
ffmpeg, x264



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
slack13_64 - FFMPEG's "libx264 not found" error erickFis Slackware 24 11-14-2009 08:12 PM
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avformat_alloc_context YeeHaa4LINUX Linux - Software 2 10-16-2009 11:09 PM
Help me in installing ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encod mitesh.ever Red Hat 5 05-16-2009 12:14 PM
dependency issue: libx264.so.54 needed by ffmpeg PhilTR Fedora 22 01-23-2007 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration