Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows XP compatible build with updated libraries #219

Closed
Reino17 opened this issue Mar 29, 2017 · 68 comments

Comments

Projects
None yet
5 participants
@Reino17
Copy link
Contributor

commented Mar 29, 2017

I'd like to share the Windows XP compatible build I've made, including my notes for the compilers.
This is therefore a report rather than an 'issue'.

Compared to rdp's 'cross_compile_ffmpeg.sh', it uses the following working(!) updated libraries:

openssl-1.1.0e     --> openssl-1.0.2k
gmp-6.0.0          --> gmp-6.1.2
nettle-3.1         --> nettle-3.3
gnutls-3.5.9       --> gnutls-3.5.10
zlib-1.2.8         --> zlib-1.2.11
xz-5.2.2           --> xz-5.2.3
libpng-1.5.26      --> libpng-1.5.28
libiconv-1.14      --> libiconv-1.15
frei0r-plugins-1.4 --> frei0r-plugins-1.5.0
libsndfile-1.0.25  --> libsndfile-1.0.27
libwebp-0.5.0      --> libwebp-0.6.0
opencore-amr-0.1.3 --> opencore-amr-0.1.5
vo-amrwbenc-0.1.2  --> vo-amrwbenc-0.1.3
libogg-1.3.1       --> ogg_git
libvorbis-1.3.4    --> vorbis_git
speexdsp-1.2rc3    --> speexdsp_git
wavpack-4.70.0     --> removed
xvidcore-1.3.3     --> removed
opus-1.1           --> opus_git
orc-0.4.18         --> orc-0.4.26
freetype-2.6.3     --> freetype-2.7.1
expat-2.1.0        --> expat-2.2.0
fftw-3.3.5         --> fftw-3.3.6-pl2
netcdf-4.4.1       --> netcdf-4.4.1.1
fontconfig-2.11.94 --> fontconfig-2.12.1
fribidi-0.19.4     --> fribidi-0.19.7
libass-0.13.1      --> libass-0.13.6

'cross_compile_ffmpeg.log' contains logs for library updates that didn't work well.

First of all, to compile on my WinXP pc, I had to grab the latest WinXP compatible Cygwin setup and change a few things.

This is the 'cross_compile_ffmpeg.sh' I've successfully been using.
And 'cross_compile_ffmpeg.diff' is the difference compared to rdp's 'cross_compile_ffmpeg.sh':

