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-*

export PATH="/home/user/compiler/mingw-w64-x86_64/bin:$PATH"

export PKG_CONFIG_PATH="/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32/lib/pkgconfig"

===== # x264 =====

cd /home/user/compiler/ffmpeg_sources/x264-snapshot-*

./configure --prefix=/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --cross-prefix=/home/user/compiler/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-static

make

make install


===== # sdl =====  

cd /home/user/compiler/ffmpeg_sources/SDL-1.2.15

./configure --prefix=/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-shared --enable-static

make

make install

sed -i "s/-mwindows//" "/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32/lib/pkgconfig/sdl.pc"

sed -i "s/-mwindows//" "/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32/bin/sdl-config"

cp /home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32/bin/sdl-config /home/user/compiler/mingw-w64-x86_64/bin/x86_64-w64-mingw32-sdl-config


===== # FFmpeg =====

cd /home/user/compiler/ffmpeg_sources/ffmpeg-*

export CFLAGS="-I/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32/include"

export LDFLAGS="-L/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32/lib"

./configure --prefix=/home/user/compiler/mingw-w64-x86_64/x86_64-w64-mingw32 --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/user/compiler/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --enable-gpl --enable-version3 --disable-w32threads --enable-libx264

mv config.h config_temp.h

cat config_temp.h | sed "s/^.*#define FFMPEG_CONFIGURATION.*$/#define FFMPEG_CONFIGURATION \"--arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-w32threads --enable-libx264\"/" > config.h

make

***********
make install

Leave a Reply

Your email address will not be published. Required fields are marked *