PDA

View Full Version : [Windows] Compiling ffmpeg with libx264 (or any other library)


bnshrdr
22nd September 2009, 02:43
I have read through dozens of topics with the same problem as me but have never found a solution that works.

Simply put I am trying to compile ffmpeg with libx264 support, but am always getting the dreaded error: libx264 not found when running the ffmpeg configuration script.

I have tried putting all of the files from my libx264 compile into a path that is in the global variable PATH. I have put them in the bin, lib, and include folders of my MSYS/MingW installation, and have tried adding the paths with --extra-cflags and --extra-ldflags, but to no avail.

Can anyone tell me where the hell that configuration script needs the libx264 library to be? Thanks in advance!

J_Darnley
22nd September 2009, 15:37
What is your current configure command? What does config.err say? Perhaps you have forgotten to --enable-pthreads when compiling ffmpeg.

My recommended reading would be: http://ffmpeg.arrozcru.org/wiki/index.php?title=Main_Page

bnshrdr
22nd September 2009, 16:01
I attached my config.err. The first few lines contain my ./configure arguments. I'm not sure how to figure out what is going wrong from that file.

Also, the way my directory structure works is like this:
C:\usr\bin
C:\usr\include
C:\usr\lib

This is where x264 was installed to.

Edit: I guess while the attachment is pending, here is my configure command:
# ./configure --prefix=/usr/ffmpeg --enable-gpl --enable-nonfree --disable-debug --extra-cflags=-I/usr/include
--extra-ldflags=-L/usr/lib --disable-ffserver --disable-ffplay --enable-memalign-hack --enable-pthreads --enable-libx264

Kurtnoise
22nd September 2009, 16:36
http://ffmpeg.arrozcru.org/wiki/index.php?title=X264


(nitpick: nasm is not used anymore, must be replaced by yasm)

bnshrdr
22nd September 2009, 16:45
I have yasm installed in the same directory tree that I described above. I compiled 0.8.0 using MSYS/MingW

Kurtnoise
22nd September 2009, 16:51
yasm it not the problem...I gave you the link.

So, in short:
1) compile & install pthreads statically
2) compile & install x264
3) patch ffmpeg --> http://ffmpeg.arrozcru.org/wiki/images/d/dd/Ffmpeg_r15966_static_pthreads.diff
4) compile & install ffmpeg w/ libx264

bnshrdr
22nd September 2009, 18:23
Ah. Thanks. I thought that patch didn't apply to what I was doing. I'm sure that is my problem. Thank you.