-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrun.sh
executable file
·123 lines (96 loc) · 2.13 KB
/
run.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/usr/bin/env bash
set -euo pipefail
##
# Compilation multiplateformes de ffmpeg static avec modules additionnels
#
# Modules supportés :
# - libfdk_aac (Fraunhofer FDK AAC)
# - libvorbis (ogg)
# - libmp3lame
# - libass (sous-titrage)
# - libx264
# - libx265
# - libfreetype (pour drawtext)
# - libfontconfig (fallback font par défaut)
# - libflite (WIP) (text 2 speech) darwin only
##
ABS_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "DEBUT"
# shellcheck disable=SC1091
. "$ABS_PATH/conf.ini.sh"
# shellcheck disable=SC1091
. "$ABS_PATH/functions.sh"
OS=$(detectOs)
if [[ ! "$OS" ]]; then
echo "OS inconnu / non supporté"
exit 1
fi
CPU_COUNT=$(cpuCount)
if [[ ! "$CPU_COUNT" ]]; then
echo "Nombre de CPU inconnu"
exit 1
fi
export SRC_PATH="$ABS_PATH/src"
export BUILD_PATH="$ABS_PATH/build"
export BIN_PATH="$ABS_PATH/bin"
export FFMPEG_ENABLE="--enable-gpl --enable-nonfree"
echo "- Création des répertoires de travail"
mkBaseDirs
#echo "- Mise à jour globale du système"
# nécessaire si environnement docker
systemUpdate
echo "- Installation des dépendances générales"
installDependencies
echo "- Installation des assembleurs"
installNASM
installYasm
if [[ $ENABLE_MP3LAME -eq 1 ]]; then
installLibMp3Lame
enableLibMp3Lame
fi
if [[ $ENABLE_VORBIS -eq 1 ]]; then
installLibVorbis
enableLibVorbis
fi
if [[ $ENABLE_FDKAAC -eq 1 ]]; then
installLibFdkAac
enableLibFdkAac
fi
if [[ $ENABLE_OPUS -eq 1 ]]; then
installLibOpus
enableLibOpus
fi
if [[ $ENABLE_X264 -eq 1 ]]; then
installLibX264
enableLibX264
fi
if [[ $ENABLE_X265 -eq 1 ]]; then
installLibX265
enableLibX265
fi
if [[ $ENABLE_VPX -eq 1 ]]; then
installLibVpx
enableLibVpx
fi
if [[ $ENABLE_ASS -eq 1 ]]; then
installLibAss
enableLibAss
fi
if [[ $ENABLE_OPENSSL -eq 1 ]]; then
enableOpenssl
fi
if [[ $ENABLE_ZIMG -eq 1 ]]; then
enableZimg
fi
# @see http://johnriselvato.com/how-to-install-flite-flitevox-for-ffmpeg/
if [[ $ENABLE_FLITE -eq 1 ]] && [[ $OS == "darwin" ]]; then
installFlite
enableLibFlite
fi
if [[ $ENABLE_FFPLAY -eq 1 ]]; then
enableFfplay
else
disableFfplay
fi
installFfmpeg
echo "FIN"