The most popular encoders: libmp3lame and libx264. Get the MinGW-w64 Cross-Compile toolchain Build Script and set it up as “fully static build”. A toolchain is a set of tools that allows the user to compile software. With this toolchain FFmpeg can be cross compiled.
Ubuntu 16.04 x64 Core-i7 (8 CPU Threads), 8GB RAM, mingw_w64_release_ver=’4.0.6′, gcc_release_ver=’5.4.0′, libiconv-1.14, zlib-1.2.8, SDL-1.2.15, lame-3.99.5, lame3.patch, x264-snapshot-*, ffmpeg-*
user here is: “mint”
Source: /home/mint/code/x86_64
===== Tools ===== sudo apt-get install subversion curl texinfo g++ bison flex cvs yasm automake libtool autoconf gcc cmake git make pkg-config zlib1g-dev mercurial unzip pax nasm -y ===== MinGW-w64 Build Script ===== wget http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.6.7 https://github.com/rdp/ffmpeg-windows-build-helpers/blob/master/patches/mingw-w64-build-3.6.7.local https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=19&t=4225 chmod 755 ./mingw-w64-build-3.6.7 bash ./mingw-w64-build-3.6.7 ===== env ===== To add MinGW-w64 to the PATH variable run: export PATH="/home/mint/code/mingw-w64-x86_64/bin:$PATH" export PKG_CONFIG_PATH="/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32/lib/pkgconfig"
===== libiconv-1.14 ===== cd /home/mint/code/x86_64/libiconv-1.14 export CFLAGS=-O2 ./configure --host=x86_64-w64-mingw32 --prefix=/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32 --disable-shared --enable-static make -j 8 make install unset CFLAGS
===== zlib-1.2.8 ===== cd /home/mint/code/x86_64/zlib-1.2.8 CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar RANLIB=x86_64-w64-mingw32-ranlib ARFLAGS=rcs ./configure --prefix=/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32 --static make -j 8 make install
===== SDL-1.2.15 ===== cd /home/mint/code/x86_64/SDL-1.2.15 export CFLAGS=-DDECLSPEC= ./configure --host=x86_64-w64-mingw32 --prefix=/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32 --disable-shared --enable-static make -j 8 make install unset CFLAGS sed -i.bak "s/-mwindows//" "/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32/lib/pkgconfig/sdl.pc" sed -i.bak "s/-mwindows//" "/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32/bin/sdl-config" cp "/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32/bin/sdl-config" "/home/mint/code/mingw-w64-x86_64/bin/x86_64-w64-mingw32-sdl-config"
===== lame-3.99.5 ===== cd /home/mint/code/x86_64/lame-3.99.5 make clean ./configure --host=x86_64-w64-mingw32 --prefix=/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32 --disable-shared --enable-static --enable-nasm make -j 8 make install
===== x264-snapshot-* ===== cd /home/mint/code/x86_64/x264-snapshot-* make clean ./configure --host=x86_64-w64-mingw32 --enable-static --cross-prefix=/home/mint/code/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --prefix=/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-strip --disable-lavf --disable-swscale make -j 8 make install
===== ffmpeg-* ===== cd /home/mint/code/x86_64/ffmpeg-* make clean ./configure --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/mint/code/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --disable-w32threads --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-static --disable-shared --enable-libx264 --extra-libs=-lstdc++ --enable-libmp3lame --enable-iconv --enable-zlib --extra-cflags= --prefix="/home/mint/code/mingw-w64-x86_64/x86_64-w64-mingw32" --pkg-config=pkg-config make -j 8 ********* make install