Page 1 of 1

compiling using mingw32. problem with ffmpeg

Posted: 16 Nov 2005 07:51
by drus
Hi.
I've downloaded your mingw32 cross-compiler and a set of precompiled libraries for windows here:
http://download.videolan.org/pub/testin ... ly.tar.bz2
http://download.videolan.org/pub/testin ... er.tar.bz2
but in this package i have found no ffmpeg libraries. How to compile vlc for windows with codecs support?
i'm trying vlc 0.8.2.




I tried to compile ffmpeg using mingw32, but in result libavcodec.a contained function with _ at the beginning. For example _avcodec_init. But configure checks if avcodec_init exists. I tried to hack configure, so it skipped this check. But during actual compilation function av_reduce and others were not found.
I also tried to put libavcodec.a, compiled for linux, the same problems



p.s. Sorry, i've mistaken. http://download.videolan.org/pub/testin ... ly.tar.bz2 contains libavcodec.a, libavformat.a and libavutils.a. but during configure i have this message:

Code: Select all

checking for avcodec_init in -lavcodec... no configure: error: Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.

Posted: 16 Nov 2005 11:29
by drus
Some addings.
My actions:
1) I made configure to skip ffmpeg check (just deleted few "if" constructions)

2) PATH=/usr/local/mingw/bin:$PATH CPPFLAGS=-I/usr/win32/include LDFLAGS=-L/usr/win32/lib CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ ./configure --host=i586-mingw32msvc --build=i386-linux --disable-gtk --enable-nls --disable-sdl --with-sdl-config-path=/usr/win32/bin --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac --with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora --with-wx-config-path=/usr/win32/bin --with-freetype-config-path=/usr/win32/bin --with-fribidi-config-path=/usr/win32/bin --enable-livedotcom --with-livedotcom-tree=/usr/win32/live.com --enable-caca --with-caca-config-path=/usr/win32/bin --with-xml2-config-path=/usr/win32/bin --with-dvdnav-config-path=/usr/win32/bin --disable-cddax --disable-vcdx --enable-goom --enable-twolame --enable-dvdread --enable-debug --disable-hal

(--disable-sdl and --disable-hal are here because hal and sdl don't work. Why - i don't know)

3) PATH=/usr/local/mingw/bin:$PATH make

As a result i've got:

Code: Select all

./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-encoder.o)(.text+0xbe0): In function `OpenEncoder__ffmpeg': /root/Desktop/vlc-0.8.2-win32/vlc-0.8.2/modules/codec/ffmpeg/encoder.c:354: undefined reference to `av_reduce'
I've checked /usr/win32/include/ffmpeg/avcodec.h - it's ok, this function exists. In libavcodec.a there is a string containing _av_reduce

So, i have no more ideas. Do anybody have ones?

Posted: 16 Nov 2005 13:27
by drus
So...

I've downloaded http://download.videolan.org/pub/testin ... 24.tar.bz2. I think it is ffmpeg source for cross-compiling. May be I'm wrong.
I deleted libavcodec.a, libavformat.a and libavutils.a from /usr/win32/lib .
Then I compiled this ffmpeg source, comied libraries and compiled vlc. Now it's ok.

But. 2005-06-24 - it's old ffmpeg, i don't know how about x264

Posted: 16 Nov 2005 19:05
by dionoea
you can get ffmpeg from http://ffmpeg.sf.net

Posted: 17 Nov 2005 12:03
by drus
i have the cvs sources of ffmpeg, i can compile them with mingw32 (not yours).
but when i copy ffmeg libraries to /usr/win32/lib, vlc configure says, that it can't find avcodec_init function in these libraries. the same problem with your libraries package (link in the first post)

Posted: 17 Nov 2005 14:06
by xtophe
One of the possible explanation is that the ffmpeg API change quite a lot.
So if you compile vlc 0.8.2 use 0624 contribs.

If you compile vlc svn ( 0.8.5-svn or 0.8.4-test2) you can use 1104 contribs or ffmpeg from cvs

Posted: 18 Nov 2005 06:32
by drus
senx for answering :)