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
76 system_ver=$(cat /etc/lsb-release | grep -i "DISTRIB_RELEASE" | cut -d "=" -f2)
77 if [ "$system_ver" = "16.04" ]; then
80 if [ "$system_ver" = "20.04" ]; then
81 PKGS+=( libgstreamer1.0-0
82 gstreamer1.0-plugins-base
83 gstreamer1.0-plugins-good
84 gstreamer1.0-plugins-bad
85 gstreamer1.0-plugins-ugly
87 libgstreamer-plugins-base1.0-dev
95 gstreamer1.0-pulseaudio
96 libgstrtspserver-1.0-dev
102 elif [ "$system_ver" = "18.04" ]; then
103 PKGS+=( libfluidsynth1
114 gobject-introspection
118 libgirepository-1.0-1
193 libwebrtc-audio-processing1
212 apt install -y ${PKGS[@]}
216 echo "This script installs the following OpenVINO 3rd-party dependencies:"
217 echo " 1. GTK+ and GStreamer libraries used by OpenCV"
218 echo " 2. libusb library required for Myriad plugin for Inference Engine"
219 echo " 3. Python 3.6 for Model Optimizer"
220 echo " 4. gcc 4.8.5 and other build dependencies for OpenVINO samples"
221 echo " 5. build dependencies for GStreamer Plugins"
227 gstreamer1-plugins-good
228 gstreamer1-plugins-bad-free
246 gobject-introspection
283 yum install -y ${PKGS[@]}
285 # Thirdparty repositories for installing GStreamer Bad & Ugly Plugins dependencies.
286 if yes_or_no_gst_bad_ugly; then
328 webrtc-audio-processing
340 yum install -y epel-release
341 rpm -Uvh https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
342 RPMFUSION_IS_INSTALLED=1
343 yum install -y https://forensics.cert.org/cert-forensics-tools-release-el7.rpm
344 yum install -y ${GST_BAD_UGLY_PKGS[@]}
346 echo "Dependencies for GStreamer Ugly & Bad plugins installation skipped."
351 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:"
353 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. "
354 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 "
355 echo "Once added, this repository will be enabled on your operating system and can thus receive updates to all packages installed from it. "
357 echo "Consider the following ways to prevent unintended 'updates' from this third party repository from over-writing some core part of CentOS:"
358 echo "a) Only enable these archives from time to time, and generally leave them disabled. See: man yum"
359 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"
360 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."
362 echo "Option 2: Skip FFmpeg installation."
365 if yes_or_no_ffmpeg; then
366 if [[ -z $RPMFUSION_IS_INSTALLED ]]; then
367 yum install -y epel-release
368 rpm -Uvh https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
370 yum install -y ffmpeg
372 echo "FFmpeg installation skipped. You may build FFmpeg from sources as described here: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos"