-
Notifications
You must be signed in to change notification settings - Fork 12
/
install-ffmpeg
executable file
·72 lines (59 loc) · 3.04 KB
/
install-ffmpeg
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
#!/bin/bash
##################################################################################################
# hoobs-core #
# Copyright (C) 2020 HOOBS #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
##################################################################################################
OS=""
ARCH=""
PACKAGE_MNGR=""
get_os()
{
OS=$(uname)
ARCH=$(uname -m)
}
get_package_manager()
{
if command -v yum > /dev/null; then
PACKAGE_MNGR="yum"
elif command -v dnf > /dev/null; then
PACKAGE_MNGR="dnf"
elif command -v apt-get > /dev/null; then
PACKAGE_MNGR="apt"
fi
}
if [ "$(id -u)" != "0" ]; then
echo "This script needs to be ran with elevated permissons (sudo)"
exit
fi
get_os
get_package_manager
if [[ "$OS" = "Linux" && "$PACKAGE_MNGR" = "apt" ]]; then
if [[ "$ARCH" = "armv7l" || "$ARCH" = "aarch64" ]]; then
apt-get update
apt-get install -y libtool-bin libtool openssl libopus-dev libx264-dev libvpx-dev libvorbis-dev libtheora-dev libmp3lame-dev libfreetype6-dev libass-dev libspeex-dev libfontconfig-dev frei0r-plugins-dev libfribidi-dev librubberband-dev libsoxr-dev libvidstab-dev libwebp-dev libxml2-dev libxvidcore-dev
echo "Installing FFMPEG"
wget https://github.com/hoobs-org/hoobs-build/raw/master/stage7/00-ffmpeg/files/ffmpeg.tar.gz
tar -xzf ./ffmpeg.tar.gz -C /usr/local --strip-components=1 --no-same-owner > /dev/null 2>&1
rm -f ./ffmpeg.tar.gz > /dev/null 2>&1
echo "Configuring"
ldconfig -n /usr/local/lib
ldconfig
echo "FFMPEG is installed"
exit
fi
fi
echo "This version of FFMPEG can not be installed on this device"
exit