[FFmpeg-user] "ERROR: libx264 not found" Ubuntu 11.10

Andreas Grehn andreas.grehn at gmail.com
Mon Feb 20 11:47:58 CET 2012


Both "sudo ls -al /usr/local/lib | grep libx264.so" and "sudo ls -al
/usr/lib/ | grep libx264.so" produce nothing after build and manual package
install.

cat /etc/ld.so.conf gives "include /etc/ld.so.conf.d/*.conf" which leads to
3 files that combine to form the following data:
/usr/local/lib
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa

Whereis libx264.so now returns "libx264: /usr/local/lib/libx264.a"
I managed to successfully configure and make ffmpeg after this.
Thanks for your assistance!

However, when I try to run the following:
ffmpeg -i rtsp://[my source] -re -acodec libfaac -ar 22050 -vcodec libx264
-fpre "ffpresets/libx264-ipod640.ffpreset" -f flv rtmp://[my target]
I get "unknown encoder: 'libx264'".

ffmpeg was configured successfully with this command and make went by
without a hitch.
./configure --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc
--enable-version3 --enable-x11grab

The presetfile looks like this (not that I think it matters):
vprofile=baseline
level=30
maxrate=10000000
bufsize=10000000

Shuld I perhaps start a new thread since the topic no longer matches the
issue?


On Mon, Feb 20, 2012 at 10:57 AM, medi <mtirgar+exotic at gmail.com> wrote:

