View Single Post
Old 13th October 2011, 14:53   #20  |  Link
Chris K
Registered User
 
Join Date: Mar 2007
Posts: 16
Happy to report I've been quite successful since I set up the MinGW/msys environment yesterday.

--------------------------------------
FFmbc version 0.7-rc3
Copyright (c) 2008-2011 Baptiste Coudurier and the FFmpeg developers

built on Oct 13 2011 14:40:57 with gcc 4.6.1

Configuration: --enable-gpl --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --enable-nonfree --enable-libfaac --enable-libx264 --enable-libmp3lame --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-libxvid

libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 9. 0 / 53. 9. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 27. 3 / 2. 27. 3
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
-------------------------------------

As you can see libx264, libfaac, libmp3lame and libxvid are already in.

I was out for a static build but had some problems with libmp3lame and libxvid. These do not accept the --enable-static flag so they came up as shared libraries (libmp3lame-0.dll and xvidcore.dll). But FFmbc sees them when they are in the same directory.

EDIT: I was wrong about libmp3lame. It does support the --enable-static and --disable-shared flags. I now don't need the "libmp3lame-0.dll" anymore. The problems with libxvid seems to be common as I could read at the Zeranoe forum.

libxvid was even trickier because it came up with a error about cygwin. I then modified the configure file a bit and that worked.

SPECIFIC_LDFLAGS="-mno-cygwin -shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"
SPECIFIC_CFLAGS="-mno-cygwin"

I removed "-mno-cygwin" from the first line and removed the second line totally. I had to run configure as "./configure --prefix=/mingw" otherwise I did get an error. Perhaps that path has to be changed because after "make install" the xvid dll was written to "mingw/lib" instead of "msys/1.0/local/lib" and the xvid header file to "mingw/include"? I had to move them manually to the proper dirs before starting to compile ffmbc. Suggestions on how to fix this are very welcome.

EDIT2: Finally found the solution to include libxvid statically into ffmbc/ffmpeg.

1. Go to the "xvidcore/build/generic" folder.
2. Do the cygwin modifications in the configure file as mentioned above.
3. configure (Without any additions. Also do not use ./configure).
4. make
5. make install (now writes the files to "/mingw/msys/1.0/local/" like the others do).
6. Go to the /mingw/msys/1.0/local/lib folder and remove "xvidcore.dll".
7. At the same folder make a copy of "xvidcore.a" named "libxvidcore.a"
8. Go to the ffmbc folder and ./confgure with all the options (see on top of this post).
9. make
10. make install

The fact that I had to use an older yasm version because of W2K seems to be no problem. I can see it's used but it don't give any errors when the object files are created.

I hope my positive results will encourage others to also give this guide a try.

Last edited by Chris K; 14th October 2011 at 16:09.
Chris K is offline   Reply With Quote