Created
July 25, 2019 01:11
-
-
Save kode54/f48abb70cad69be3264101a5debba7cc to your computer and use it in GitHub Desktop.
ffmpeg-windows-build-helpers altered script for vgmstream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cross_compile_ffmpeg.sh b/cross_compile_ffmpeg.sh | |
index 1109aa3..cddac5a 100755 | |
--- a/cross_compile_ffmpeg.sh | |
+++ b/cross_compile_ffmpeg.sh | |
@@ -1934,38 +1934,13 @@ build_ffmpeg() { | |
init_options+=" --disable-schannel" | |
# Fix WinXP incompatibility by disabling Microsoft's Secure Channel, because Windows XP doesn't support TLS 1.1 and 1.2, but with GnuTLS or OpenSSL it does. XP compat! | |
fi | |
- config_options="$init_options --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libaom --enable-libopenjpeg --enable-libopenh264 --enable-liblensfun --enable-libvmaf --enable-libsrt --enable-demuxer=dash --enable-libxml2" | |
- if [[ $compiler_flavors != "native" ]]; then | |
- config_options+=" --enable-nvenc --enable-nvdec" # don't work OS X | |
- fi | |
+ config_options="$init_options --build-suffix=-vgmstream --enable-shared --disable-static --disable-w32threads --enable-gpl --disable-doc --disable-ffplay --disable-ffprobe --disable-avdevice --disable-ffmpeg --disable-postproc --disable-avfilter --disable-swscale --disable-network --disable-swscale-alpha --disable-vdpau --disable-dxva2 --disable-amf --disable-cuda --disable-d3d11va --disable-ffnvcodec --disable-nvenc --disable-nvdec --disable-hwaccels --disable-sdl2 --disable-iconv --disable-everything --enable-hwaccels --enable-swresample --enable-libopus --enable-parser=ac3,mpegaudio,xma,vorbis,opus --enable-demuxer=ac3,asf,xwma,mov,oma,ogg,tak,dsf,wav,aac,dts,dtshd,mp3,bink,flac,msf,xmv,caf,ape,smacker,pcm_s8,spdif,mpc,mpc8 --enable-decoder=ac3,wmapro,wmav1,wmav2,wmavoice,wmalossless,xma1,xma2,dca,tak,dsd_lsbf,dsd_lsbf_planar,dsd_mbf,dsd_msbf_planar,aac,atrac3,atrac3p,mp1float,mp2float,mp3float,binkaudio_dct,binkaudio_rdft,flac,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,vorbis,ape,adpcm_ima_qt,smackaud,libopus,pcm_s8,pcm_s8_planar,mpc7,mpc8,alac,adpcm_ima_dk3,adpcm_ima_dk4 --disable-parser=mpeg4video,h263 --disable-decoder=mpeg2video,h263,h264,mpeg1video,mpeg2video,mpeg4,hevc,vp9 --disable-cuvid --disable-version3" | |
- config_options+=" --extra-libs=-lharfbuzz" # grr...needed for pre x264 build??? | |
config_options+=" --extra-libs=-lm" # libflite seemed to need this linux native...and have no .pc file huh? | |
config_options+=" --extra-libs=-lpthread" # for some reason various and sundry needed this linux native | |
config_options+=" --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC" # if we ever do a git pull then it nukes changes, which overrides manual changes to configure, so just use these for now :| | |
- if [[ $build_amd_amf = n ]]; then | |
- config_options+=" --disable-amf" # Since its autodetected we have to disable it if we do not want it. #unless we define no autodetection but.. we don't. | |
- else | |
- config_options+=" --enable-amf" # This is actually autodetected but for consistency.. we might as well set it. | |
- fi | |
- | |
- if [[ $build_intel_qsv = y ]]; then | |
- config_options+=" --enable-libmfx" | |
- else | |
- config_options+=" --disable-libmfx" | |
- fi | |
- if [[ $enable_gpl == 'y' ]]; then | |
- config_options+=" --enable-gpl --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid" | |
- if [[ $compiler_flavors != "native" ]]; then | |
- config_options+=" --enable-libxavs" # don't compile OS X | |
- fi | |
- fi | |
local licensed_gpl=n # lgpl build with libx264 included for those with "commercial" license :) | |
- if [[ $licensed_gpl == 'y' ]]; then | |
- apply_patch file://$patch_dir/x264_non_gpl.diff -p1 | |
- config_options+=" --enable-libx264" | |
- fi | |
# other possibilities: | |
# --enable-w32threads # [worse UDP than pthreads, so not using that] | |
config_options+=" --enable-avresample" # guess this is some kind of libav specific thing (the FFmpeg fork) but L-Smash needs it so why not always build it :) | |
@@ -1976,11 +1951,6 @@ build_ffmpeg() { | |
config_options+=" $postpend_configure_opts" | |
- if [[ "$non_free" = "y" ]]; then | |
- config_options+=" --enable-nonfree --enable-decklink --enable-libfdk-aac" | |
- # other possible options: --enable-openssl [unneeded since we use gnutls] | |
- fi | |
- | |
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 real param :) | |
if [[ "$do_debug_build" = "y" ]]; then | |
# not sure how many of these are actually needed/useful...possibly none LOL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment