3 # Copyright (c) 2018 Intel Corporation
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
19 if [ $EUID -ne 0 ]; then
20 echo "ERROR: this script must be run as root to install 3rd party packages." >&2
21 echo "Please try again with \"sudo -E $0\", or as root." >&2
28 if [ "$params" == "-y" ]; then
33 read -p "Add third-party RPM Fusion repository and install FFmpeg package (y/n): " yn
41 yes_or_no_gst_bad_ugly() {
42 if [ "$params" == "-y" ]; then
47 read -p "Add third-party RPM Epel, Nux, Fusion, Forensics repositories and install dependencies for GStreamer Bad & Ugly Plugins (y/n): " yn
55 if [ -f /etc/lsb-release ]; then
58 echo "This script installs the following OpenVINO 3rd-party dependencies:"
59 echo " 1. GTK+, FFmpeg and GStreamer libraries used by OpenCV"
60 echo " 2. libusb library required for Myriad plugin for Inference Engine"
61 echo " 3. build dependencies for OpenVINO samples"
62 echo " 4. build dependencies for GStreamer Plugins"
71 gstreamer1.0-plugins-base
72 gstreamer1.0-plugins-good
73 gstreamer1.0-plugins-bad
77 system_ver=$(cat /etc/lsb-release | grep -i "DISTRIB_RELEASE" | cut -d "=" -f2)
78 if [ "$system_ver" = "16.04" ]; then
81 if [ "$system_ver" = "20.04" ]; then
83 gstreamer1.0-plugins-ugly
85 libgstreamer-plugins-base1.0-dev
93 gstreamer1.0-pulseaudio
94 libgstrtspserver-1.0-dev
102 elif [ "$system_ver" = "18.04" ]; then
107 gstreamer1.0-plugins-ugly
115 gobject-introspection
132 # shellcheck disable=SC2068
133 apt install -y ${PKGS[@]}
137 echo "This script installs the following OpenVINO 3rd-party dependencies:"
138 echo " 1. GTK+ and GStreamer libraries used by OpenCV"
139 echo " 2. libusb library required for Myriad plugin for Inference Engine"
140 echo " 3. Python 3.6 for Model Optimizer"
141 echo " 4. gcc 4.8.5 and other build dependencies for OpenVINO samples"
142 echo " 5. build dependencies for GStreamer Plugins"
148 gstreamer1-plugins-good
149 gstreamer1-plugins-bad-free
167 gobject-introspection
204 yum install -y ${PKGS[@]}
206 # Thirdparty repositories for installing GStreamer Bad & Ugly Plugins dependencies.
207 if yes_or_no_gst_bad_ugly; then
249 webrtc-audio-processing
261 yum install -y epel-release
262 rpm -Uvh https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
263 RPMFUSION_IS_INSTALLED=1
264 yum install -y https://forensics.cert.org/cert-forensics-tools-release-el7.rpm
265 yum install -y ${GST_BAD_UGLY_PKGS[@]}
267 echo "Dependencies for GStreamer Ugly & Bad plugins installation skipped."
272 echo "Intel(R) Distribution of OpenVINO(TM) toolkit can use FFmpeg for processing video streams with OpenCV. Please select your preferred method for installing FFmpeg:"
274 echo "Option 1: Allow installer script to add a third party repository, RPM Fusion (https://rpmfusion.org/), which contains FFmpeg. FFmpeg rpm package will be installed from this repository. "
275 echo "WARNING: This repository is NOT PROVIDED OR SUPPORTED by Intel or CentOS. Neither Intel nor CentOS has control over this repository. Terms governing your use of FFmpeg can be found here: https://www.ffmpeg.org/legal.html "
276 echo "Once added, this repository will be enabled on your operating system and can thus receive updates to all packages installed from it. "
278 echo "Consider the following ways to prevent unintended 'updates' from this third party repository from over-writing some core part of CentOS:"
279 echo "a) Only enable these archives from time to time, and generally leave them disabled. See: man yum"
280 echo "b) Use the exclude= and includepkgs= options on a per sub-archive basis, in the matching .conf file found in /etc/yum.repos.d/ See: man yum.conf"
281 echo "c) The yum Priorities plug-in can prevent a 3rd party repository from replacing base packages, or prevent base/updates from replacing a 3rd party package."
283 echo "Option 2: Skip FFmpeg installation."
286 if yes_or_no_ffmpeg; then
287 if [[ -z $RPMFUSION_IS_INSTALLED ]]; then
288 yum install -y epel-release
289 rpm -Uvh https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
291 yum install -y ffmpeg
293 echo "FFmpeg installation skipped. You may build FFmpeg from sources as described here: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos"