├── README.md └── ffmpeg-static-OSX.command /README.md: -------------------------------------------------------------------------------- 1 | ## FFmpeg Static Builder 2 | #### Last Three OS with Intel Processor 3 | 4 | #### Include Last Versions of x264 | x265 | AV1 | FFmpeg… 5 | 6 | 7 | ``` 8 | ./configure --extra-version=adam-"$(date +"%Y-%m-%d")" --extra-cflags="-fno-stack-check" --arch=x86_64 --cc=/usr/bin/clang \ 9 | --enable-pthreads --enable-postproc --enable-runtime-cpudetect \ 10 | --pkg_config='pkg-config --static' --enable-nonfree --enable-gpl --enable-version3 --prefix=${TARGET} \ 11 | --disable-ffplay --disable-ffprobe --disable-debug --disable-doc --enable-avfilter --enable-avisynth --enable-filters \ 12 | --enable-libopus --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libfdk-aac --enable-encoder=aac \ 13 | --enable-libtwolame --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libgsm \ 14 | --enable-muxer=mp4 --enable-libxvid --enable-libopenh264 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libaom --enable-libdav1d --enable-librav1e \ 15 | --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-libass --enable-libsrt \ 16 | --enable-libbluray --enable-bzlib --enable-zlib --enable-lzma --enable-libsnappy --enable-libwebp --enable-libopenjpeg \ 17 | --enable-opengl --enable-opencl --enable-openal --enable-libzimg --enable-openssl --enable-librtmp 18 | ``` 19 | 20 | #### How Use : 21 | 22 | ##### =-> Download & Build : 23 | ``` 24 | cd ~/Desktop && git clone https://github.com/albinoz/ffmpeg-static-OSX.git && \ 25 | chmod 755 ~/Desktop/ffmpeg-static-OSX/ffmpeg-static-OSX.command && \ 26 | ~/Desktop/ffmpeg-static-OSX/ffmpeg-static-OSX.command 27 | ``` 28 | 29 | #### Result : 30 | 31 | ##### =-> On Successfully Build : 32 | `ffmpeg static binary will be copied on Desktop` 33 | 34 | ##### x-> On Error Build : 35 | `Please Report with log to` 36 | https://github.com/albinoz/ffmpeg-static-OSX/issues 37 | 38 | -------------------------------------------------------------------------------- /ffmpeg-static-OSX.command: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | ( exec &> >(while read -r line; do echo "$(date +"[%Y-%m-%d %H:%M:%S]") $line"; done;) #_Date to Every Line 4 | 5 | # Variables 6 | LANG=$(defaults read -g AppleLocale | cut -d'_' -f1) 7 | Uptime=$(system_profiler SPSoftwareDataType | grep "Time since boot:" | cut -d ':' -f2 | cut -d ' ' -f2-9) 8 | SytemVersion=$(system_profiler SPSoftwareDataType | grep "System Version:" | cut -d ':' -f2 | cut -d ' ' -f2-9) 9 | OSXMajor=$(sw_vers -productVersion | cut -d'.' -f1) 10 | 11 | # About 12 | tput bold ; echo "adam | 2014 < 2023-12-02" ; tput sgr0 13 | tput bold ; echo "Download & Build Last Static FFmpeg" ; tput sgr0 14 | 15 | # Infos 16 | echo; echo "Date:" `date +"%Y/%m/%d %T"` 17 | echo "User:" "$(hostname -s)" - "$(whoami)" - "$LANG" 18 | 19 | echo "Uptime:" "$Uptime" 20 | echo "Hardware:" "$(system_profiler SPHardwareDataType | grep "Model Identifier" | cut -d ':' -f2 | tr -d ' ') | $SytemVersion\ 21 | |$(system_profiler SPHardwareDataType | grep Memory | cut -d ':' -f2)\ 22 | |$(system_profiler SPHardwareDataType | grep "Number of Processors" | cut -d ':' -f2)x\ 23 | $(system_profiler SPHardwareDataType | grep Cores | cut -d ':' -f2 | tr -d ' ') \ 24 | $(system_profiler SPHardwareDataType | grep Speed | cut -d ':' -f2 | tr -d ' ')" 25 | 26 | # Check Processor & macOS Version Support 27 | tput bold ; echo ; echo '♻️ ' 'Check Processor & macOS Version Support' ; tput sgr0 28 | Processor=$(system_profiler SPHardwareDataType | grep Intel | cut -d ':' -f2 | cut -d ' ' -f2-10) 29 | if echo "$Processor" | grep Intel >/dev/null 2>&1 ; then echo "$Processor" Processor Supported ; else echo "$Processor" Processor not Supported \ 30 | ; echo Only Intel Processor Supported for this Build \ 31 | ; exit ; fi 32 | if [ "$OSXMajor" -ge 11 ] ; then echo "$SytemVersion" Supported ; else echo "$SytemVersion" not Supported \ 33 | ; echo "Only 3 Last macOS is Supported ( By Apple and HomeBrew )" \ 34 | ; exit ; fi 35 | 36 | #_ Check Xcode CLI Install 37 | tput bold ; echo ; echo '♻️ ' Check Xcode CLI Install ; tput sgr0 38 | if ls /Library/Developer/CommandLineTools >/dev/null 2>&1 ; then echo "Xcode CLI AllReady Installed" ; else echo "Xcode CLI Install" ; xcode-select --install 39 | while pgrep 'Install Command Line Developer Tools' >/dev/null ; do sleep 2 ; done 40 | if ls /Library/Developer/CommandLineTools >/dev/null 2>&1 ; then echo "Xcode CLI Was SucessFully Installed" ; else echo "Xcode CLI Was NOT Installed" ; exit ; fi ; fi 41 | 42 | #_ Check Homebrew Install 43 | tput bold ; echo ; echo '♻️ ' Check Homebrew Install ; tput sgr0 44 | if ls /*/*/*/brew >/dev/null ; then tput sgr0 ; echo "HomeBrew AllReady Installed" ; else tput bold ; echo "Installing HomeBrew" ; tput sgr0 ; export HOMEBREW_NO_INSTALL_FROM_API=1 45 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ; fi 46 | 47 | #_ Check Homebrew Update 48 | tput bold ; echo ; echo '♻️ ' Check Homebrew Update ; tput sgr0 49 | /*/*/*/brew cleanup ; /*/*/*/brew doctor ; /*/*/*/brew update ; /*/*/*/brew upgrade 50 | 51 | #_ Check Homebrew Config 52 | tput bold ; echo ; echo '♻️ ' Check Homebrew Config ; tput sgr0 53 | /*/*/*/brew install git wget cmake autoconf automake nasm libtool ninja meson pkg-config rtmpdump rust cargo-c jpeg libtiff python3 54 | 55 | #_ Check Miminum Requirement Build Time 56 | Time="$(echo 'obase=60;'$SECONDS | bc | sed 's/ /:/g' | cut -c 2-)" 57 | tput bold ; echo ; echo '⏳ ' Minimum Requirement Build in "$Time"s ; tput sgr0 58 | 59 | #_ Made RamDisk 60 | if diskutil list | grep RamDisk ; then 61 | echo RamDisk Exist 62 | else 63 | # Minimum RamDisk 64 | tput bold ; echo ; echo '💾 ' Made 2Go RamDisk ; tput sgr0 65 | diskutil erasevolume HFS+ 'RamDisk' $(hdiutil attach -nomount ram://4000000) 66 | fi 67 | 68 | #_ CPU & PATHS & ERROR 69 | THREADS=$(sysctl -n hw.ncpu) 70 | TARGET="/Volumes/RamDisk/sw" 71 | CMPL="/Volumes/RamDisk/compile" 72 | export PATH="${TARGET}"/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/include:/usr/local/opt:/usr/local/Cellar:/usr/local/lib:/usr/local/share:/usr/local/etc 73 | mdutil -i off /Volumes/RamDisk 74 | 75 | #_ Make RamDisk Directories 76 | mkdir ${TARGET} 77 | mkdir ${CMPL} 78 | rm -fr /Volumes/RamDisk/compile/* 79 | 80 | #-> BASE 81 | tput bold ; echo ; echo ; echo '⚙️ ' Base Builds ; tput sgr0 82 | 83 | #_ xz 84 | tput bold ; echo ; echo '📍 ' xz git ; tput sgr0 85 | if find /Volumes/RamDisk/sw/ | grep "xz" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 86 | cd ${CMPL} ; sleep 2 87 | git clone https://git.tukaani.org/xz.git 88 | cd xz 89 | ./autogen.sh 90 | ./configure --prefix=${TARGET} --enable-static --disable-shared --disable-docs --disable-examples 91 | make -j "$THREADS" && make install 92 | if find /Volumes/RamDisk/sw/ | grep "xz" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 93 | rm -fr /Volumes/RamDisk/compile/* 94 | fi 95 | 96 | #_ libexpat 97 | tput bold ; echo ; echo '📍 ' libexpat git ; tput sgr0 98 | if find /Volumes/RamDisk/sw/ | grep "expat" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 99 | cd ${CMPL} ; sleep 2 100 | git clone https://github.com/libexpat/libexpat.git libexpat 101 | cd libexpat/expat 102 | ./buildconf.sh 103 | ./configure --prefix=${TARGET} CPPFLAGS=-DXML_LARGE_SIZE --enable-static 104 | make -j "$THREADS" && make install DESTDIR=/ 105 | if find /Volumes/RamDisk/sw/ | grep "expat" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 106 | rm -fr /Volumes/RamDisk/compile/* 107 | fi 108 | 109 | #_ libiconv 110 | LastVersion=$(wget --no-check-certificate 'https://ftp.gnu.org/pub/gnu/libiconv/' -O- -q | grep -Eo 'libiconv-[0-9\.]+\.tar.gz' | tail -1) 111 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 112 | if find /Volumes/RamDisk/sw/ | grep "iconv" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 113 | cd ${CMPL} ; sleep 2 114 | wget --no-check-certificate 'https://ftp.gnu.org/pub/gnu/libiconv/'"$LastVersion" 115 | tar -zxvf libiconv* 116 | cd libiconv*/ 117 | ./configure --prefix=${TARGET} --with-iconv=${TARGET} --enable-static --enable-extra-encodings 118 | make -j "$THREADS" && make install 119 | if find /Volumes/RamDisk/sw/ | grep "iconv" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 120 | rm -fr /Volumes/RamDisk/compile/* 121 | fi 122 | 123 | #_ pkg-config 124 | LastVersion=$(wget --no-check-certificate 'https://pkg-config.freedesktop.org/releases/' -O- -q | grep -Eo 'pkg-config-0.29[0-9\.]+\.tar.gz' | tail -1) 125 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 126 | if find /Volumes/RamDisk/sw/ | grep "pkg-config" >/dev/null ; then echo Build All Ready Done ; else 127 | cd ${CMPL} ; sleep 2 128 | wget --no-check-certificate 'https://pkg-config.freedesktop.org/releases/'"$LastVersion" 129 | tar -zxvf pkg-config-* 130 | cd pkg-config-*/ 131 | ./configure --prefix=${TARGET} --disable-shared --enable-static --disable-debug --disable-host-tool --with-internal-glib 132 | make -j "$THREADS" && make check && make install 133 | if find /Volumes/RamDisk/sw/ | grep "pkg-config" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 134 | rm -fr /Volumes/RamDisk/compile/* 135 | fi 136 | 137 | #_ libpng * Required from freetype & webp 138 | tput bold ; echo ; echo '📍 ' libpng git ; tput sgr0 139 | if find /Volumes/RamDisk/sw/ | grep "libpng" >/dev/null ; then echo Build All Ready Done ; else 140 | cd ${CMPL} ; sleep 2 141 | git clone https://github.com/glennrp/libpng.git 142 | cd libpn*/ 143 | ./configure --prefix=${TARGET} --enable-static --disable-dependency-tracking --disable-silent-rules 144 | make -j "$THREADS" && make install 145 | if find /Volumes/RamDisk/sw/ | grep "libpng" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 146 | rm -fr /Volumes/RamDisk/compile/* 147 | fi 148 | 149 | #_ openjpeg 150 | tput bold ; echo ; echo '📍 ' openjpeg git ; tput sgr0 151 | if find /Volumes/RamDisk/sw/ | grep "openjpeg" >/dev/null ; then echo Build All Ready Done ; else 152 | cd ${CMPL} ; sleep 2 153 | git clone https://github.com/uclouvain/openjpeg.git 154 | cd openjpeg 155 | mkdir build && cd build 156 | cmake -G "Ninja" .. -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DLIBTYPE=STATIC 157 | ninja && ninja install 158 | if find /Volumes/RamDisk/sw/ | grep "openjpeg" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 159 | rm -fr /Volumes/RamDisk/compile/* 160 | fi 161 | 162 | #_ gettext - Requirement for fontconfig, fribidi 163 | LastVersion=$(wget --no-check-certificate 'https://ftp.gnu.org/pub/gnu/gettext/' -O- -q | grep -Eo 'gettext-[0-500\.]+\.[0-500\.]+\.[0-500\.]+\.tar.gz' | tail -1) 164 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 165 | if find /Volumes/RamDisk/sw/ | grep "gettext" >/dev/null ; then echo Build All Ready Done ; else 166 | cd ${CMPL} ; sleep 2 167 | wget --no-check-certificate 'https://ftp.gnu.org/pub/gnu/gettext/'"$LastVersion" 168 | tar -zxvf gettex* 169 | cd gettext-*/ 170 | ./configure --prefix=${TARGET} --disable-silent-rules --with-included-glib \ 171 | --with-included-libcroco --with-included-libunistring --with-included-libxml --with-emacs --disable-java --disable-csharp \ 172 | --disable-shared --enable-static --without-git --without-cvs --without-xz --with-included-gettext 173 | make -j "$THREADS" && make install 174 | if find /Volumes/RamDisk/sw/ | grep "gettext" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 175 | rm -fr /Volumes/RamDisk/compile/* 176 | fi 177 | 178 | #_ Yasm 179 | LastVersion=$(wget --no-check-certificate 'https://www.tortall.net/projects/yasm/releases/' -O- -q | grep -Eo 'yasm-[0-9\.]+\.tar.gz' | tail -1) 180 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 181 | if find /Volumes/RamDisk/sw/ | grep "yasm" >/dev/null ; then echo Build All Ready Done ; else 182 | cd ${CMPL} ; sleep 2 183 | wget --no-check-certificate 'https://www.tortall.net/projects/yasm/releases/'"$LastVersion" 184 | tar -zxvf /Volumes/RamDisk/compile/yasm-* 185 | cd yasm-*/ 186 | ./configure --prefix=${TARGET} && make -j "$THREADS" && make install 187 | if find /Volumes/RamDisk/sw/ | grep "yasm" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 188 | rm -fr /Volumes/RamDisk/compile/* 189 | fi 190 | 191 | #_ bzip2 192 | tput bold ; echo ; echo '📍 ' bzip2 git ; tput sgr0 193 | if find /Volumes/RamDisk/sw/ | grep "bzip" >/dev/null ; then echo Build All Ready Done ; else 194 | cd ${CMPL} ; sleep 2 195 | git clone git://sourceware.org/git/bzip2.git bzip2 196 | cd bzip2 197 | make -j "$THREADS" && make install PREFIX=${TARGET} 198 | if find /Volumes/RamDisk/sw/ | grep "bzip" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 199 | rm -fr /Volumes/RamDisk/compile/* 200 | fi 201 | 202 | #_ libsdl2 203 | LastVersion=$(wget --no-check-certificate 'https://www.libsdl.org/release/' -O- -q | grep -Eo 'SDL2-[0-9\.]+\.tar.gz' | tail -1) 204 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 205 | if find /Volumes/RamDisk/sw/ | grep "SDL2" >/dev/null ; then echo Build All Ready Done ; else 206 | cd ${CMPL} ; sleep 2 207 | wget --no-check-certificate 'https://www.libsdl.org/release/'"$LastVersion" 208 | tar xvf SDL2-*.tar.gz 209 | cd SDL2*/ 210 | ./autogen.sh 211 | ./configure --prefix=${TARGET} --enable-static --without-x --enable-hidapi 212 | make -j "$THREADS" && make install 213 | if find /Volumes/RamDisk/sw/ | grep "SDL2" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 214 | rm -fr /Volumes/RamDisk/compile/* 215 | fi 216 | 217 | #_ libudfread git 218 | tput bold ; echo ; echo '📍 ' libudfread git ; tput sgr0 219 | if find /Volumes/RamDisk/sw/ | grep "fread" >/dev/null ; then echo Build All Ready Done ; else 220 | cd ${CMPL} ; sleep 2 221 | git clone https://code.videolan.org/videolan/libudfread.git 222 | cd libud*/ 223 | ./bootstrap 224 | ./configure --prefix=${TARGET} --disable-shared --enable-static 225 | make -j "$THREADS" && make install 226 | if find /Volumes/RamDisk/sw/ | grep "fread" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 227 | fi 228 | 229 | #_ bluray git 230 | tput bold ; echo ; echo '📍 ' libbluray git ; tput sgr0 231 | if find /Volumes/RamDisk/sw/ | grep "libbluray" >/dev/null ; then echo Build All Ready Done ; else 232 | cd ${CMPL} ; sleep 2 233 | git clone https://code.videolan.org/videolan/libbluray.git 234 | cd libblura*/ 235 | ./bootstrap 236 | ./configure --prefix=${TARGET} --disable-shared --disable-dependency-tracking --disable-silent-rules --without-libxml2 --without-freetype --disable-doxygen-doc --disable-bdjava-jar 237 | make -j "$THREADS" && make install 238 | if find /Volumes/RamDisk/sw/ | grep "libbluray" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 239 | rm -fr /Volumes/RamDisk/compile/* 240 | fi 241 | 242 | 243 | #-> SUBTITLES 244 | tput bold ; echo ; echo ; echo '⚙️ ' Subtitles Builds ; tput sgr0 245 | 246 | #_ freetype 247 | LastVersion=$(wget --no-check-certificate 'https://download.savannah.gnu.org/releases/freetype/' -O- -q | grep -Eo 'freetype-[0-500\.]+\.[0-500\.]+\.[0-500\.]+\.tar.gz' | tail -1) 248 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 249 | if find /Volumes/RamDisk/sw/ | grep "freetype" >/dev/null ; then echo Build All Ready Done ; else 250 | cd ${CMPL} ; sleep 2 251 | wget --no-check-certificate 'https://download.savannah.gnu.org/releases/freetype/'"$LastVersion" 252 | tar xzpf freetype-* 253 | cd freetype-*/ 254 | pip3 install docwriter 255 | ./configure --prefix=${TARGET} --disable-shared --enable-static --enable-freetype-config 256 | make -j "$THREADS" && make install 257 | if find /Volumes/RamDisk/sw/ | grep "freetype" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 258 | rm -fr /Volumes/RamDisk/compile/* 259 | fi 260 | 261 | #_ fribidi 262 | tput bold ; echo ; echo '📍 ' fribidi 1.0.13 ; tput sgr0 263 | if find /Volumes/RamDisk/sw/ | grep "fribidi" >/dev/null ; then echo Build All Ready Done ; else 264 | cd ${CMPL} ; sleep 2 265 | wget --no-check-certificate https://github.com/fribidi/fribidi/releases/download/v1.0.13/fribidi-1.0.13.tar.xz 266 | tar -xJf fribid* 267 | cd fribid*/ 268 | ./configure --prefix=${TARGET} --disable-shared --enable-static --disable-silent-rules --disable-debug --disable-dependency-tracking 269 | make -j "$THREADS" && make install 270 | if find /Volumes/RamDisk/sw/ | grep "fribidi" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 271 | rm -fr /Volumes/RamDisk/compile/* 272 | fi 273 | 274 | #_ fontconfig 275 | LastVersion=$(wget --no-check-certificate 'https://www.freedesktop.org/software/fontconfig/release/' -O- -q | grep -Eo 'fontconfig-[0-500\.]+.tar.gz' | tail -1) 276 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 277 | if find /Volumes/RamDisk/sw/ | grep "fontconfig" >/dev/null ; then echo Build All Ready Done ; else 278 | cd ${CMPL} ; sleep 2 279 | wget --no-check-certificate 'https://www.freedesktop.org/software/fontconfig/release/'"$LastVersion" 280 | tar xzpf fontconfig-* 281 | cd fontconfig-*/ 282 | ./configure --prefix=${TARGET} --disable-dependency-tracking --disable-silent-rules --with-add-fonts="/System/Library/Fonts,/Library/Fonts" --disable-shared --enable-static 283 | make -j "$THREADS" && make install 284 | if find /Volumes/RamDisk/sw/ | grep "fontconfig" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 285 | rm -fr /Volumes/RamDisk/compile/* 286 | fi 287 | 288 | #_ harfbuzz git 289 | tput bold ; echo ; echo '📍 ' harfbuzz git ; tput sgr0 290 | if find /Volumes/RamDisk/sw/ | grep "harfbuzz" >/dev/null ; then echo Build All Ready Done ; else 291 | cd ${CMPL} ; sleep 2 292 | git clone https://github.com/harfbuzz/harfbuzz.git 293 | cd harfbuzz 294 | ./autogen.sh 295 | ./configure --prefix=${TARGET} --disable-shared --enable-static 296 | make -j "$THREADS" && make install 297 | if find /Volumes/RamDisk/sw/ | grep "harfbuzz" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 298 | rm -fr /Volumes/RamDisk/compile/* 299 | fi 300 | 301 | #_ libass git ( require harfbuzz ) 302 | tput bold ; echo ; echo '📍 ' libass git ; tput sgr0 303 | if find /Volumes/RamDisk/sw/ | grep "libass" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 304 | cd ${CMPL} ; sleep 2 305 | git clone https://github.com/libass/libass.git 306 | cd libas*/ 307 | ./autogen.sh 308 | ./configure --prefix=${TARGET} --disable-shared --enable-static 309 | make -j "$THREADS" && make install 310 | if find /Volumes/RamDisk/sw/ | grep "libass" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 311 | rm -fr /Volumes/RamDisk/compile/* 312 | fi 313 | 314 | #_ openssl 315 | LastVersion=$(wget --no-check-certificate 'https://www.openssl.org/source/' -O- -q | grep -Eo 'openssl-[0-9\.]+\.[0-9\.]+\.[0-9\.].tar.gz' | sort | tail -1) 316 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 317 | if find find /Volumes/RamDisk/sw/bin | grep "openssl" | grep "openssl" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 318 | cd ${CMPL} ; sleep 2 319 | wget --no-check-certificate https://www.openssl.org/source/"$LastVersion" 320 | tar -zxvf openssl* 321 | cd openssl-*/ 322 | ./Configure --prefix=${TARGET} -openssldir=${TARGET}/usr/local/etc/openssl no-ssl3 no-zlib enable-cms 323 | make -j "$THREADS" && make install 324 | if find /Volumes/RamDisk/sw/bin | grep "openssl" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 325 | rm -fr /Volumes/RamDisk/compile/* 326 | fi 327 | 328 | #_ srt ( Require openssl ) 329 | tput bold ; echo ; echo '📍 ' srt git ; tput sgr0 330 | if find /Volumes/RamDisk/sw/ | grep "srt-ffplay" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 331 | cd ${CMPL} ; sleep 2 332 | git clone --depth 1 https://github.com/Haivision/srt.git 333 | cd srt/ 334 | mkdir build && cd build 335 | cmake -G "Ninja" .. -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DENABLE_C_DEPS=ON -DENABLE_SHARED=OFF -DENABLE_STATIC=ON 336 | ninja && ninja install 337 | if find /Volumes/RamDisk/sw/ | grep "srt-ffplay" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 338 | rm -fr /Volumes/RamDisk/compile/* 339 | fi 340 | 341 | #_ snappy 342 | tput bold ; echo ; echo '📍 ' snappy git ; tput sgr0 343 | if find /Volumes/RamDisk/sw/ | grep "snappy" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 344 | cd ${CMPL} ; sleep 2 345 | git clone https://github.com/google/snappy.git 346 | cd snappy 347 | mkdir build && cd build 348 | cmake -G "Ninja" ../ -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DENABLE_SHARED="OFF" -DENABLE_C_DEPS="ON" -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF 349 | ninja && ninja install 350 | if find /Volumes/RamDisk/sw/ | grep "snappy" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 351 | rm -fr /Volumes/RamDisk/compile/* 352 | fi 353 | 354 | #-> AUDIO 355 | tput bold ; echo ; echo ; echo '⚙️ ' Audio Builds ; tput sgr0 356 | 357 | #_ openal-soft 358 | tput bold ; echo ; echo '📍 ' openal-soft git ; tput sgr0 359 | if find /Volumes/RamDisk/sw/ | grep "openal" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 360 | cd ${CMPL} ; sleep 2 361 | git clone https://github.com/kcat/openal-soft 362 | cd openal-soft*/ 363 | cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DLIBTYPE=STATIC -DALSOFT_BACKEND_PORTAUDIO=OFF -DALSOFT_BACKEND_PULSEAUDIO=OFF -DALSOFT_EXAMPLES=OFF -DALSOFT_MIDI_FLUIDSYNTH=OFF 364 | ninja && ninja install 365 | if find /Volumes/RamDisk/sw/ | grep "openal" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 366 | rm -fr /Volumes/RamDisk/compile/* 367 | fi 368 | 369 | #_ opencore-amr 370 | tput bold ; echo ; echo '📍 ' opencore-amr 0.1.6 ; tput sgr0 371 | if find /Volumes/RamDisk/sw/ | grep "amr" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 372 | cd ${CMPL} ; sleep 2 373 | curl -O https://freefr.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.6.tar.gz 374 | tar -zxvf opencore-amr-*.tar.gz 375 | cd opencore-amr-*/ 376 | ./configure --prefix=${TARGET} --disable-shared --enable-static 377 | make -j "$THREADS" && make install 378 | if find /Volumes/RamDisk/sw/ | grep "amr" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 379 | rm -fr /Volumes/RamDisk/compile/* 380 | fi 381 | 382 | #_ opus - Replace speex 383 | LastVersion=$(wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/opus/ -O- -q | grep -Eo 'opus-1.[0-9\.]+\.[0-9\.]+\.tar.gz' | tail -1) 384 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 385 | if find /Volumes/RamDisk/sw/ | grep "opus" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 386 | cd ${CMPL} ; sleep 2 387 | wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/opus/"$LastVersion" 388 | tar -zxvf opus-* 389 | cd opus-*/ 390 | ./configure --prefix=${TARGET} --disable-shared --enable-static 391 | make -j "$THREADS" && make install 392 | if find /Volumes/RamDisk/sw/ | grep "opus" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 393 | rm -fr /Volumes/RamDisk/compile/* 394 | fi 395 | 396 | #_ ogg 397 | LastVersion=$(wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/ogg/ -O- -q | grep -Eo 'libogg-[0-9\.]+\.tar.gz' | tail -1) 398 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 399 | if find /Volumes/RamDisk/sw/ | grep "ogg.pc" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 400 | cd ${CMPL} ; sleep 2 401 | wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/ogg/"$LastVersion" 402 | tar -zxvf libogg-* 403 | cd libogg-*/ 404 | ./configure --prefix=${TARGET} --disable-shared --enable-static --disable-dependency-tracking 405 | make -j "$THREADS" && make install 406 | if find /Volumes/RamDisk/sw/ | grep "ogg.pc" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 407 | rm -fr /Volumes/RamDisk/compile/* 408 | fi 409 | 410 | #_ Theora git - Require nf automake libtool 411 | tput bold ; echo ; echo '📍 ' theora git ; tput sgr0 412 | if find /Volumes/RamDisk/sw/ | grep "theora" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 413 | cd ${CMPL} ; sleep 2 414 | git clone https://github.com/xiph/theora.git 415 | cd theora 416 | ./autogen.sh 417 | ./configure --prefix=${TARGET} --with-ogg-libraries=${TARGET}/lib --with-ogg-includes=${TARGET}/include/ --with-vorbis-libraries=${TARGET}/lib --with-vorbis-includes=${TARGET}/include/ --enable-static --disable-shared 418 | make -j "$THREADS" && make install 419 | if find /Volumes/RamDisk/sw/ | grep "theora" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 420 | rm -fr /Volumes/RamDisk/compile/* 421 | fi 422 | 423 | #_ vorbis 424 | LastVersion=$(wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/vorbis/ -O- -q | grep -Eo 'libvorbis-[0-9\.]+\.tar.gz' | tail -1) 425 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 426 | if find /Volumes/RamDisk/sw/ | grep "vorbisfile.pc" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 427 | cd ${CMPL} ; sleep 2 428 | wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/vorbis/"$LastVersion" 429 | tar -zxvf libvorbis-* 430 | cd libvorbis-*/ 431 | # Patch 432 | sed 's/-force_cpusubtype_ALL//g' configure.ac > configure.ac2 433 | rm configure.ac ; mv configure.ac2 configure.ac 434 | ./autogen.sh 435 | ./configure --prefix=${TARGET} --disable-dependency-tracking --with-ogg-libraries=${TARGET}/lib --with-ogg-includes=/Volumes/RamDisk/sw/include/ --enable-static --disable-shared 436 | make -j "$THREADS" && make install 437 | if find /Volumes/RamDisk/sw/ | grep "vorbisfile.pc" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 438 | rm -fr /Volumes/RamDisk/compile/* 439 | fi 440 | 441 | #_ lame git 442 | tput bold ; echo ; echo '📍 ' lame git ; tput sgr0 443 | if find /Volumes/RamDisk/sw/ | grep "lame" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 444 | cd ${CMPL} ; sleep 2 445 | git clone https://github.com/rbrito/lame.git 446 | cd lam*/ 447 | ./configure --prefix=${TARGET} --disable-shared --enable-static 448 | make -j "$THREADS" && make install 449 | if find /Volumes/RamDisk/sw/ | grep "lame" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 450 | rm -fr /Volumes/RamDisk/compile/* 451 | fi 452 | 453 | #_ TwoLame - optimised MPEG Audio Layer 2 454 | LastVersion=$(wget --no-check-certificate 'https://www.twolame.org' -O- -q | grep -Eo 'twolame-[0-9\.]+\.tar.gz' | tail -1) 455 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 456 | if find /Volumes/RamDisk/sw/ | grep "twolame" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 457 | cd ${CMPL} ; sleep 2 458 | wget --no-check-certificate 'https://downloads.sourceforge.net/twolame/'"$LastVersion" 459 | tar -zxvf twolame-* 460 | cd twolame-*/ 461 | ./configure --prefix=${TARGET} --enable-static --enable-shared=no 462 | make -j "$THREADS" && make install 463 | if find /Volumes/RamDisk/sw/ | grep "twolame" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 464 | rm -fr /Volumes/RamDisk/compile/* 465 | fi 466 | 467 | #_ fdk-aac 468 | tput bold ; echo ; echo '📍 ' fdk-aac git ; tput sgr0 469 | cd ${CMPL} ; sleep 2 470 | if find /Volumes/RamDisk/sw/ | grep "fdk-aac" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 471 | git clone https://github.com/mstorsjo/fdk-aac.git 472 | cd fdk*/ 473 | ./autogen.sh 474 | ./configure --disable-dependency-tracking --prefix=${TARGET} --enable-static --enable-shared=no 475 | make -j "$THREADS" && make install 476 | if find /Volumes/RamDisk/sw/ | grep "fdk-aac" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 477 | rm -fr /Volumes/RamDisk/compile/* 478 | fi 479 | 480 | #_ gsm 481 | LastVersion=$(wget --no-check-certificate 'https://www.quut.com/gsm/' -O- -q | grep -Eo 'gsm-[0-9\.]+\.tar.gz' | tail -1) 482 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 483 | if find /Volumes/RamDisk/sw/ | grep "gsm" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 484 | cd ${CMPL} ; sleep 2 485 | wget --no-check-certificate 'https://www.quut.com/gsm/'"$LastVersion" 486 | tar -zxvf gsm* 487 | cd gsm*/ 488 | mkdir -p ${TARGET}/man/man3 489 | mkdir -p ${TARGET}/man/man1 490 | mkdir -p ${TARGET}/include/gsm 491 | perl -p -i -e "s#^INSTALL_ROOT.*#INSTALL_ROOT = $TARGET#g" Makefile 492 | perl -p -i -e "s#_ROOT\)/inc#_ROOT\)/include#g" Makefile 493 | sed "/GSM_INSTALL_INC/s/include/include\/gsm/g" Makefile > Makefile.new 494 | mv Makefile.new Makefile 495 | make -j "$THREADS" && make install 496 | if find /Volumes/RamDisk/sw/ | grep "gsm" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 497 | rm -fr /Volumes/RamDisk/compile/* 498 | fi 499 | 500 | #_ speex 501 | LastVersion=$(wget --no-check-certificate 'https://downloads.us.xiph.org/releases/speex/' -O- -q | grep -Eo 'speex-[0-9\.]+\.tar.gz' | tail -1) 502 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 503 | if find /Volumes/RamDisk/sw/ | grep "speex" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 504 | cd ${CMPL} ; sleep 2 505 | wget https://downloads.us.xiph.org/releases/speex/"$LastVersion" 506 | tar xvf speex-*.tar.gz 507 | cd speex-*/ 508 | ./configure --prefix=${TARGET} --enable-static --enable-shared=no 509 | make -j "$THREADS" && make install 510 | if find /Volumes/RamDisk/sw/ | grep "speex" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 511 | rm -fr /Volumes/RamDisk/compile/* 512 | fi 513 | 514 | 515 | #-> VIDEO 516 | tput bold ; echo ; echo ; echo '⚙️ ' Video Builds ; tput sgr0 517 | 518 | #_ libzimg 519 | tput bold ; echo ; echo '📍 ' libzimg 3.0.5 ; tput sgr0 520 | if find /Volumes/RamDisk/sw/ | grep "zimg.pc" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 521 | cd ${CMPL} ; sleep 2 522 | wget --no-check-certificate https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.5.tar.gz 523 | tar xvf release-*.tar.gz 524 | cd zimg-*/ 525 | ./autogen.sh 526 | ./Configure --prefix=${TARGET} --disable-shared --enable-static 527 | make -j "$THREADS" && make install 528 | if find /Volumes/RamDisk/sw/ | grep "zimg.pc" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 529 | rm -fr /Volumes/RamDisk/compile/* 530 | fi 531 | 532 | #_ libvpx git 533 | tput bold ; echo ; echo '📍 ' vpx git ; tput sgr0 534 | cd ${CMPL} ; sleep 2 535 | if find /Volumes/RamDisk/sw/ | grep "vpx" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 536 | git clone https://github.com/webmproject/libvpx.git 537 | cd libvp*/ 538 | ./configure --prefix=${TARGET} --enable-vp8 --enable-postproc --enable-vp9-postproc --enable-vp9-highbitdepth --disable-examples --disable-docs --enable-multi-res-encoding --disable-unit-tests --enable-pic --disable-shared 539 | make -j "$THREADS" && make install 540 | if find /Volumes/RamDisk/sw/ | grep "vpx" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 541 | rm -fr /Volumes/RamDisk/compile/* 542 | fi 543 | 544 | #_ webp 545 | tput bold ; echo ; echo '📍 ' webp git ; tput sgr0 546 | cd ${CMPL} ; sleep 2 547 | if find /Volumes/RamDisk/sw/ | grep "webp" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 548 | git clone https://chromium.googlesource.com/webm/libwebp 549 | cd libweb*/ 550 | ./autogen.sh 551 | ./configure --prefix=${TARGET} --disable-dependency-tracking --disable-shared --enable-static --disable-gif --disable-gl --enable-libwebpdecoder --enable-libwebpdemux --enable-libwebpmux 552 | make -j "$THREADS" && make install 553 | if find /Volumes/RamDisk/sw/ | grep "webp" >/dev/null 2>&1 ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 554 | rm -fr /Volumes/RamDisk/compile/* 555 | fi 556 | 557 | #_ aom-av1 git 558 | tput bold ; echo ; echo '📍 ' aom-av1 git ; tput sgr0 559 | if find /Volumes/RamDisk/sw/ | grep "aom" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 560 | cd ${CMPL} ; sleep 2 561 | git clone https://aomedia.googlesource.com/aom 562 | cd aom 563 | mkdir aom_build && cd aom_build 564 | cmake -G "Ninja" /Volumes/RamDisk/compile/aom -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DLIBTYPE=STATIC 565 | ninja && ninja install 566 | if find /Volumes/RamDisk/sw/ | grep "aom" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 567 | rm -fr /Volumes/RamDisk/compile/* 568 | fi 569 | 570 | #_ svt-av1 git 571 | #tput bold ; echo ; echo '📍 ' svt-av1 git ; tput sgr0 572 | #if find /Volumes/RamDisk/sw/ | grep "SvtAv1" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 573 | #cd ${CMPL} ; sleep 2 574 | #git clone --depth=1 https://gitlab.com/AOMediaCodec/SVT-AV1.git 575 | #cd SVT-AV1/Build/ 576 | #cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} 577 | #make -j "$THREADS" && make install 578 | #if find /Volumes/RamDisk/sw/ | grep "SvtAv1" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 579 | #rm -fr /Volumes/RamDisk/compile/* 580 | #fi 581 | 582 | #_ dav1d git - Require ninja, meson 583 | tput bold ; echo ; echo '📍 ' dav1d git ; tput sgr0 584 | cd ${CMPL} ; sleep 2 585 | if find /Volumes/RamDisk/sw/ | grep "dav1d" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 586 | git clone https://code.videolan.org/videolan/dav1d.git 587 | cd dav1*/ 588 | meson --prefix=${TARGET} build --buildtype release --default-library static 589 | ninja install -C build 590 | if find /Volumes/RamDisk/sw/ | grep "dav1d" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 591 | rm -fr /Volumes/RamDisk/compile/* 592 | fi 593 | 594 | #_ rav1e git - Require rust & cargo 595 | tput bold ; echo ; echo '📍 ' rav1e git ; tput sgr0 596 | if find /Volumes/RamDisk/sw/ | grep "rav1e" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 597 | cd ${CMPL} ; sleep 2 598 | git clone https://github.com/xiph/rav1e.git 599 | cd rav1e 600 | cargo cinstall --release --prefix=${TARGET} --libdir=${TARGET}/lib --includedir=${TARGET}/include 601 | if find /Volumes/RamDisk/sw/ | grep "rav1e" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 602 | rm -fr /Volumes/RamDisk/compile/* 603 | fi 604 | 605 | #_ xvid 606 | LastVersion=$(wget --no-check-certificate https://downloads.xvid.com/downloads/ -O- -q | grep -Eo 'xvidcore-[0-9\.]+\.tar.gz' | tail -1) 607 | tput bold ; echo ; echo '📍 ' "$LastVersion" Last ; tput sgr0 608 | if find /Volumes/RamDisk/sw/ | grep "xvid" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 609 | cd ${CMPL} ; sleep 2 610 | wget --no-check-certificate https://downloads.xvid.com/downloads/"$LastVersion" 611 | tar -zxvf xvidcore* 612 | cd xvidcore/build/generic/ 613 | ./bootstrap.sh 614 | ./configure --prefix=${TARGET} --disable-assembly --enable-macosx_module 615 | make -j "$THREADS" && make install 616 | if find /Volumes/RamDisk/sw/ | grep "xvid" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 617 | rm -fr /Volumes/RamDisk/compile/* 618 | fi 619 | 620 | #_ openh264 621 | tput bold ; echo ; echo '📍 ' openH264 git ; tput sgr0 622 | if find /Volumes/RamDisk/sw/ | grep "openh264" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 623 | cd ${CMPL} ; sleep 2 624 | git clone https://github.com/cisco/openh264.git 625 | cd openh264/ 626 | make -j "$THREADS" install-static PREFIX=${TARGET} 627 | if find /Volumes/RamDisk/sw/ | grep "openh264" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 628 | rm -fr /Volumes/RamDisk/compile/* 629 | fi 630 | 631 | #_ x264 8-10bit git - Require nasm 632 | tput bold ; echo ; echo '📍 ' x264 8-10bit git ; tput sgr0 633 | cd ${CMPL} ; sleep 2 634 | if find /Volumes/RamDisk/sw/ | grep "x264" >/dev/null ; then echo Build All Ready Done ; else 635 | git clone https://code.videolan.org/videolan/x264.git 636 | cd x264/ 637 | ./configure --prefix=${TARGET} --enable-static --bit-depth=all --chroma-format=all 638 | make -j "$THREADS" && make install 639 | if find /Volumes/RamDisk/sw/ | grep "x264" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 640 | rm -fr /Volumes/RamDisk/compile/* 641 | fi 642 | 643 | #_ x265 8-10-12bit - Require wget, cmake, yasm, nasm, libtool, ninja 644 | tput bold ; echo ; echo '📍 ' x265 8-10-12bit git ; tput sgr0 645 | if find /Volumes/RamDisk/sw/ | grep "x265" >/dev/null ; then echo Build All Ready Done ; else 646 | cd ${CMPL} 647 | git clone https://bitbucket.org/multicoreware/x265_git/src/master/ x265-master 648 | cd x265*/source/ 649 | mkdir -p 8bit 10bit 12bit 650 | 651 | tput bold ; echo ; echo '📍 ' x265 12bit Build ; tput sgr0 ; sleep 2 652 | cd 12bit 653 | cmake -G "Ninja" ../../../x265*/source -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON 654 | ninja ${MAKEFLAGS} 655 | 656 | tput bold ; echo ; echo '📍 ' x265 10bit Build ; tput sgr0 ; sleep 2 657 | cd ../10bit 658 | cmake -G "Ninja" ../../../x265*/source -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF 659 | ninja ${MAKEFLAGS} 660 | 661 | tput bold ; echo ; echo '📍 ' x265 10-12bit Link ; tput sgr0 ; sleep 2 662 | cd ../8bit 663 | ln -sf ../10bit/libx265.a libx265_main10.a 664 | ln -sf ../12bit/libx265.a libx265_main12.a 665 | 666 | tput bold ; echo ; echo '📍 ' x265 8-10-12bit Build ; tput sgr0 667 | cmake -G "Ninja" ../../../x265*/source -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DENABLE_SHARED=NO -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON 668 | ninja ${MAKEFLAGS} 669 | 670 | tput bold ; echo ; echo '📍 ' x265 Install ; tput sgr0 671 | #_ rename the 8bit library, then combine all three into libx265.a 672 | mv libx265.a libx265_main.a 673 | #_ Mac/BSD libtool 674 | libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 675 | ninja install 676 | rm -fr /Volumes/RamDisk/compile/* 677 | if find /Volumes/RamDisk/sw/ | grep "x265" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 678 | fi 679 | 680 | #_ AviSynth+ 681 | tput bold ; echo ; echo '📍 ' AviSynthPlus git ; tput sgr0 682 | if find /Volumes/RamDisk/sw/ | grep "avisynth" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 683 | cd ${CMPL} ; sleep 2 684 | git clone https://github.com/AviSynth/AviSynthPlus.git 685 | cd AviSynthPlus 686 | mkdir avisynth-build && cd avisynth-build 687 | cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DHEADERS_ONLY:bool=on 688 | make VersionGen install 689 | if find /Volumes/RamDisk/sw/ | grep "avisynth" >/dev/null ; then tput bold ; echo Build OK ; else echo Build Fail ; tput sgr0 ; exit ; fi 690 | rm -fr /Volumes/RamDisk/compile/* 691 | fi 692 | 693 | #_ librtmp 694 | tput bold ; echo ; echo '📍 ' librtmp Copy ; tput sgr0 ; sleep 2 695 | if find /Volumes/RamDisk/sw/ | grep "rtmp" >/dev/null 2>&1 ; then echo Build All Ready Done ; else 696 | cp -v /usr/local/Cellar/rtmpdump/*/bin/* /Volumes/RamDisk/sw/bin/ 697 | cp -vr /usr/local/Cellar/rtmpdump/*/include/* /Volumes/RamDisk/sw/include/ 698 | cp -v /usr/local/Cellar/rtmpdump/*/lib/pkgconfig/librtmp.pc /Volumes/RamDisk/sw/lib/pkgconfig 699 | cp -v /usr/local/Cellar/rtmpdump/*/lib/librtmp* /Volumes/RamDisk/sw/lib 700 | fi 701 | 702 | #-> FFmpeg Check 703 | tput bold ; echo ; echo ; echo '⚙️ ' FFmpeg Build ; tput sgr0 704 | 705 | #_ Purge .dylib 706 | tput bold ; echo ; echo '💢 ' Purge .dylib ; tput sgr0 ; sleep 2 707 | rm -vfr $TARGET/lib/*.dylib 708 | rm -vfr /usr/local/opt/libx11/lib/libX11.6.dylib 709 | 710 | #_ Flags 711 | tput bold ; echo ; echo '🚩 ' Define FLAGS ; tput sgr0 ; sleep 2 712 | export LDFLAGS="-L${TARGET}/lib -Wl,-framework,OpenAL" 713 | export CPPFLAGS="-I${TARGET}/include -Wl,-framework,OpenAL" 714 | export CFLAGS="-I${TARGET}/include -Wl,-framework,OpenAL,-fno-stack-check" 715 | 716 | #_ FFmpeg Build 717 | tput bold ; echo ; echo '📍 ' FFmpeg git ; tput sgr0 718 | cd ${CMPL} ; sleep 2 719 | git clone git://git.ffmpeg.org/ffmpeg.git 720 | cd ffmpe*/ 721 | ./configure --extra-version=adam-"$(date +"%Y-%m-%d")" --extra-cflags="-fno-stack-check" --cc=/usr/bin/clang \ 722 | --enable-pthreads --enable-postproc --enable-runtime-cpudetect \ 723 | --pkg_config='pkg-config --static' --enable-nonfree --enable-gpl --enable-version3 --prefix=${TARGET} \ 724 | --disable-ffplay --disable-ffprobe --disable-debug --disable-doc --enable-avfilter --enable-avisynth --enable-filters \ 725 | --enable-libopus --enable-libtheora --enable-libvorbis --enable-libspeex --enable-libmp3lame --enable-libfdk-aac --enable-encoder=aac \ 726 | --enable-libtwolame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libgsm \ 727 | --enable-libxvid --enable-libopenh264 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libaom --enable-libdav1d --enable-librav1e \ 728 | --enable-libfreetype --enable-libfribidi --enable-libass --enable-libsrt --enable-libfontconfig \ 729 | --enable-libbluray --enable-bzlib --enable-zlib --enable-lzma --enable-libsnappy --enable-libopenjpeg --enable-libwebp \ 730 | --enable-opengl --enable-opencl --enable-openal --enable-libzimg --enable-openssl --enable-librtmp --enable-muxer=mp4 731 | 732 | make -j "$THREADS" && make install 733 | 734 | #_ Check Static 735 | tput bold ; echo ; echo '♻️ ' Check Static FFmpeg ; tput sgr0 ; sleep 2 736 | if otool -L /Volumes/RamDisk/sw/bin/ffmpeg | grep /usr/local 737 | then echo FFmpeg build Not Static, Please Report 738 | open ~/Library/Logs/adam-FFmpeg-Static.log 739 | else echo FFmpeg build Static, Have Fun 740 | cp /Volumes/RamDisk/sw/bin/ffmpeg ~/Desktop/ffmpeg 741 | fi 742 | 743 | #_ End Time 744 | Time="$(echo 'obase=60;'$SECONDS | bc | sed 's/ /:/g' | cut -c 2-)" 745 | tput bold ; echo ; echo '⏳ ' End in "$Time"s ; tput sgr0 746 | echo ) 2>&1 | tee "$HOME/Library/Logs/adam-FFmpeg-Static.log" 747 | --------------------------------------------------------------------------------