> You're right, Ubuntu package repository has older version of lib264
> and definitely you need to build it from source. I saw the guide from
> the the link on your first mail, the guide seems all correct. I think
> checkinstall command produce .deb package and install it afterward,
> however you can install .deb packages using this command :
> sudo dpkg -i package.deb
>
> but the problem is that after installation Ubuntu cannot locate
> libx264.so library file, in your case.
>
> Please uninstall the package installed from Ubuntu respository:
> sudo apt-get remove x264 libx264-dev
>
> the build and installed it from source, according to the reference:
> cd x264
> ./configure --enable-static
> make
> sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
>     awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
>    --fstrans=no --default
>
> then please provide the result for these commands :
>
> sudo ls -al /usr/local/lib | grep libx264.so
> sudo ls -al /usr/lib/ | grep libx264.so
> sudo cat /etc/ld.so.conf
>
>
> On Mon, Feb 20, 2012 at 10:09 AM, Andreas Grehn <andreas.grehn at gmail.com>
> wrote:
> > Thanks for your time!
> >
> > It however did not do the trick.
> > I can not locate the libx264.so file anywhere. Whereis turns out blank
> and
> > so does locate.
> > I tried installing with apt-get and instead of "ERROR: libx264 not
> found."
> > I got "ERROR: libx264 version must be >= 0.118.". My guess is I have to
> > build from source since the repository(?) is somewhat dated?
> >
> > I have tried to building x264 from source (according to the guide linked
> in
> > my first email). X264 builds just fine and I get a little .deb package
> as a
> > result. Shuld I do anything with this package perhaps?
> >
> > On Mon, Feb 20, 2012 at 1:11 AM, medi <mtirgar+exotic at gmail.com> wrote:
> >
> >> Hi,
> >>
> >> It seems ffmpeg cannot find libx264, one way to get sure that libx264
> >> is installed is to use the following command :
> >> "whereis libx264.so"
> >> the result should be something like:
> >> libx264: /usr/lib/libx264.so
> >>
> >> To install x264, you can do it like this:
> >> sudo apt-get install x264 libx264-dev
> >>
> >> you can also build libx264 from source, then it may install library
> >> files in '/usr/local/lib' instead, you should check /etc/ld.so.conf
> >> and add '/usr/local/lib
> >> ' if it is not already there, then you should run 'sudo ldconfig' to
> >> refresh library paths.
> >>
> >> I'm using a different Linux distribution, but I guess the above
> >> procedure should work on Ubuntu. I hope it goes well. I'm eager to
> >> know the result.
> >>
> >> On Sun, Feb 19, 2012 at 10:37 PM, Andreas Grehn <
> andreas.grehn at gmail.com>
> >> wrote:
> >> > I've followed the guide for installing ffmpeg on Ubuntu 11.10 located
> >> here:
> >> > http://ubuntuforums.org/showthread.php?t=786095
> >> >
> >> > When I get to this part all hell breaks loose.
> >> > -----------------------
> >> > root at kameraserver:~/ffmpeg# ./configure --enable-gpl --enable-libfaac
> >> > --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amrwb
> >> > --enable-libtheora --enable-libvorbis --enable-libx264
> --enable-nonfree
> >> > --enable-postproc --enable-version3 --enable-x11grab
> >> > ERROR: libx264 not found
> >> > If you think configure made a mistake, make sure you are using the
> latest
> >> > version from Git.  If the latest version fails, report the problem to
> the
> >> > ffmpeg-user at ffmpeg.org mailing list or IRC #ffmpeg on
> irc.freenode.net.
> >> > Include the log file "config.log" produced by configure as this will
> help
> >> > solving the problem.
> >> > -----------------------
> >> >
> >> > As instructed the complete config.log is available here
> >> > http://pastebin.com/L3jEM3wZ.
> >> >
> >> > x264 seems to be installed, I guess, I have no experience of
> checkinstall
> >> > but I can't see any errors.
> >> > The result of checkinstall is at this location
> >> http://pastebin.com/mCiZHQ8f.
> >> >
> >> >
> >> > With some reading of the configure.log for ffmpeg I tried to put
> x264.h
> >> in
> >> > /usr/include. That resulted in config.log ending with a request to
> find
> >> > x264_config.h, I promptly copied that aswell and now it ends with the
> >> > following error.
> >> > -----------------------
> >> > check_lib x264.h x264_encoder_encode -lx264
> >> > check_header x264.h
> >> > check_cpp
> >> > BEGIN /tmp/ffconf.4KTJhgCU.c
> >> >    1 #include <x264.h>
> >> >    2 int x;
> >> > END /tmp/ffconf.4KTJhgCU.c
> >> > gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> >> > -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99
> >> -fomit-frame-pointer
> >> > -pthread -E -o /tmp/ffconf.l7QVcEji.o /tmp/ffconf.4KTJhgCU.c
> >> > In file included from /tmp/ffconf.4KTJhgCU.c:1:0:
> >> > /usr/include/x264.h:36:4: warning: #warning You must include stdint.h
> or
> >> > inttypes.h before x264.h [-Wcpp]
> >> > check_func x264_encoder_encode -lx264
> >> > check_ld cc -lx264
> >> > check_cc
> >> > BEGIN /tmp/ffconf.4KTJhgCU.c
> >> >    1 extern int x264_encoder_encode();
> >> >    2 int main(void){ x264_encoder_encode(); }
> >> > END /tmp/ffconf.4KTJhgCU.c
> >> > gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> >> > -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99
> >> -fomit-frame-pointer
> >> > -pthread -c -o /tmp/ffconf.l7QVcEji.o /tmp/ffconf.4KTJhgCU.c
> >> > gcc -Wl,--as-needed -o /tmp/ffconf.QuRwmCOy /tmp/ffconf.l7QVcEji.o
> -lx264
> >> > -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg
> -lopencore-amrwb
> >> > -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lz
> >> > /usr/bin/ld: cannot find -lx264
> >> > collect2: ld returned 1 exit status
> >> > ERROR: libx264 not found
> >> > -----------------------
> >> >
> >> > The warning about stdint.h I have absolutely no clue as to how to
> solve,
> >> > hence this message.
> >> >
> >> > I have some Linux knowledge and I have some c/c++ experience but this
> is
> >> > way out of my comfort zone.
> >> > _______________________________________________
> >> > ffmpeg-user mailing list
> >> > ffmpeg-user at ffmpeg.org
> >> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >> _______________________________________________
> >> ffmpeg-user mailing list
> >> ffmpeg-user at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list