Xpra: Ticket #168: Build ffmpeg for win32

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:



Mon, 23 Jul 2012 17:21:14 GMT - Antoine Martin:

See also #159


Sat, 16 Feb 2013 03:38:41 GMT - Antoine Martin: status changed; resolution set

Moving to #253 (ahuillet: this is months old!)


Mon, 20 Feb 2017 12:15:31 GMT - Antoine Martin:

See also #678 as we now get our ffmpeg win32 builds from msys2.


Mon, 18 Sep 2017 04:50:45 GMT - Antoine Martin: milestone changed


Sat, 23 Jan 2021 04:47:23 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/168