--- cross_compile_ffmpeg-git.sh   2017-03-23 13:17:25.906250000 +0100
+++ cross_compile_ffmpeg.sh   2017-03-29 18:00:27.875000000 +0200
@@ -637,21 +637,23 @@ build_libx264() {
 }
 
 build_librtmp() {
-  #  download_and_unpack_file http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz # has some odd configure failure
-
+  #download_and_unpack_file http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz rtmpdump-2.3 # has some odd configure failure
+  #cd rtmpdump-2.3/librtmp
+  #make install CRYPTO=GNUTLS OPT='-O2 -g' "CROSS_COMPILE=$cross_prefix" SHARED=no "prefix=$mingw_w64_x86_64_prefix" || exit 1
+  ##make install CRYPTO=OPENSSL OPT='-O2 -g' "CROSS_COMPILE=$cross_prefix" SHARED=no "prefix=$mingw_w64_x86_64_prefix" || exit 1 # doesn't work
+  #cd ../..
   do_git_checkout "http://repo.or.cz/r/rtmpdump.git" 
   cd rtmpdump_git/librtmp
   do_make_and_make_install "CRYPTO=GNUTLS OPT=-O2 CROSS_COMPILE=$cross_prefix SHARED=no prefix=$mingw_w64_x86_64_prefix"
-  #make install CRYPTO=GNUTLS OPT='-O2 -g' "CROSS_COMPILE=$cross_prefix" SHARED=no "prefix=$mingw_w64_x86_64_prefix" || exit 1
+  #do_make_and_make_install "CRYPTO=OPENSSL OPT=-O2 CROSS_COMPILE=$cross_prefix SHARED=no prefix=$mingw_w64_x86_64_prefix" # doesn't work
   sed -i.bak 's/-lrtmp -lz/-lrtmp -lwinmm -lz/' "$PKG_CONFIG_PATH/librtmp.pc"
   # also build .exe's for fun:
   cd ..
-   if [[ ! -f rtmpsuck.exe ]]; then # hacky not do it twice
-     # TODO do_make here instead...not easy since it doesn't seem to accept env. variable for LIB_GNUTLS...
-     make SYS=mingw CRYPTO=GNUTLS OPT=-O2 CROSS_COMPILE=$cross_prefix SHARED=no LIB_GNUTLS="`pkg-config --libs gnutls` -lz" || exit 1 # NB not multi process here so we can ensure existence of rtmpsuck.exe means "we made it all the way to the end"
-   fi
+    #if [[ ! -f rtmpsuck.exe ]]; then # hacky not do it twice
+    #  #TODO do_make here instead...not easy since it doesn't seem to accept env. variable for LIB_GNUTLS...
+    #  make SYS=mingw CRYPTO=GNUTLS OPT=-O2 CROSS_COMPILE=$cross_prefix SHARED=no LIB_GNUTLS="`pkg-config --libs gnutls` -lz" || exit 1 # NB not multi process here so we can ensure existence of rtmpsuck.exe means "we made it all the way to the end"
+    #fi
   cd ..
-
 }
 
 build_qt() {
@@ -712,7 +714,7 @@ build_libxavs() {
 }
 
 build_libsndfile() {
-  generic_download_and_make_and_install http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz
+  generic_download_and_make_and_install http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.27.tar.gz
 }
 
 build_libbs2b() {
@@ -730,24 +732,20 @@ build_libgme_game_music_emu() {
 }
 
 build_liblzma() {
-  generic_download_and_make_and_install http://tukaani.org/xz/xz-5.2.2.tar.bz2
+  generic_download_and_make_and_install http://tukaani.org/xz/xz-5.2.3.tar.bz2
 }
 
 build_libsnappy() {
   generic_download_and_make_and_install https://sourceforge.net/projects/ffmpegwindowsbi/files/dependency_libraries/google-snappy-1.1.3-14-g32d6d7d.tar.gz google-snappy-32d6d7d
 }
 
-build_wavpack() {
-  generic_download_and_make_and_install http://wavpack.com/wavpack-4.70.0.tar.bz2
-}
-
 build_libwebp() {
-  generic_download_and_make_and_install http://downloads.webmproject.org/releases/webp/libwebp-0.5.0.tar.gz
+  generic_download_and_make_and_install https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.6.0.tar.gz
 }
 
 build_libpng() {
   # generic_download_and_make_and_install https://download.sourceforge.net/libpng/libpng-1.6.12.tar.xz 
-  generic_download_and_make_and_install https://download.sourceforge.net/libpng/libpng-1.5.26.tar.xz  # libtheora can't take 1.6.x :|
+  generic_download_and_make_and_install https://download.sourceforge.net/libpng/libpng-1.5.28.tar.xz  # libtheora can't take 1.6.x :|
 }
 
 build_libopenjpeg() {
@@ -827,10 +825,12 @@ build_libgsm() {
 }
 
 build_libopus() {
-  download_and_unpack_file http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz 
-  cd opus-1.1
-    apply_patch https://raw.githubusercontent.com/rdp/ffmpeg-windows-build-helpers/master/patches/opus11.patch # allow it to work with shared builds
-    generic_configure_make_install 
+  #download_and_unpack_file http://downloads.xiph.org/releases/opus/opus-1.2-alpha2.tar.gz
+  #cd opus-1.2-alpha2
+  do_git_checkout https://github.com/xiph/opus.git
+  cd opus_git
+    apply_patch http://rwijnsma.home.xs4all.nl/files/ffmpeg/libopus.patch # allow it to work with shared builds
+    generic_configure_make_install
   cd ..
 }
 
@@ -862,8 +862,8 @@ build_libdvdcss() {
 }
 
 build_libopencore() {
-  generic_download_and_make_and_install https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-0.1.3.tar.gz
-  generic_download_and_make_and_install https://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/vo-amrwbenc-0.1.2.tar.gz
+  generic_download_and_make_and_install https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-0.1.5.tar.gz
+  generic_download_and_make_and_install https://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz
 }
 
 build_libdlfcn() {
@@ -885,15 +885,24 @@ build_libjpeg_turbo() {
 }
 
 build_libogg() {
-  generic_download_and_make_and_install http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
+  do_git_checkout https://github.com/xiph/ogg.git
+  cd ogg_git
+    generic_configure_make_install
+  cd ..
 }
 
 build_libvorbis() {
-  generic_download_and_make_and_install http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
+  do_git_checkout https://github.com/xiph/vorbis.git
+  cd vorbis_git
+    generic_configure_make_install
+  cd ..
 }
 
 build_libspeexdsp() {
-  generic_download_and_make_and_install http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz
+  do_git_checkout https://github.com/xiph/speexdsp.git
+  cd speexdsp_git
+    generic_configure_make_install
+  cd ..
 }
 
 build_libspeex() {
@@ -906,7 +915,7 @@ build_libspeex() {
   cd speex_git
     generic_configure_make_install
   cd ..
-}  
+}
 
 build_libtheora() {
   cpu_count=1 # can't handle it
@@ -916,16 +925,20 @@ build_libtheora() {
     generic_configure_make_install 
   cd ..
   cpu_count=$original_cpu_count
+  #do_git_checkout https://github.com/xiph/theora.git
+  #cd theora_git
+  #  generic_configure_make_install
+  #cd ..
 }
 
 build_libfribidi() {
-  # generic_download_and_make_and_install http://fribidi.org/download/fribidi-0.19.5.tar.bz2 fribidi-0.19.5 # got report of still failing?
-  download_and_unpack_file http://fribidi.org/download/fribidi-0.19.4.tar.bz2
-  cd fribidi-0.19.4
-    # make it export symbols right...
-    apply_patch https://raw.githubusercontent.com/rdp/ffmpeg-windows-build-helpers/master/patches/fribidi.diff
-    generic_configure_make_install
-  cd ..
+  generic_download_and_make_and_install https://www.fribidi.org/download/fribidi-0.19.7.tar.bz2 # got report of still failing?
+  #download_and_unpack_file http://fribidi.org/download/fribidi-0.19.4.tar.bz2
+  #cd fribidi-0.19.4
+  #  # make it export symbols right...
+  #  apply_patch https://raw.githubusercontent.com/rdp/ffmpeg-windows-build-helpers/master/patches/fribidi.diff
+  #  generic_configure_make_install
+  #cd ..
 
   #do_git_checkout http://anongit.freedesktop.org/git/fribidi/fribidi.git
   #cd fribidi_git
@@ -935,14 +948,14 @@ build_libfribidi() {
 }
 
 build_libass() {
-  generic_download_and_make_and_install https://github.com/libass/libass/releases/download/0.13.1/libass-0.13.1.tar.gz 
+  generic_download_and_make_and_install https://github.com/libass/libass/releases/download/0.13.6/libass-0.13.6.tar.gz
   # fribidi, fontconfig, freetype throw them all in there for good measure, trying to help mplayer once though it didn't help [FFmpeg needed a change for fribidi here though I believe]
   sed -i.bak 's/-lass -lm/-lass -lfribidi -lfontconfig -lfreetype -lexpat -lm/' "$PKG_CONFIG_PATH/libass.pc"
 }
 
 build_gmp() {
-  download_and_unpack_file https://gmplib.org/download/gmp/gmp-6.0.0a.tar.xz gmp-6.0.0
-  cd gmp-6.0.0
+  download_and_unpack_file https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz
+  cd gmp-6.1.2
     export CC_FOR_BUILD=/usr/bin/gcc
     export CPP_FOR_BUILD=usr/bin/cpp
     generic_configure "ABI=$bits_target"
@@ -953,7 +966,7 @@ build_gmp() {
 }
 
 build_orc() {
-  generic_download_and_make_and_install https://download.videolan.org/contrib/orc-0.4.18.tar.gz
+  generic_download_and_make_and_install https://gstreamer.freedesktop.org/src/orc/orc-0.4.26.tar.xz
 }
 
 build_libxml2() {
@@ -977,8 +990,8 @@ build_libschroedinger() {
 }
 
 build_gnutls() {
-  download_and_unpack_file http://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.5/gnutls-3.5.9.tar.xz
-  cd gnutls-3.5.9
+  download_and_unpack_file https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.5/gnutls-3.5.10.tar.xz
+  cd gnutls-3.5.10
     sed -i.bak 's/mkstemp(tmpfile)/ -1 /g' src/danetool.c # fix x86_64 absent? but danetool is just an exe AFAICT so this hack should be ok...
     # --disable-cxx don't need the c++ version, in an effort to cut down on size... XXXX test size difference... 
     # --enable-local-libopts to allow building with local autogen installed, 
@@ -992,8 +1005,8 @@ build_gnutls() {
 }
 
 build_libnettle() {
-  download_and_unpack_file https://ftp.gnu.org/gnu/nettle/nettle-3.1.tar.gz
-  cd nettle-3.1
+  download_and_unpack_file https://ftp.gnu.org/gnu/nettle/nettle-3.3.tar.gz
+  cd nettle-3.3
     generic_configure "--disable-openssl --with-included-libtasn1" # in case we have both gnutls and openssl, just use gnutls [except that gnutls uses this so...huh? https://github.com/rdp/ffmpeg-windows-build-helpers/issues/25#issuecomment-28158515
     do_make_and_make_install
   cd ..
@@ -1008,34 +1021,16 @@ build_bzlib2() {
 }
 
 build_zlib() {
-  download_and_unpack_file https://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz
-  cd zlib-1.2.8
+  download_and_unpack_file https://sourceforge.net/projects/libpng/files/zlib/1.2.11/zlib-1.2.11.tar.gz
+  cd zlib-1.2.11
     do_configure "--static --prefix=$mingw_w64_x86_64_prefix"
     do_make_and_make_install "$make_prefix_options ARFLAGS=rcs"
   cd ..
 }
 
-build_libxvid() {
-  download_and_unpack_file http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz xvidcore
-  cd xvidcore/build/generic
-  do_configure "--host=$host_target --prefix=$mingw_w64_x86_64_prefix $config_opts" # no static option...
-  sed -i.bak "s/-mno-cygwin//" platform.inc # remove old compiler flag that now apparently breaks us
-
-  cpu_count=1 # possibly can't build this multi-thread ? http://betterlogic.com/roger/2014/02/xvid-build-woe/
-  do_make_and_make_install
-  cpu_count=$original_cpu_count
-  cd ../../..
-
-  # force a static build after the fact by only leaving the .a file, not the .dll.a file
-  if [[ -f "$mingw_w64_x86_64_prefix/lib/xvidcore.dll.a" ]]; then
-    rm $mingw_w64_x86_64_prefix/lib/xvidcore.dll.a || exit 1
-    mv $mingw_w64_x86_64_prefix/lib/xvidcore.a $mingw_w64_x86_64_prefix/lib/libxvidcore.a || exit 1
-  fi
-}
-
 build_fontconfig() {
-  download_and_unpack_file https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.94.tar.gz 
-  cd fontconfig-2.11.94
+  download_and_unpack_file https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.12.1.tar.gz
+  cd fontconfig-2.12.1
     export CFLAGS= # compile fails with -march=sandybridge ... with mingw 4.0.6 at least ...
     generic_configure --disable-docs
     do_make_and_make_install
@@ -1044,11 +1039,10 @@ build_fontconfig() {
   sed -i.bak 's/-L${libdir} -lfontconfig[^l]*$/-L${libdir} -lfontconfig -lfreetype -lexpat/' "$PKG_CONFIG_PATH/fontconfig.pc"
 }
 
-
 build_openssl() {
   # warning, this is a very old version of openssl since we don't really use it anymore hasn't been updated in awhile...
-  download_and_unpack_file https://www.openssl.org/source/openssl-1.1.0e.tar.gz
-  cd openssl-1.1.0e
+  download_and_unpack_file https://www.openssl.org/source/openssl-1.0.2k.tar.gz
+  cd openssl-1.0.2k
   export CC="${cross_prefix}gcc"
   export AR="${cross_prefix}ar"
   export RANLIB="${cross_prefix}ranlib"
@@ -1089,12 +1083,12 @@ build_fdk_aac() {
 }
 
 build_libexpat() {
-  generic_download_and_make_and_install https://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz
+  generic_download_and_make_and_install https://sourceforge.net/projects/expat/files/expat/2.2.0/expat-2.2.0.tar.bz2
 }
 
 build_iconv() {
-  download_and_unpack_file https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz 
-  cd libiconv-1.14
+  download_and_unpack_file https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz 
+  cd libiconv-1.15
     export CFLAGS=-O2 # ??
     generic_configure_make_install
     reset_cflags
@@ -1102,8 +1096,8 @@ build_iconv() {
 }
 
 build_freetype() {
-  download_and_unpack_file https://download.videolan.org/contrib/freetype2/freetype-2.6.3.tar.gz
-  cd freetype-2.6.3
+  download_and_unpack_file https://sourceforge.net/projects/freetype/files/freetype2/2.7.1/freetype-2.7.1.tar.bz2
+  cd freetype-2.7.1
     if [[ `uname -s` == CYGWIN* ]]; then
       generic_configure "--build=i686-pc-cygwin --with-png=no"  # hard to believe but needed...
     else
@@ -1167,7 +1161,7 @@ build_lame() {
 }
 
 build_vamp_plugin() { 
-  download_and_unpack_file https://sourceforge.net/projects/ffmpegwindowsbi/files/dependency_libraries/vamp-plugin-sdk-2.6.tar.gz
+  download_and_unpack_file https://code.soundsoftware.ac.uk/attachments/download/1520/vamp-plugin-sdk-2.6.tar.gz
   cd vamp-plugin-sdk-2.6
     generic_configure
     do_make_and_make_install "$make_prefix_options sdkstatic"
@@ -1175,7 +1169,7 @@ build_vamp_plugin() {
 }
 
 build_fftw() {
-  generic_download_and_make_and_install http://www.fftw.org/fftw-3.3.5.tar.gz # said to make it "double precision-er"
+  generic_download_and_make_and_install http://fftw.org/fftw-3.3.6-pl2.tar.gz # said to make it "double precision-er"
 }
 
 build_libsamplerate() {
@@ -1261,8 +1255,8 @@ build_twolame() {
 
 build_frei0r() {
   # theoretically we could get by with just copying a .h file in, but why not build the .dll's here anyway, for fun, and in case useful? :)
-  download_and_unpack_file https://files.dyne.org/frei0r/releases/frei0r-plugins-1.4.tar.gz
-  cd frei0r-plugins-1.4
+  download_and_unpack_file https://files.dyne.org/frei0r/releases/frei0r-plugins-1.5.0.tar.gz
+  cd frei0r-plugins-1.5.0
     sed -i.bak "s/find_package (Cairo)//g" CMakeLists.txt
     do_cmake_and_install
   cd ..
@@ -1282,8 +1276,8 @@ build_libcurl() {
 
 build_netcdf() {
   # used for sofalizer filter
-  download_and_unpack_file http://gfd-dennou.org/arch/ucar/unidata/pub/netcdf/netcdf-4.4.1.tar.gz
-  cd netcdf-4.4.1
+  download_and_unpack_file http://gfd-dennou.org/arch/ucar/unidata/pub/netcdf/netcdf-4.4.1.1.tar.gz
+  cd netcdf-4.4.1.1
     generic_configure --disable-netcdf-4 --disable-dap # its dependencies were *hard* LOL
     do_make_and_make_install
   cd ..
@@ -1500,9 +1494,9 @@ build_ffmpeg() {
   fi
 
   init_options="--arch=$arch --target-os=mingw32 --cross-prefix=$cross_prefix --pkg-config=pkg-config --disable-w32threads"
-  config_options="$init_options --enable-libsoxr --enable-fontconfig --enable-libass --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-decklink --extra-libs=-loleaut32  --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls  --enable-libgsm --enable-libfreetype --enable-libopus --enable-bzlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --enable-libwavpack --enable-libwebp --enable-libgme --enable-dxva2 --enable-avisynth --enable-gray --enable-libopenh264 --enable-netcdf  --enable-libflite --enable-lzma --enable-libsnappy --enable-libzimg"
+  config_options="$init_options --enable-libsoxr --enable-fontconfig --enable-libass --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-decklink --extra-libs=-loleaut32 --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --disable-schannel --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --enable-bzlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --enable-libwebp --enable-libgme --enable-dxva2 --enable-avisynth --enable-gray --enable-libopenh264 --enable-netcdf --enable-libflite --enable-lzma --enable-libsnappy --enable-libzimg"
   if [[ $enable_gpl == 'y' ]]; then
-    config_options="$config_options --enable-gpl --enable-libx264 --enable-libx265 --enable-frei0r --enable-filter=frei0r --enable-librubberband --enable-libvidstab --enable-libxavs --enable-libxvid"
+    config_options="$config_options --enable-gpl --enable-libx264 --enable-libx265 --enable-frei0r --enable-filter=frei0r --enable-librubberband --enable-libvidstab --enable-libxavs"
   fi
   # other possibilities (you'd need to also uncomment the call to their build method): 
   #   --enable-w32threads # [worse UDP than pthreads, so not using that] 
@@ -1612,7 +1606,6 @@ build_dependencies() {
   build_frei0r
   build_libsndfile
   build_libbs2b # needs libsndfile
-  build_wavpack
   build_libgme_game_music_emu
   build_libwebp
   build_libflite # not for now till after rubberband
@@ -1622,9 +1615,9 @@ build_dependencies() {
   build_libopus
   build_libopencore
   build_libogg
+  build_libvorbis # needs libogg
   build_libspeexdsp # needs libogg for exe's
   build_libspeex # needs libspeexdsp
-  build_libvorbis # needs libogg
   build_libtheora # needs libvorbis, libogg
   build_orc
   build_libschroedinger # needs orc
@@ -1632,8 +1625,7 @@ build_dependencies() {
   build_libexpat
   build_libxml2
   build_libbluray # needs libxml2, freetype
-  # build_libjpeg_turbo # mplayer can use this, VLC qt might need it? [replaces libjpeg]
-  build_libxvid
+  #build_libjpeg_turbo # mplayer can use this, VLC qt might need it? [replaces libjpeg]
   build_libxavs
   build_libsoxr
   #build_libebur128 # needs speex # Now included in ffmpeg as internal library
@@ -1666,7 +1658,7 @@ build_dependencies() {
     build_fdk_aac
     # build_faac # not included for now, too poor quality output :)
   fi
-  # build_openssl # hopefully do not need it anymore, since we use gnutls everywhere, so just don't even build it anymore...
+  #build_openssl # hopefully do not need it anymore, since we use gnutls everywhere, so just don't even build it anymore...
   build_librtmp # needs gnutls [or openssl...]
   build_libx264 # at bottom as it might build an ffmpeg which needs all the above deps...
 }
@@ -1735,7 +1727,7 @@ build_vlc=n
 build_lsw=n
 git_get_latest=y
 prefer_stable=y
-build_intel_qsv=y
+build_intel_qsv=n
 #disable_nonfree=n # have no value by default to force user selection
 original_cflags='-mtune=core2 -O3' #  be careful, these override lots of stuff in makesfiles :|
 # if you specify a march it needs to first so x264's configure will use it :|

To make FFMpeg WinXP compatible I had to change build_intel_qsv=y to build_intel_qsv=n. Otherwise the error "The procedure entry point _wfopen_s could not be located in the dynamic link library msvcrt.dll" would return.

TLS support on Windows XP:
I couldn't open TLS 1.2 https-urls and at first I thought I'd need OpenSSL instead of the default GnuTLS, but in the end it was all about --disable-schannel.
The build I've now made (--disable-schannel --enable-gnutls) works fine too!

wavpack-4.70.0, xvidcore-1.3.3 --> removed:
Native support in FFMpeg (https://ffmpeg.org/general.html#Supported-File-Formats_002c-Codecs-or-Features). Decoding as well as encoding.

opus-1.1 --> opus_git:
I've updated the "allow-it-to-work-with-shared-builds"-patch, but haven't tested it.

fribidi-0.19.4 --> fribidi-0.19.7:
Judging the v0.19.7's source-code, the patch isn't needed anymore.

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2017

https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=13&t=3572#p10122:

Today when I did some testing with -c:v libx264 another fatal error popped up:

The exception Illegal Instruction
An attempt was made to execute an illegal instruction.
(0xc000001d) occurred in the application at location 0x011e166a.

I have narrowed it down to ffmpeg-20150823-git-1bf76cd-win32-static.7z being the latest working build. ffmpeg-20150825-git-4c39892-win32-static.7z shows the fatal error.

I wrongfully assumed a ffmpeg commit was the culprit for this error, as I've recently found out that with AbeChin's ffmpeg builds I could once again use the libx264 video encoder.
Examining its build configuration and comparing it to mine I found original_cflags='-mtune=core2 -O3' to be the cause and original_cflags='-mtune=generic -mfpmath=sse -msse' to be the solution for my non-sse2 cpu.

diff:

--- cross_compile_ffmpeg.sh   2017-03-29 18:00:27.875000000 +0200
+++ cross_compile_ffmpeg.sh   2017-04-02 09:47:21.765625000 +0200
@@ -1481,7 +1481,7 @@ build_ffmpeg() {
     # avoid installing this to system?
     postpend_configure_opts="$postpend_configure_opts --prefix=$final_install_dir --disable-libgme" # gme broken for shared as of yet TODO...
   else
-    postpend_configure_opts="--enable-static --disable-shared $postpend_configure_opts --prefix=$mingw_w64_x86_64_prefix"
+    postpend_configure_opts="$postpend_configure_opts --prefix=$mingw_w64_x86_64_prefix" # --enable-static and --disable-shared are the default values already
   fi
 
   do_git_checkout $git_url $output_dir $ffmpeg_git_checkout_version 
@@ -1521,7 +1521,7 @@ build_ffmpeg() {
     #  apply_patch https://raw.githubusercontent.com/rdp/ffmpeg-windows-build-helpers/master/patches/nvresize2.patch "-p1" # uncomment if you want to test nvresize filter [et al] http://ffmpeg.org/pipermail/ffmpeg-devel/2015-November/182781.html patch worked with 7ab37cae34b3845
   fi
 
-  config_options="$config_options --enable-runtime-cpudetect" # not sure what this even does but this is the most compatible
+  #config_options="$config_options --enable-runtime-cpudetect" # enabled by default nowadays and --disable-runtime-cpudetect to disable
 
   do_debug_build=n # if you need one for backtraces/examining segfaults using gdb.exe ... change this to y :) XXXX make it affect x264 too...and make it param
   if [[ "$do_debug_build" = "y" ]]; then
@@ -1729,7 +1729,8 @@ git_get_latest=y
 prefer_stable=y
 build_intel_qsv=n
 #disable_nonfree=n # have no value by default to force user selection
-original_cflags='-mtune=core2 -O3' #  be careful, these override lots of stuff in makesfiles :|
+#original_cflags='-mtune=core2 -O3' #  be careful, these override lots of stuff in makesfiles :|
+original_cflags='-mtune=generic -mfpmath=sse -msse' # for non-sse2 cpus
 # if you specify a march it needs to first so x264's configure will use it :|
 build_x264_with_libav=n
 ffmpeg_git_checkout_version=

ffmpeg-N-85093-g7942907-win32-static_legacy.7z

rdp added a commit that referenced this issue Apr 5, 2017

@rdp

This comment has been minimized.

Copy link
Owner

commented Apr 5, 2017

@hydra3333

This comment has been minimized.

Copy link

commented Apr 7, 2017

Just wondering, at some point would 'cross_compile_ffmpeg.sh' be updated to use some/many/all of the later library source code versions (as patched) as shown above ?

edit: never mind, making mods to align with the later versions zeranoe mentions on his build website, and hope they build without requiring further patches

@rdp

This comment has been minimized.

Copy link
Owner

commented Apr 8, 2017

@hydra3333

This comment has been minimized.

Copy link

commented Apr 8, 2017

OK not being very clever, if I can I'll update your generic (non-OpenCL :)) script and post a diff file.
He he, google here I come ...

@hydra3333

This comment has been minimized.

Copy link

commented Apr 8, 2017

OK, attached is
(i) a proposed patch cross_compile_ffmpeg.patch (non-XP safe)
(ii) together with a companion libopus.patch patch to be uploaded into
https://raw.githubusercontent.com/rdp/ffmpeg-windows-build-helpers/master/patches/libopus.patch

Summary of Changes:

  1. the external library software versions to be built should align more closely with Zeranoe's build
  2. some other external library software versions have been updated
  3. one or two have been moved to GIT rather than vanilla download
  4. x264 now downloads the master from GIT rather than the stable, to get the latest and greatest updates
  5. build_x264_with_libav defaults to yes so that x264 can input mpeg files
  6. build_lsw defaults to yes ...
  7. building lsw now forces a second rebuild of lsw then of libx264, so that x264 gets built with LSMASH and thus can output .mp4 files directly
  8. enable_opencl defaults to no (with no commandline option either)
  9. provision has been made for future nvidia openCL integration
    9.1 gendef now gets built with the mingw toolchain; dlltool is a dependency which apparently gets built by the mingw toolchain
    9.2 however building with OpenCL requires pre-copying of NVIDIA openCL .DLL files, and relvant KHRONOS headers
    so, after extracting ffmpeg-windows-build-helpers-master to a local folder, run this first in Windows
    (later, I manually copy the updated ffmpeg-windows-build-helpers-master folder into an ubuntu VM to then use the script to build ffmpeg)
echo on
ECHO "Copy this file c:\Windows\System32\OpenCL.dll into ~/Desktop/ffmpeg-windows-build-helpers-master/openclx64/ for 64 bit "
ECHO "Copy this file c:\Windows\Syswow64\OpenCL.dll into ~/Desktop/ffmpeg-windows-build-helpers-master/openclx32/ for 32 bit "
mkdir .\openclx64
mkdir .\openclx32
copy /b /z /y /v /d c:\Windows\System32\OpenCL.dll .\openclx64\OpenCL.dll
copy /b /z /y /v /d c:\Windows\Syswow64\OpenCL.dll .\openclx32\OpenCL.dll
mkdir .\ffmpeg-windows-build-helpers-master\openclx32
copy /b /z /y /v /d .\openclx32\*.* .\ffmpeg-windows-build-helpers-master\openclx32\*.*
mkdir .\ffmpeg-windows-build-helpers-master\openclx64
copy /b /z /y /v /d .\openclx64\*.* .\ffmpeg-windows-build-helpers-master\openclx64\*.*
pause
exit

6.3 OpenCL 1.2 headers are downloaded from Khronos (v1.2 works for nvidia moderate range GPUs eg 750Ti)

cross_compile_ffmpeg.patch.txt
libopus.patch.txt
edit: don't use these patches, refer issue below, ... reviewing the script and will suggest another in due course.

Notes:
If you wanted, you could omit the OpenCL provisioning, since
the KHRONOS opencl header file versions can get fairly specific to the nvidia video card.
However, if you leave it in, it's a basic example of how to go about it.

No luck with openjpeg 2.1.2 as yet.
edit: openjpeg 2.1.2 issue fixed, refer below

And, as always, I am happy to be corrected.

And, many thanks to Reino17.

@hydra3333

This comment has been minimized.

Copy link

commented Apr 9, 2017

No, please don't use that patch.

ffmpeg now throws an error "the program can's start because libgme.dll is missing from your computer. try reinstalling the program to fix this problem." :(

Jolly, bother, and dash it all.

@jpham986

This comment has been minimized.

Copy link

commented Apr 9, 2017

@hydra3333

This comment has been minimized.

Copy link

commented Apr 9, 2017

OK, ffmpeg built like this doesn't appear to crash.
Attached is
(i) a proposed patch cross_compile_ffmpeg.patch (non-XP safe)
(ii) together with a new companion libopus.patch patch to be uploaded by rdp into this place
https://raw.githubusercontent.com/rdp/ffmpeg-windows-build-helpers/master/patches/libopus.patch

Files:
cross_compile_ffmpeg.patch.txt
libopus.patch.txt
cross_compile_ffmpeg_updated_versions_temp.sh.txt

Summary of Changes:

  1. external library software versions should align more closely with Zeranoe's build or newer per Reino17
  2. other external library software versions have been updated, and some source links have changed too since I got an occasional "connection refused"
  3. one or two libraries have changed to use GIT rather than vanilla fixed version download
  4. x264 now downloads the master from GIT rather than the stable, to get the latest and greatest updates (a lot of new and good things happen and we desire them)
  5. build_x264_with_libav defaults to yes so that x264 can input mpeg files directly
  6. build_lsw defaults to yes ...
  7. build_lsw=y now forces a second rebuild of lsw and then of libx264, so that x264.exe gets built with LSMASH and thus can output .mp4 files directly
  8. enable_opencl defaults to no (with no commandline option either) since nvidia based openCL can be somewhat card group specific
  9. provision has been made for future nvidia based openCL integration (enable_opencl=y)
    9.1 gendef now gets built with the mingw toolchain; dlltool is a dependency which apparently gets built by the mingw toolchain
    9.2 however building with OpenCL requires pre-copying the x32 and x64 NVIDIA openCL .DLL files, and relevant KHRONOS headers of the right version (eg v1.2 for 750Ti)
    so, after extracting ffmpeg-windows-build-helpers-master to a local folder, run this first in Windows
    (later, I manually copy the updated ffmpeg-windows-build-helpers-master folder into an ubuntu VM to then use the files in the folders and the script to build ffmpeg with openCL)
echo on
ECHO "Copy this file c:\Windows\System32\OpenCL.dll into ~/Desktop/ffmpeg-windows-build-helpers-master/openclx64/ for 64 bit "
ECHO "Copy this file c:\Windows\Syswow64\OpenCL.dll into ~/Desktop/ffmpeg-windows-build-helpers-master/openclx32/ for 32 bit "
mkdir .\openclx64
mkdir .\openclx32
copy /b /z /y /v /d c:\Windows\System32\OpenCL.dll .\openclx64\OpenCL.dll
copy /b /z /y /v /d c:\Windows\Syswow64\OpenCL.dll .\openclx32\OpenCL.dll
mkdir .\ffmpeg-windows-build-helpers-master\openclx32
copy /b /z /y /v /d .\openclx32\*.* .\ffmpeg-windows-build-helpers-master\openclx32\*.*
mkdir .\ffmpeg-windows-build-helpers-master\openclx64
copy /b /z /y /v /d .\openclx64\*.* .\ffmpeg-windows-build-helpers-master\openclx64\*.*
pause
exit

9.3 OpenCL 1.2 headers are downloaded from Khronos (v1.2 works for nvidia moderate range GPUs eg 750Ti)

Notes:
If you wanted, you could omit the OpenCL provisioning, since
the KHRONOS opencl header file versions can get fairly specific to the nvidia video card.
However, if you leave it in, it's a basic example of how to go about it.

Many thanks to Reino17 and schmidthubert ... and rdp.

I am happy to be corrected.

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

I see you're having fun ... :)

I checked and found 2 things: libcaca => beta19 and xvid => 1.3.4

Also patches/mingw-w64-build-3.6.7.local has a hardcoded "gmp-6.1.1" at line 690 which should be changed to "gmp-$gmp_release_ver" because we're at 6.1.2 now and that version is working fine for me and so is mpfr_release_ver='3.1.5' in the same file :)

Also you can add --enable-libkvazaar to the configure options now. Its LGPL not GPL, so add globally, here goes:

config_options="$init_options --enable-libkvazaar ...

plus:

build_libkvazaar() {
#example: ffmpeg -y -i input.mp4 -c:v libkvazaar -kvazaar-params "threads=auto,preset=medium,wpp=1" -rc vbr -b:v 1500k -maxrate 2000k -vf scale=1280:-1 -c:a copy output.mp4
do_git_checkout https://github.com/ultravideo/kvazaar.git
cd kvazaar_git
# apply_patch file://localhost$(pwd)/../../../patches/kvazaar_rdo_gcc7snapshot.patch # ATM only needed for gcc7+
sed -i.bak 's/^AM_PROG_AR$/m4_ifdef([AM_PROG_AR], [AM_PROG_AR])/' configure.ac
do_configure "--prefix=$mingw_w64_x86_64_prefix --host=$host_target --disable-shared"
do_make_and_make_install
sed -i.bak 's/Cflags: -I${incdir}$/Cflags: -I${incdir} -DKVZ_STATIC_LIB/' "$PKG_CONFIG_PATH/kvazaar.pc"
cd ..
}

plus the obvious:

build_dependencies() {
build_libkvazaar
build_libdlfcn
...

Attached patch not needed for rdp's build then ... ;)

kvazaar_rdo_gcc7snapshot.patch.txt

@hydra3333

This comment has been minimized.

Copy link

commented Apr 9, 2017

Thank you, I did have some fun learning :) and will check the things you raised (only rdp can change his patches/mingw-w64-build-3.6.7.local although I suppose ordinary illiterate peasants like me can create a local copy to try out the change)
... suggestions on a free web host which allows direct downloads with the filename on the end of the url (as is required by one of the functions) would be welcome.

"xvid => 1.3.4" ... xvid isn't built (the function is there though) as Reino17 linked to an ffmpeg web page which suggested it was now handled "internally".

kvazaar ... an open-source HEVC encoder ... looks interesting ... kvazaar_rdo_gcc7snapshot.patch.txt held in abeyance (and anticipation) until gcc v7 arrives in rdp's script and zeranoe's toolchain, then :)

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

kvazaar was promising but since libx265 has made so much progress and has good speed now (for those who (have to) rely on Intels GPU and don't own Nvidia GTX's) then there's not much "use", I just added it in case anyone (still) wants it :)

As for xvid handled internally I'll check!

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

Nope, xvid code still comes from xvid. What's inside is the "handling" as in eg. "--enable-libkvazaar" before. But the lib has to be supplied. Check the following, this is what happens if you try to configure ffmpeg under linux with just --enable-gpl and --enable-xvid, no further switches:

me@console:/tmp/ffmpeg# grep -inr xvid_version *
libavcodec/libxvid.c:136: XVID_VERSION_MAJOR(XVID_VERSION),
libavcodec/libxvid.c:137: XVID_VERSION_MINOR(XVID_VERSION),
libavcodec/libxvid.c:138: XVID_VERSION_PATCH(XVID_VERSION));
libavcodec/libxvid.c:482: xvid_gbl_init.version = XVID_VERSION;
libavcodec/libxvid.c:490: xvid_enc_create.version = XVID_VERSION;
libavcodec/libxvid.c:506:#if (XVID_VERSION <= 0x010303) && (XVID_VERSION >= 0x010300)
libavcodec/libxvid.c:528: rc2pass1.version = XVID_VERSION;
libavcodec/libxvid.c:544: rc2pass2.version = XVID_VERSION;
libavcodec/libxvid.c:576: single.version = XVID_VERSION;
libavcodec/libxvid.c:778: xvid_enc_frame.version = XVID_VERSION;
libavcodec/libxvid.c:779: xvid_enc_stats.version = XVID_VERSION;
me@console:/tmp/ffmpeg# ./configure --enable-gpl --enable-libxvid
ERROR: libxvid not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
me@console:/tmp/ffmpeg# cd ../xvidcore
me@console:/tmp/xvidcore# grep -inr xvid_version *
ChangeLog:3850: set XVID_VERSION to 1.2.-127
[...]
src/xvid.h:60:#define XVID_VERSION XVID_MAKE_VERSION(1,3,4)
[...]
me@console:/tmp/xvidcore#

As you can see even something as simple as the xvid version comes from extern ... libxvidcore.a is 1.1MB in size, that's compiled ...

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

The following should be missing if compiled without --enable-xvid (this is from ffmpeg -h full):

libxvid AVOptions:
-lumi_aq E..V.... Luminance masking AQ (from 0 to 1) (default 0)
-variance_aq E..V.... Variance AQ (from 0 to 1) (default 0)
-ssim E..V.... Show SSIM information to stdout (from 0 to 2) (default off)
off E..V....
avg E..V....
frame E..V....
-ssim_acc E..V.... SSIM accuracy (from 0 to 4) (default 2)
-gmc E..V.... use GMC (from 0 to 1) (default 0)
-me_quality E..V.... Motion estimation quality (from 0 to 6) (default 0)
-mpeg_quant E..V.... Use MPEG quantizers instead of H.263 (from 0 to 1) (default 0)

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

https://www.ffmpeg.org/ffmpeg-all.html#libxvid

"The native mpeg4 encoder supports the MPEG-4 Part 2 format, so users can encode to this format without this library"

So that's all that's handled "internally" ..

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2017

@hydra3333

-      nice ./$zeranoe_script_name $zeranoe_script_options --build-type=win32 || exit 1
+      nice ./$zeranoe_script_name $zeranoe_script_options --build-type=win32 --enable-gendef || exit 1

What does --enable-gendef do?

  1. x264 now downloads the master from GIT rather than the stable, to get the latest and greatest updates
-  do_git_checkout "https://github.com/cisco/openh264.git" openh264 24916a652ee5d3
+  download_and_unpack_file https://github.com/cisco/openh264/archive/v1.6.0.tar.gz openh264-1.6.0

Why then move away from git for OpenH264?

-  generic_download_and_make_and_install http://tukaani.org/xz/xz-5.2.2.tar.bz2
+  #generic_download_and_make_and_install http://tukaani.org/xz/xz-5.2.3.tar.bz2 # this refused to connect :(
+  generic_download_and_make_and_install https://sourceforge.net/projects/lzmautils/files/xz-5.2.3.tar.xz

I have no problem connecting to http://tukaani.org/xz/xz-5.2.3.tar.bz2.

+  #apply_patch http://rwijnsma.home.xs4all.nl/files/ffmpeg/libopus.patch # allow it to work with shared builds

#218 (comment):

Yes, OK changed to that now, however the updated patch by Reino17 still seems to need to be applied to the GIT version..

Judging opus_defines.h from git, then yes, probably. However, I only do static builds, so someone should test compiling a shared build.

+  generic_download_and_make_and_install https://www.fribidi.org/download/fribidi-0.19.7.tar.bz2 # 1.19.7 doesn't need patching ?

#219 (comment):

Judging the v0.19.7's source-code, the patch isn't needed anymore.


-  download_and_unpack_file https://fossies.org/linux/misc/bzip2-1.0.6.tar.gz
+  #download_and_unpack_file https://fossies.org/linux/misc/bzip2-1.0.6.tar.gz # this became unavailable :(
+  download_and_unpack_file http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz

I have no problem connecting to https://fossies.org/linux/misc/bzip2-1.0.6.tar.gz.

+  # version 2.7.1 wouldn't build ???? :( 
+  download_and_unpack_file https://sourceforge.net/projects/freetype/files/freetype2/2.7.1/freetype-2.7.1.tar.bz2

I have no problem building v2.7.1. Maybe the fact that I'm using the latest WinXP compatible Cygwin has something to do with it? It's v2.874 from 25 Aug 2016 and you're using the latest version for Win7 and up, I take it?

+  # version 0.1.9 wouldn't build :( see if someone can spend time on it
+  #generic_download_and_make_and_install http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz # 0.1.9 fails to build

My 'cross_compile_ffmpeg.log' already mentioned that.

+  download_and_unpack_file https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-0.6.1.tar.bz2 
+  cd game-music-emu-0.6.1
+  do_cmake_and_install "-DBUILD_SHARED_LIBS=OFF"
...
+  generic_download_and_make_and_install https://github.com/google/snappy/releases/download/1.1.4/snappy-1.1.4.tar.gz
...
+  download_and_unpack_file https://github.com/uclouvain/openjpeg/archive/v2.1.2.tar.gz openjpeg-2.1.2
+  cd openjpeg-2.1.2
+  export CFLAGS="$CFLAGS -DOPJ_STATIC"
+  do_cmake_and_install "-DBUILD_SHARED_LIBS:BOOL=off -DBUILD_THIRDPARTY:BOOL=on -DBUILD_PKGCONFIG_FILES:BOOL=on"
+  reset_cflags  

Thanks! libgme and libopenjpeg are built without problems now.
Now those that remain unsuccessful are:

gsm-1.0-pl14          --> gsm-1.0-pl16
libtheora-1.2.0alpha1 --> theora_git (libpng-1.5.26 --> libpng-1.6.29)
vamp-plugin-sdk-2.6   --> vamp-plugin-sdk-2.7.1
libsamplerate-0.1.8   --> libsamplerate-0.1.9
libcaca-0.99.beta18   --> libcaca-0.99.beta19
libdvdread-4.9.9      --> libdvdread-5.0.3
libdvdnav-4.2.1       --> libdvdnav-5.0.3
libdvdcss-1.2.13      --> libdvdcss-1.4.0
libbluray-0.7.0       --> libbluray-1.0.0

I would advice you to include:

-  download_and_unpack_file https://www.openssl.org/source/openssl-1.1.0e.tar.gz
-  cd openssl-1.1.0e
+  download_and_unpack_file https://www.openssl.org/source/openssl-1.0.2k.tar.gz # This setup needs an update for OpenSSL 1.1.x. See https://github.com/rdp/ffmpeg-windows-build-helpers/issues/214#issuecomment-288736482.
+  cd openssl-1.0.2k

If someone wants to build FFMpeg with OpenSSL, then at least he won't get any errors. Or someone has to update build_openssl() {...}.

+  download_and_unpack_file https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.1.tar.gz libjpeg-turbo-1.5.1
+  download_and_unpack_file https://www.lua.org/ftp/lua-5.3.4.tar.gz
+  generic_download_and_make_and_install https://curl.haxx.se/download/curl-7.53.1.tar.gz

I'm only using rdp's script to build FFMpeg, but for other stuff you can then also update (untested of course):

+  download_and_unpack_file http://pkgs.fedoraproject.org/repo/pkgs/qt/qt-everywhere-opensource-src-4.8.7.tar.gz/d990ee66bf7ab0c785589776f35ba6ad/qt-everywhere-opensource-src-4.8.7.tar.gz
+  download_and_unpack_file http://downloads.xvid.org/downloads/xvidcore-1.3.4.tar.gz xvidcore

+prefer_stable=n # get the latest by default, we want the latest and greatest don't we ?

I've seen that this only applies to x265. I hardly have any experience with Shell script, but wouldn't the following work and wouldn't it be appropriate to implement this for x264 as well?

if [[ $prefer_stable = "n" ]]; then
  do_git_checkout "http://git.videolan.org/git/x264.git" $checkout_dir "origin/master"
else
  do_git_checkout "http://git.videolan.org/git/x264.git" $checkout_dir "origin/stable"
fi

build_x264_with_libav defaults to yes so that x264 can input mpeg files directly

I'd say, keep the default "no". I think the majority of users of this script use it to build FFMpeg and not x264. It takes another 60-90min to build a FFMpeg without libx264 for this.

Ok, with 'cross_compile_ffmpeg.sh' ('cross_compile_ffmpeg.diff') I've successfully built ffmpeg-N-85396-g20f7872-win32-static_legacy.7z.
Compared to last one:

game-music-emu-0.6.0     --> game-music-emu-0.6.1
snappy-1.1.3-14-g32d6d7d --> snappy-1.1.4
openjpeg-1.5.2           --> openjpeg-2.1.2

@jpham986
See #201 (comment).
I haven't tested it, because I'm still on WinXP, but this should be a workaround.

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2017

@schmidthubert

I checked and found 2 things: libcaca => beta19 ...

My 'cross_compile_ffmpeg.sh':

# beta19 and git are xp unfriendly. libcaca-0.99.beta19 and FFMpeg are compiled without
problems, but FFMpeg then returns: "The procedure entry point _vsnprintf_s could not be
located in the dynamic link library msvcrt.dll". See http://caca.zoy.org/changeset/4822
and http://caca.zoy.org/changeset/4823 ?

Nope, xvid code still comes from xvid.

Well, that's a surprise then. I don't use XviD anymore, but is it bad to not have these options anymore for diehard XviD-encoders?
What about WavPack? Does the built-in implementation also have limitations? I've just quickly done some decoding and encoding and all went fine.

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

Just some points:

I have no problem connecting to ...

Well I prefer to stick with bitbucket, sourceforge, github etc as 1.) who knows what some tuukani (Tumbuktu?) website is doing with/to some sourcecode and 2.) who knows if such a site will still be there in a couple of days ...

gendef

It exist to rip of some info off ie. DLL's for which no sourcecode is provided, NVidia in this case.

old openssl

These days a lot is going on with SSL, TLS etc, so most people 1.) have the 10 bucks to buy a legit Windows 7 CD on ebay and 2.) want to have the most recent openssl version they can find => security holes etc ..

libcaca beta19 / _vsnprintf_s win xp

I understand all that but this is a script for the "majority". It shouldn't be a problem to stick with your version and then just do a compare to rdp's (there's graphical diff tools for that you know) and then only cherry pick from rdp's script(s) what you need in the future ...

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

wavpack

The same as for xvid applies:

doc/encoders.texi:1181:A wrapper providing WavPack encoding through libwavpack.
doc/encoders.texi:1185:Requires the presence of the libwavpack headers and library during
[...]
doc/encoders.texi:1187:@code{--enable-libwavpack}.

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

me@console:/tmp/ffmpeg# ./configure --enable-libwavpack
ERROR: libwavpack not found

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

But you're more lucky there as it seems:
https://www.ffmpeg.org/ffmpeg-all.html#wavpack

"This is a libavcodec-native WavPack encoder. There is also an encoder based on libwavpack, but there is virtually no reason to use that encoder."

So it seems you need --with-libav then, just check your exe-helpfiles ...
edit: I'm not really sure here, you should google for some ffmpeg example cmdlines howto use that etc.

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

I don't use XviD anymore, but is it bad to not have these options anymore for diehard XviD-encoders?

Some old devices like old mobile phones and tablets etc can still deal with xvid but not hevc so xvid is still in use today :)

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2017

Well I prefer to stick with bitbucket, sourceforge, github etc

You have a point there.

These days a lot is going on with SSL, TLS etc, so most people 1.) have the 10 bucks to buy a legit Windows 7 CD on ebay and 2.) want to have the most recent openssl version they can find => security holes etc ..

Are you saying you had success building OpenSSL 1.1.0e with it's current configuration?

I understand all that but this is a script for the "majority".

I started this 'issue' with "This is a report rather than an 'issue'.". So it was never my intention to demand for my cross_compile_ffmpeg.sh to be used. I just report. :)

So it seems you need --with-libavcodec then, just check your exe-helpfiles ...

Could you elaborate on this? Need it for what and where?

Some old devices like old mobile phones and tablets etc can still deal with xvid but not hevc so xvid is still in use today :)

But are these options really needed for old devices? Wouldn't ffmpeg -i input.avi -c:v mpeg4 -vtag xvid output.avi create a good enough output?

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

openssl just builds normally for me, no exports and no unsets as in rdp's script:
build_openssl() {
download_and_unpack_file https://www.openssl.org/source/openssl-1.1.0e.tar.gz
cd openssl-1.1.0e
if [ "$bits_target" = "32" ]; then
do_configure "--prefix=$mingw_w64_x86_64_prefix no-shared no-asm mingw" ./Configure
else
do_configure "--prefix=$mingw_w64_x86_64_prefix no-shared no-asm mingw64" ./Configure
fi
cpu_count=1
do_make_and_make_install "$make_prefix_options"
cpu_count=$original_cpu_count
cd ..
}

Need it for what and where?

I thought it was you who needed that wavpack functionality? That's why I wrote you should check all your ffmpeg exe's help to find "wavpack". If not we can forget about this ...

But are these options really needed for old devices? Wouldn't ffmpeg -i input.avi -c:v mpeg4 -vtag xvid output.avi create a good enough output?

Yes, but no "finetuning" then, no parameters, nothing then. Check the complete xvid options, none of that is available then.

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

Here are some screens from xvid if installed standalone, all this functionality is missing from ffmpeg then if compiled without xvid lib.
http://www.computerbild.de/download/Xvid-1158807.html

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

I wrote:

openssl just builds normally for me

Sorry, but that's nonsense as it's been long commented out in build_dependencies(). I thought it was at least still building but just not included anymore at the end. But not so, sorry for that! :(

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2017

So you also got ERROR: openssl not found with OpenSSL 1.1.0e?

I thought it was you who needed that wavpack functionality?

Who doesn't? But why include libwavpack when wavpack can do everything too?
In the meantime I've noticed:

ffmpeg.exe -hide_banner -h encoder=wavpack
Encoder wavpack [WavPack]:
    General capabilities: small
    Threading capabilities: none
    Supported sample formats: u8p s16p s32p fltp
WavPack encoder AVOptions:
  -joint_stereo      <boolean>    E...A...  (default auto)
  -optimize_mono     <boolean>    E...A...  (default false)


ffmpeg.exe -hide_banner -h encoder=libwavpack
Encoder libwavpack []:
    General capabilities: delay small
    Threading capabilities: none
    Supported sample formats: s32

Every 16bit audio you feed to libwavpack it converts to 32bit, as somehow that's all it supports...

ffmpeg.exe -i "input.wav" -c:a wavpack -compression_level 4 "output.wv" works just fine (where -compression_level 4 equals wavpack's -hhx2), so libwavpack isn't needed at all.

Btw, I still don't understand what you meant with --with-libavcodec. Is it a valid parameter? It's not in FFMpeg's configure at least.

Yes, but no "finetuning" then, no parameters, nothing then. Check the complete xvid options, none of that is available then.

I've just done 2 quick XviD encodes on a 640x480 video sample. One with -c:v mpeg4 -vtag xvid -b:v 1000k, the other with -c:v libxvid -b:v 1000k.
You can see right away that libxvid produces a better result than mpeg4. I'll include libxvid again next time. ;)

@ghost

This comment has been minimized.

Copy link

commented Apr 9, 2017

But why include libwavpack when wavpack can do everything too?

This is what I meant! All you had to do is check your ffmpeg's help ... :)

Btw, I still don't understand what you meant with --with-libavcodec

Sorry, I'm not familar with wavpack nor use it, wrong idea/track on my part in the rush ...

I'll include libxvid again next time. ;)

On the cmdline you'll have to make that an uppercase "-vtag XVID" as otherwise some important details are missing as you can see with tools like mediainfo etc ...

And just for fun openssl is already compiling again but now's got some libcrypto errors. Already got libs and .pc files :) Will try to check later this week if I get it working again. But that's a monster and complex anyway so I guess I'll stumble from one error to next etc, so I'm not sure! ...

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2017

https://rtmpdump.mplayerhq.hu/:

To build with all features enabled, you will also need a Cryptography library and the zlib compression library. It uses OpenSSL by default, but you can also use GnuTLS or PolarSSL instead.

If it's true what you say, then why would they still put this on their frontpage?
I think I'll send them a mail one of these days about the error we got.

and it's the time of TLS now

I hope you don't believe OpenSSL only supports SSL. See https://en.wikipedia.org/wiki/Comparison_of_TLS_implementations#Protocol_support.

Anyway, I've already successfully built RTMPDump with GnuTLS (+nettle and gmp), so I'm good. But if you include OpenSSL in your script, then I'd say you'd also have to make it work for those who prefer OpenSSL over GnuTLS.

Apart from building OpenSSL, did you now also successfully built FFMpeg with OpenSSL 1.1.0e??

You should really spend those 20 bucks for Win7 / Win81 Pro now

I'd have to buy a completely new computer first. ;)

@DeadSix27

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2017

@Reino17 he means it doesn't support OpenSSL 1.1.x, only 1.0.x, a lot of sources have that issue, kinda annoying.

@ghost

This comment has been minimized.

Copy link

commented Apr 14, 2017

@Reino17

and it's the time of TLS now

I hope you don't believe OpenSSL only supports SSL. See >https://en.wikipedia.org/wiki/Comparison_of_TLS_implementations#Protocol_support.

Don't worry, I know which is which and what is what ...

Apart from building OpenSSL, did you now also successfully built FFMpeg with OpenSSL 1.1.0e??

Maybe you don't yet quite understand the concept of a program? If no code in a program is calling a certain function then no code of that function is actually included/(in ffmpeg mostly:statically) linked to/with that program. So if there are no openssl function calls from librtmp (because it's using gnutls now) then no code FROM openssl will be included/linked in/with ffmpeg.exe even if "ffmpeg -buildconf" shows BOTH --enable-gnutls AND --enable-openssl because that's just a BUILDCONF-"string" and "ffmpeg -protocols" will still/only tell you that ffmpeg can "speak" https and tls, that's all ... Try this: include "--enable-openssl" 3 times in $config_options, that will will help you zilch, it's still only a BUILDCONF-string without any further meaning regarding the function(s) of ffmpeg ...

You should really spend those 20 bucks for Win7 / Win81 Pro now

I'd have to buy a completely new computer first. ;)

I don't know any computer which doesn't work with Win7. There's Intel+AMD drivers for CPU+chipset even if older and in case your onboard USB or network card doesn't work there's PCI(e) cards with drivers for all OS's ...

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2017

@DeadSix27 That's probably because of https://www.openssl.org/docs/faq.html#MISC5

@schmidthubert

Maybe you don't yet quite understand the concept of a program? ...

I may be new to cross compiling, but that I do understand. But I wasn't talking about RTMPDump.

openssl 1.1.0e with --enable-openssl as well is building for me now again...

Are you saying you had success building OpenSSL 1.1.0e with it's current configuration?

I should've asked: "... and compiling FFMpeg?!"
Because I've also had succes building OpenSSL 1.1.0e with both configs (the original and yours), but got ERROR: openssl not found once FFMpeg finished configuring.
I got this error without --enable-librtmp mind you.

I actually should've asked: "Are you saying you had success building FFMpeg with --enable-openssl (OpenSSL 1.1.0.e) and without --enable-librtmp (because it doesn't work with OpenSSL at the moment anyway)?
Because only then I get ERROR: openssl not found. And this again is most likely because of https://www.openssl.org/docs/faq.html#MISC5

@ghost

This comment has been minimized.

Copy link

commented Apr 15, 2017

Why do you want to include --enable-openssl at all again?

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2017

I'm fine with GnuTLS, but I was trying get the latest OpenSSL working.

Roger's script is publicly available for everyone to use. Eventhough GnuTLS is used at the moment in favour of OpenSSL, I'd try to make OpenSSL work for those who want to use it if it were my script.
That's my opinion, but I realize now you have a completely different mindset.

@ghost

This comment has been minimized.

Copy link

commented Apr 15, 2017

Yes, and it's not just me. At least nobody but you is complaining ...

And openssl is working fine, everywhere and on a lot of Linux servers. Your problems are not openssl's fault. If projects like librtmp cannot or will not keep up with the pace then "the world" will work around such problems, it's really that easy. Luckily we have TLS now and prefer that over SSL :) It's not that SSL is dead at all but you can ask the rtmpdump programmers (and others) for their reasons as well ...

@ghost

This comment has been minimized.

Copy link

commented Apr 15, 2017

Besides:

Because only then I get ERROR: openssl not found.

There's no such thing like a librtmp dependency in ffmpeg's ./configure, all there's is

--enable-gcrypt enable gcrypt, needed for rtmp(t)e support
if openssl, librtmp or gmp is not used [no]
--enable-gmp enable gmp, needed for rtmp(t)e support
if openssl or librtmp is not used [no]
--enable-gnutls enable gnutls, needed for https support
if openssl is not used [no]

and
--enable-openssl enable openssl, needed for https support
if gnutls is not used [no]

and that's that. It's the other way around:

ffrtmpcrypt_protocol_deps_any="gcrypt gmp openssl"

So if you get openssl "not found" errors then that MAYBE because you didn't nuke your sandbox COMPLETLY which maybe cluttered by a lot of dependencies/symbols already because you switched ffmpegs options a lot and simply "forgot" about cleaning it. Such drastic changes will never work without PROPER wiping ... It's 0's and 1's, there's no "maybe". To be 100% sure as in 1's you have to ALWAYS wipe it IF NOT 100% sure, there's no 0,9 in computing ...

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2017

I really don't understand why you keep on going about RTMPDump when I explicitly said I got the error without --enable-librtmp!
It's FFMpeg that complains about ERROR: openssl not found, not RTMPDump.

I'm rather punctual when it comes to cleaning, but of course, there's always the possibility I forgot something. I'll come back at this when I've done a fresh run.

@ghost

This comment has been minimized.

Copy link

commented Apr 16, 2017

Well, you asked me to:

I actually should've asked: "Are you saying you had success building FFMpeg with --enable-openssl >(OpenSSL 1.1.0.e) and without --enable-librtmp (because it doesn't work with OpenSSL at the moment anyway)?
Because only then I get ERROR: openssl not found.

There's your "only then" pointing to librtmp, which to me doesn't make sense because it's clear without even trying that openssl certainly does NOT require rtmp ;)

@ghost

This comment has been minimized.

Copy link

commented Apr 16, 2017

there's always the possibility I forgot something

That's not possible as you just put that into a script, forgetting something here is like 0,9 ...

rm -fr sandbox/win32/ sandbox/x86_64/ sandbox/cross_compilers/mingw-w64-i686/ sandbox/cross_compilers/mingw-w64-x86_64/ sandbox/cross_compilers/build.log sandbox/cross_compilers/build/ sandbox/cross_compilers/source/ sandbox/cross_compilers/pkgs

@ghost

This comment has been minimized.

Copy link

commented Apr 16, 2017

It's FFMpeg that complains about ERROR: openssl not found, not RTMPDump.

Here's ffmpeg's ./configure regarding that:
enabled openssl && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
use_pkg_config openssl openssl/ssl.h SSL_library_init ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
die "ERROR: openssl not found"; }

But you could've found that out all by yourself by just grep'ing for that error message ...

@hydra3333

This comment has been minimized.

Copy link

commented Apr 16, 2017

Hello.

I notice that flite v2.0.0 is out and about ... and that the older version has fatal compilation errors but rdp's script carries on anyway :)

Anyway, v2.0.0 compiles ok with a similar patch to the older version. (I have not tried actually running it from the ffmpeg commandline though, since I don't use it).

Is there such a thing as an ffmpeg test suite under Windows ? If so, where would I find it and are there instructions for running it ?

@ghost

This comment has been minimized.

@ghost

This comment has been minimized.

Copy link

commented Apr 16, 2017

qt => 5.8.0, snappy => git, libgsm => 1.0.16, all OK and working too ...

@ghost

This comment has been minimized.

Copy link

commented Apr 16, 2017

Anyway, v2.0.0 compiles ok with a similar patch

No need to create a new 1 line patch here, fuzz 1 is fine, even fuzz 2 is. "man patch", check also its -F param for much more complicated cases ... :)

@hydra3333

This comment has been minimized.

Copy link

commented Apr 17, 2017

:) well, you learn something every day.

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2017

Ok. I've decided to fork rdp's project. I've updated the entire script, updated every dependency and fixed numerous things. I've spent way too much time on this the last 7 weeks or so, but boy have I learned a lot (for a Windows user)!
A summary of what it uses compared to rdp's current git:

mingw-w64-build-3.6.7.local --> mingw-w64-build-r21.local (https://files.1f0.de/mingw/scripts/)
xz-5.2.2                      --> xz-5.2.3
zlib-1.2.8                    --> zlib-1.2.11
libiconv-1.14                 --> libiconv-1.15
openjpeg-1.5.2                --> openjpeg_git
libpng-1.5.26                 --> libpng_git
libwebp-0.5.0                 --> libwebp_git
freetype-2.6.3                --> freetype-2.7.1
expat-2.1.0                   --> expat-2.2.0 (disabled)
fontconfig-2.11.94            --> fontconfig-2.12.1
gmp-6.0.0                     --> gmp-6.1.2
nettle-3.1                    --> nettle-3.3
gnutls-3.5.9                  --> gnutls=3.5.12
openssl-1.1.0                 --> openssl-1.0.2 and openssl-1.1.0
libogg-1.3.1                  --> ogg_git
libvorbis-1.3.4               --> vorbis_git
opus-1.1                      --> opus_git
speexdsp-1.2rc3               --> speexdsp_git
libtheora-1.2.0alpha1         --> theora_git
libsndfile-1.0.25             --> libsndfile_git
lame-3.99.5                   --> lame_git
twolame-0.3.13                --> twolame_git
opencore-amr-0.1.3            --> opencore-amr-0.1.5
vo-amrwbenc-0.1.2             --> vo-amrwbenc-0.1.3
gsm-1.0-pl14                  --> gsm-1.0-pl16
libmodplug-0.8.8.5            --> libmodplug_git
game-music-emu-0.6.0          --> game-music-emu_git
wavpack-4.70.0                --> removed
libbluray-0.7.0               --> libbluray_git
soxr-0.1.2                    --> soxr_git
flite-1.4                     --> flite-2.0.0
snappy-1.1.3-14               --> snappy_git
orc-0.4.18                    --> orc_git
vamp-plugin-sdk-2.6           --> vamp-plugin-sdk-2.7.1
fftw-3.3.5                    --> fftw-3.3.6-pl2
libsamplerate-0.1.8           --> libsamplerate_git
rubberband-1.8.1              --> rubberband_git
frei0r-plugins-1.4            --> frei0r_git
vid.stab_git (v0.9.8)         --> vid.stab_git
netcdf-4.4.1                  --> netcdf-c_git (v4.4.1.1)
libcaca-0.99.beta18           --> libcaca_git
fribidi-0.19.4                --> fribidi_git
libass-0.13.1                 --> libass_git
xvidcore-1.3.3                --> xvidcore-1.3.4
libvpx_git (v1.6.1)           --> libvpx_git
openh264_git (24916a652ee5d3) --> openh264_git

For all other details see my fork. Take your pick :). Question are welcome.

Fresh win32 (+WinXP and non-SSE2 cpu compatible) builds:

ffmpeg-N-86354-g9221445-win32-static_legacy.7z
libfdk-aac-x86-v0.1.5-8-g5eb6f0d.7z (Extract 'libfdk-aac-1.dll' to the same map as 'ffmpeg.exe'.)
frei0r-plugins-x86-v1.6.1.7z (Extract the map 'frei0r-1' to the same map as 'ffmpeg.exe'.)
openssl-x86-v1.0.2k.7z (Contains 'libeay32.dll' and 'ssleay32.dll' that other software like Xidel can use.)
openssl-x86-v1.1.0e.7z (Contains 'libcrypto-1_1.dll' and 'libssl-1_1.dll' that other software can use.)

@rdp

This comment has been minimized.

Copy link
Owner

commented Jun 5, 2017

@hydra3333

This comment has been minimized.

Copy link

commented Jun 6, 2017

If you want the latest nasm (ubuntu didn't install the latest), something like this in the build script helps (assuming run under sudo so the make install worked :)).

#------------------------------------------------------------------------------------------------
# 2017.05.26 x264 has a new dependency on nasm 2.13.1 or greater ... 
# before we do anything, build NASM if need be
set -x
if [[ ! -d "nasm-2.13.01" ]]; then
   echo "Downloading nasm 2.13.01"
   download_and_unpack_file "http://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.xz"
   echo "Configuring nasm 2.13.01"
   cd nasm-2.13.01
      ./autogen.sh || exit 1
      ./configure --prefix=/usr --exec_prefix=/usr --enable-sections --enable-lto || exit 1 #
      echo "Make nasm 2.13.01"
      #make #everything 
      make || exit 1 #
      echo "Installing nasm 2.13.01"
      make install  || exit 1 #
   cd ..
   echo "Done Building and Installing nasm 2.13.01"
fi
set +x
#read -p "After nasm build, press Enter to continue"
#------------------------------------------------------------------------------------------------

if you're tinkering with opencl, you may consider building gendef as well...
nice ./$zeranoe_script_name $zeranoe_script_options --build-type=win64 --enable-gendef || exit 1

edit: I guess I should post this over at the fork...

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2017

@rdp: Ah! I didn't know Kyle released another update. Building now.

I'm not totally sure what you mean by "when it feels stable". The FFmpeg build works fine, so that's "stable".
Concerning 'cross_compile_ffmpeg.sh' however, you do have to realize that all of this works on my (old) system AND I've only done win32 static builds! Win64 I can't test and the entire script needs another update in order to do shared builds.
I've also made choices that not everyone might like. Building libraries only for instances. While it shortens the total compilation time (and prevents compilation failure a couple of times), it also causes lot's of dependency exe-files not being build (x264.exe and x265.exe for instance). Building a shared libfdk-aac is another example.
On the other hand, you're free to cherry-pick what you like of course. Just be sure to double check if it also works on your system.

@hydra3333: Thanks. At the moment however I'm satisfied with the "stable" x264-release, so it's not needed. For whatever reason it's needed for the "origin/master"-branch and since it's not included in Kyle's "MingGW-w64 Build Script", we'd have to add it ourselves.
Is this your code btw, or have you found it somewhere else?

@hydra3333

This comment has been minimized.

Copy link

commented Jun 6, 2017

not my code, "gpl copied" and hacked from rdp and deadsix27 and others.

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2017

Succesfully built FFmpeg with GCC 7.1.0. No problems with Kyle's latest "MingGW-w64 Build Script".

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2017

I'm currently having problems building shared FFmpeg binaries (see https://trac.ffmpeg.org/ticket/6456).
Do these "undefined reference"-errors ring any bells for someone?

@rdp

This comment has been minimized.

Copy link
Owner

commented Jun 14, 2017

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Jun 18, 2017

I've tried a couple of things, but all unsuccessful so far. I'll let it rest for now.

@Reino17

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2017

I can't just let things like this rest that easily. I'm only satisfied until it's fixed. And I have.

I'm closing this "issue" now as I've succeeded in building a legacy hardware/software compatible static and shared FFmpeg build.

Fresh builds:

ffmpeg-N-86763-g341f012-win32-static_legacy.7z
ffmpeg-N-86763-g341f012-win32-shared_legacy.7z
libfdk-aac-x86-v0.1.5-17-gaf5863a.7z ('libfdk-aac-1.dll')
frei0r-plugins-x86-v1.6.1.7z
openssl-x86-v1.0.2l.7z ('libeay32.dll', 'ssleay32.dll')
openssl-x86-v1.1.0f.7z ('libcrypto-1_1.dll', 'libssl-1_1.dll')
FFmpeg downloads
Other downloads
Forum thread on zeranoe.com

Compared to last release:

mingw-w64-build-r21.local --> mingw-w64-build-r22.local (most notably GCC 6.3.0 --> 7.1.0)
netcdf-c_git (v4.4.1.1)   --> libmysofa_git
freetype-2.7.1            --> freetype-2.8
fontconfig-2.12.1         --> fontconfig-2.12.4
gnutls-3.5.12             --> gnutls-3.5.14
openssl-1.0.2k            --> openssl-1.0.2l
openssl-1.1.0e            --> openssl-1.1.0f
gsm-1.0-pl16              --> libsndfile_git (included)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.