Sorry not to have answered this earlier...
To build ffmpeg with faac support you first have to build and install libfaac. I usually do a ./configure --disable-shared --prefix=/usr/win32 to endup just with the .a and not shared libraries as well which are kind of useless on windows (you should end-up with faac.h in /usr/win32/include and libfaac.a in /usr/win32/lib).
You might have other switches to add depending on the platform you are building on (eg. with cygwin: CC="gcc -mno-cygwin" ./configure --disable-shared --blabla).
Once libfaac is built and installed, you need to build ffmpeg with faac support, which is done by adding the --enable-faac option at configure time. You will have to add --extra-cflags=-I/usr/win32/include and --extra-ldflags=-L/usr/win32/lib as well so ffmpeg knows where libfaac was installed.
When ffmpeg is built, just build vlc normally but don't forget to add the --with-ffmpeg-faac option to ./configure so vlc knows ffmpeg was built with faac support.
That should be it.
Thank you for stepping in, hopefully with your help we can get to the point finally. Let me start over - to get things organized...
My goal is to build the VLC with ffmpeg plug-in (with faac) on Windows OS. I already know how to build VLC itself (using VC++ 7) and ffmpeg - using MinGW and MSYS. But this faac thing still escapes me. Now I'm going to start creating the detailed instruction, to help all not-too-much-Unix/Linux-concept-comfortable-developers (like myself) to understand how to
_BUILD VLC WITH FFMPEG/FAAC PLUG-IN ON WINDOWS OS_
• prerequisites: in order to build ffmpeg on Windows OS we will follow ffmpeg-team recommendations and use MinGW/ MSYS. Install the current versions of MSYS and MinGW from
http://www.mingw.org/. , see their FAQ and the download section in case of questions
1. Download VLC source code from videolan.com, uncompress it to …let’s say…
C:\VideoLAN\vlc-0.7.0
(or C:\VideoLAN\vlc-snapshot-20040109 if using snapshots)
2. Download ffmpeg-20040103 snapshot from
http://www.videolan.org/vlc/download-sources.html, uncompress it to
C:\ffmpeg-20040103
3. Download faac source code, uncompress it to
C:\ffmpeg-20040103\faac
(?? – first question – is this the right place, inside the ffmpeg-20040103 folder ??).
4. Now we have to perform Step 1 – build libfaac. Uncompressed faac source code doesn’t have the ‘configure’, it has ‘configure.in’ file – I think that’s because it was meant to be build by CygWin – am I right? – so, to perform a procedure suggested by Gibalou, rename configure.in to configure.
Start MSYS – it will start MinGW32, which acts as a gcc emulator for Windows.
Change (in MinGW32 console) to the C:\ffmpeg-20040103\faac and type in
./configure --disable-shared --prefix=/usr/win32
Hit enter.
Observe errors in the console window:
./configure: line 1: syntax error near unexpected token `AC_PREREQ(2.50)'
./configure: line 1: `AC_PREREQ(2.50)'
If I open this configure file, I can see that it’s not like other configure/make files – for ffmpeg, liveMedia and so on. This one has different syntax and all.
So – the questions are:
Q1: is it possible to build the faac library using MSYS/ MinGW (worked perfectly for ffmpeg) or it’s only good with CygWin (which I personally don’t like due to its unnecessary complexity and general awkwardness)??
Q2: faac source code includes faac\project\mingw32 folder and some make file in it…I was not be able to get anything useful out of it – does anybody know how to use this stuff?
Q3: faac source code has MS VC++ solution/workspace files. If I would be able to build it using MS VC 7, and, let’s say – I want to use MS-build libraries – what name should I use, libfaac.dll or – rename it to libfaac or something else? Where should I put it – in what folder? Do I need any files else to build ffmpeg? What exactly to change in ffmpeg configure/make files to get it build with faac?
it may seem stupid, but the more detailed an instruction is, the more people will understand it
Any help would be greatly appreciated