[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46498] trunk/lib/mingw64/ffmpeg: build instructions for ffmpeg 0.10.2 for mingw-w64.
Antony Riakiotakis
kalast at gmail.com
Thu May 10 13:54:36 CEST 2012
Revision: 46498
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46498
Author: psy-fi
Date: 2012-05-10 11:54:36 +0000 (Thu, 10 May 2012)
Log Message:
-----------
build instructions for ffmpeg 0.10.2 for mingw-w64. They may be of use to someone
Added Paths:
-----------
trunk/lib/mingw64/ffmpeg/ReadMe.txt
trunk/lib/mingw64/ffmpeg/patches/
trunk/lib/mingw64/ffmpeg/patches/xvid/
trunk/lib/mingw64/ffmpeg/patches/xvid/configure
Added: trunk/lib/mingw64/ffmpeg/ReadMe.txt
===================================================================
--- trunk/lib/mingw64/ffmpeg/ReadMe.txt (rev 0)
+++ trunk/lib/mingw64/ffmpeg/ReadMe.txt 2012-05-10 11:54:36 UTC (rev 46498)
@@ -0,0 +1,263 @@
+All libraries were built under MSYS/mingw64
+
+First, some notes:
+FFmpeg makes heavy use of pkg-config so you'll need to install that for MinGW-w64 and make sure you have PKG_CONFIG_PATH set.
+Also, during compilation the lib.exe executable, present in the Windows SDK is called to generate .lib files for windows. To get that
+working you will have to manually set the path for the tool and for the dll it references.
+
+Personally, I solve these issues by setting both env variables in MSYS's etc/profile file:
+
+export PKG_CONFIG_PATH=".:/usr/local/share/pkgconfig:/usr/local/lib/pkgconfig:."
+export PATH="${PATH}:/c/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/:/c/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE:"
+
+Because FFMpeg uses pkgconfig a lot, we will have to install some packages to their default installation prefix
+(You can actually tweak the PKG_CONFIG variable to install them to another path but I haven't tested this)
+which should be usr/local/, corresponding to C:\MinGW\msys\1.0\local usually
+
+
+yasm 1.2.0 build script:
+------------------------
+../configure \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+make install;
+
+
+x264 stable git build script:
+-----------------------------
+../configure \
+ --prefix=/c/src/libopt/av-codecs/x264 \
+ --extra-ldflags="-Wl,--as-needed -static-libgcc" \
+ --enable-static \
+ --enable-win32thread \
+ --disable-lavf \
+ --host=x86_64-w64-mingw32
+
+
+dirac 1.0.2 build script:
+-------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --disable-shared \
+ --enable-static \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+make install;
+
+
+faad2 2.7 build script(unused after all):
+-----------------------------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure --prefix=/c/src/libopt/av-codecs/faad-install \
+ --disable-shared \
+ --enable-static \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+make install;
+
+*full build failed, libraries and headers were copied though
+
+
+lame 3.99.5 build script:
+-------------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure --prefix=/c/src/libopt/av-codecs/lame \
+ --disable-shared \
+ --enable-static \
+ --with-fileio=sndfile \
+ --enable-nasm \
+ --with-pic \
+ --disable-mp3x \
+ --disable-mp3rtp \
+ --disable-gtktest \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+make install;
+
+libogg 1.3.0 build script:
+--------------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --prefix=/c/src/libopt/av-codecs/ogg \
+ --enable-static \
+ --disable-shared \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+make install;
+
+
+libvorbis 1.3.3 build script:
+-----------------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --prefix=/c/src/libopt/av-codecs/vorbis \
+ --enable-static \
+ --disable-shared \
+ --with-pic \
+ --with-ogg=/c/src/libopt/av-codecs/ogg \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+
+make install;
+
+
+libtheora 1.1.1 build script:
+-----------------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --prefix=/c/src/libopt/av-codecs/theora \
+ --enable-static \
+ --disable-shared \
+ --with-ogg=/c/src/libopt/av-codecs/ogg \
+ --with-vorbis=/c/src/libopt/av-codecs/vorbis
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+
+make install;
+
+
+libvpx 1.0.0 build script:
+--------------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --prefix=/c/src/libopt/av-codecs/vpx \
+ --disable-shared \
+ --disable-install-bins \
+ --disable-install-srcs \
+ --extra-cflags="-g -Wall -Wextra" \
+ --target=x86_64-win64-gcc;
+
+make install;
+
+
+orc 0.4.16 build sript:
+-----------------------
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --disable-shared \
+ --enable-static \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+
+make install;
+
+*orc will need to be installed on the default path for pkg-config to work.
+
+
+schroedinger 1.0.11 build script:
+----------------------------------
+Important: make sure you have pkgconfig installed for mingw-w64 or configuration will fail.
+
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --disable-shared \
+ --enable-static \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+make install;
+
+* Even with these steps, you won't get a full install but the libraries will build and install fine
+However you will need to tweak the resulting pkgconfig so that ffmpeg can see it:
+Edit C:\MinGW\msys\1.0\local\lib\pkgconfig\schroedinger.pc
+
+and change its name to schroedinger-1.0.pc
+
+Also, change Libs: to
+
+Libs: -L${libdir} -lschroedinger-1.0 -lorc-0.4
+
+because orc is a dependency for ffmpeg that, on my system, was not picked up by pkg-config
+
+xvidcore 1.3.2 build script:
+-----------------------------
+
+go to the build directory and copy the patched configure (obtained by slightly altering https://code.google.com/p/mingw-w64-dgn/source/browse/trunk/patch/xvidcore-configure-w64.patch?spec=svn143&r=143). Then use:
+
+export CFLAGS="-g -Wall -Wextra"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+./configure \
+ --prefix=/c/src/libopt/av-codecs/xvid \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+
+make;
+make install;
+
+openjpeg 1.5.0 build script:
+-----------------------------
+export CFLAGS="-g -Wall -Wextra -DOPJ_STATIC"
+export LDFLAGS="-Wl,--as-needed -static-libgcc"
+
+../configure \
+ --prefix=/c/src/libopt/av-codecs/openjpeg \
+ --enable-static \
+ --disable-shared \
+ --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32;
+
+make install;
+
+*full build fails but libraries are there
+
+
+
+-----------------------------------------------------------------------------------------------------------
+FFMpeg 0.10.2:
+
+Finally, the build script is:
+You may get some obscure pr errors during compilation. To solve these you will need to install an obsolete MSYS coreutils package from the main MinGW (for 32bits) sourcefourge site ( http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/ at the time of writing).
+
+export LIBS="/c/src/libopt/av-codecs"
+export BLENDERLIBS="/c/src/lib/mingw64"
+
+../configure \
+ --prefix=/c/src/lib/mingw64/ffmpeg \
+ --enable-shared \
+ --disable-static \
+ --disable-avfilter \
+ --disable-vdpau \
+ --disable-bzlib \
+ --disable-libgsm \
+ --enable-libschroedinger \
+ --disable-libspeex \
+ --enable-libtheora \
+ --enable-libvorbis \
+ --enable-zlib \
+ --enable-libvpx \
+ --enable-stripping \
+ --enable-runtime-cpudetect \
+ --disable-vaapi \
+ --enable-libopenjpeg \
+ --disable-nonfree \
+ --enable-gpl \
+ --disable-postproc \
+ --disable-x11grab \
+ --enable-libdirac \
+ --enable-libmp3lame \
+ --disable-librtmp \
+ --enable-libx264 \
+ --enable-libxvid \
+ --disable-libopencore-amrnb \
+ --disable-libopencore-amrwb \
+ --disable-libdc1394 \
+ --disable-version3 \
+ --disable-debug \
+ --enable-optimizations \
+ --enable-ffplay \
+ --disable-sse \
+ --disable-ssse3 \
+ --enable-w32threads \
+ --disable-pthreads \
+ --extra-cflags="-g -Wall -Wextra -DOPJ_STATIC -I${LIBS}/lame/include -I${LIBS}/openjpeg/include -I${LIBS}/ogg/include -I${LIBS}/vorbis/include -I${LIBS}/theora/include -I${LIBS}/vpx/include -I${LIBS}/x264/include -I${LIBS}/xvid/include -I${BLENDERLIBS}/zlib/include" \
+ --extra-ldflags="-Wl,--as-needed -static-libgcc -L${LIBS}/lame/lib -L${LIBS}/openjpeg/lib -L${LIBS}/ogg/lib -L${LIBS}/vorbis/lib -L${LIBS}/theora/lib -L${LIBS}/vpx/lib -L${LIBS}/x264/lib -L${LIBS}/xvid/lib -L${BLENDERLIBS}/zlib/lib";
+
+make;
+make install;
Added: trunk/lib/mingw64/ffmpeg/patches/xvid/configure
===================================================================
--- trunk/lib/mingw64/ffmpeg/patches/xvid/configure (rev 0)
+++ trunk/lib/mingw64/ffmpeg/patches/xvid/configure 2012-05-10 11:54:36 UTC (rev 46498)
@@ -0,0 +1,6052 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for Xvid 1.3.2.
+#
+# Report bugs to <xvid-devel at xvid.org>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list