-
Notifications
You must be signed in to change notification settings - Fork 3
/
bld_ffmpeg_64.sh
37 lines (34 loc) · 997 Bytes
/
bld_ffmpeg_64.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
if [ $MSYSTEM != "MINGW64" ]; then
echo "You MUST launch MSYS2 using mingw64_shell.bat"
echo "OR set the PROCESS environment variable: MSYSTEM , to 'MINGW64', prior launching mintty.exe"
exit
fi
if [ ! -d ffmpeg ]; then
mkdir ffmpeg
fi
cd ffmpeg
if [ ! -d .git ]; then
git clone -v --progress --config core.autocrlf=false https://github.com/FFmpeg/FFmpeg.git ./
else
git pull -v --progress
fi
cd ~
if [ ! -d ff64 ]; then
mkdir ff64
else
rm -rd ff64
mkdir ff64
fi
cd ff64
~/ffmpeg/configure --prefix="/mingw64" --target-os=mingw32\
--extra-cflags="-fexcess-precision=fast -I/mingw64/include/openjpeg-1.5" \
--enable-static --enable-avresample \
--enable-pthreads --enable-runtime-cpudetect --enable-gpl \
--enable-version3 --enable-libopus --enable-libopenjpeg \
--enable-avisynth --disable-doc --disable-debug \
--disable-network --disable-shared --disable-w32threads
make clean
THREAD=$(nproc)
THREAD=$((THREAD<2?1:THREAD-1))
make -j$THREAD && make install