We have many problems with the pre-made builds of ffmpeg for win32, and they are much bigger than our needs. It therefore makes sense to build it ourselves, using only the components we need, and a stable release number instead of git revisions.
To build ffmpeg for win32, you need to set up mingw32.
Then, until the following ticket is fixed, you need to patch the "configure" script. http://ffmpeg.org/trac/ffmpeg/ticket/349?cversion=2&cnum_hist=3
# must change # SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' #to SLIB_EXTRA_CMD=-'i486-mingw32-dlltool -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
Change "i486-mingw32-dlltool" to the name for your mingw32 dlltool. (Sometimes i686-pc-mingw32-dlltool, ...).
Then:
./configure --disable-filters --disable-indevs --disable-encoders --disable-muxers --disable-avfilter --enable-runtime-cpudetect --disable-network --enable-gpl --enable-shared --enable-memalign-hack --disable-ffplay --disable-ffprobe --disable-ffserver --disable-ffmpeg --disable-dxva2 --cross-prefix=i486-mingw32- --enable-cross-compile --target-os=mingw32 --arch=x86 --prefix=/tmp/mingw32_ffmpeg_ah make make install
Notes:
See also #159
Moving to #253 (ahuillet: this is months old!)
See also #678 as we now get our ffmpeg win32 builds from msys2.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/168