'Problems building ffmpeg dlls on windows 32

I'm trying to build ffmpeg dll files for windows 32 with mingw32. at eatch try I manage to get some dll files but can't use theme because of a fiew dependancys that I can't get rid of.

Here is the packages that I use:

pkg-config
diffutils
yasm
make
mingw-w64-i686-toolchain 

and there is the call to the configure script:

./configure 
 --disable-doc\
 --disable-decoders\ 
 --enable-decoder=h264\
 --enable-cross-compile\ 
 --disable-programs\
 --disable-avdevice 
 --disable-swresample 
 --disable-postproc\
 --disable-avfilter\ 
 --disable-encoders\ 
 --target-os=mingw32\ 
 --disable-static\ 
 --enable-shared\
 --shlibdir=SHARED_LIBS\
 --cxx=gcc --extra-libs='-lpthread -lm'\ 
 --disable-iconv\
 --extra-ldflags="-static-libstdc++ -static-libgcc"

those are the dependancys :

libwinpthrad-1.dll
zlib1.dll
libbz2-1.dll

I don't know if my configuration or my mingw setup is wrond thank you for the help.

Manou - french newbie



Solution 1:[1]

Finally work for me with the folowing options:

 --disable-doc
 --disable-decoders
 --enable-decoder=h264
 --enable-decoder=hevc
 --enable-cross-compile
 --disable-programs
 --disable-avdevice
 --disable-swresample
 --disable-postproc
 --disable-avfilter
 --disable-encoders
 --target-os=mingw32
 --enable-shared
 --shlibdir=SHARED_LIBS
 --extra-ldflags="-static"

Solution 2:[2]

ffmpeg is quite a complex library with multiple dependencies.

You really need to have all the dependancies before you even try to start building.

When I build ffmpeg 5.0.1 for example I notice at least the following dependencies:

  • zlib
  • libbz2
  • libdl
  • freetype2
  • libgsm
  • lame
  • libogg
  • libvorbis
  • libtheora
  • opencore-amr
  • librtmp
  • schroedinger
  • libspeex
  • x264
  • libxavs
  • libvpx
  • frei0r
  • xvidcore
  • celt

As for winpthread, that one comes with MinGW-w64, so you should already have that.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 manou
Solution 2 Brecht Sanders