Viper

From fd.io
Revision as of 17:07, 8 March 2018 by Manang (Talk | contribs)

Jump to: navigation, search

Viper Player for ICN

VIPER is an MPEG-DASH video player that supports video retrieval using TCP or CICN from an HTTP video server using several video qualities. VIPER implements a variety of adaptive controllers such as PANDA, AdapTech, and BOLA. It supports video qualities up to UHD but best tablets can render up to FHD such as iPad Pro or Google Pixel. The video player does not support audio streams as it is mainly used as a prototype for demonstrations. This feature will be available later on.

Dependencies

  • ffmpeg
  • libboost-system-dev
  • libparc
  • libccnx-common
  • libccnx-transport-rta
  • long-bow
  • libxml2
  • libcurl4
  • libdash
  • libicnet
  • Qt5.7
  • QtAV

Quick Start

Installation from binary packages

Android 7 (to appear on Google Play)

Download apps from the following link

https://jenkins.fd.io/view/cicn/job/cicn-android-sdk-merge-master-ubuntu1604/

iOS 10 (to appear on Apple Store)

build instructions to appear soon.

Mac Os X Download the Qt environment from https://www.qt.io/download and install it.

 $ QT_DIR=<qt_base_folder>/<version>
 $ BASE_DIR=`pwd`
 $ SRC_PATH=${BASE_DIR}/src
 $ mkdir -p $SRC_PATH
 $ BUILD_PATH=${BASE_DIR}/build
 $ mkdir -p $BUILD_PATH
 $ if which brew >/dev/null; then
	if brew ls --versions openssl > /dev/null; then
		echo "openssl installed"
	else \
		brew install openssl
		brew link openssl
	fi
	if brew ls --versions libevent > /dev/null; then
		echo "libevent installed"
	else
		brew install libevent
		brew link libevent
	fi
	if brew ls --versions boost > /dev/null; then
		echo "boost installed"
	else
		brew install boost
		brew link boost
	fi
    else
    	echo brew does not exist
    	exit 1
   fi
 $ cd ${SRC_PATH}
 $ if [ ! -d ${SRC_PATH}/cframework ]; then
	git clone -b cframework/master https://gerrit.fd.io/r/cicn cframework
   fi
 $ mkdir -p ${BUILD_PATH}/cframework/longbow
 $ cd ${BUILD_PATH}/cframework/longbow
 $ cmake ${SRC_PATH}/cframework/longbow
 $ make
 $ make install
 $ mkdir -p ${BUILD_PATH}/cframework/libparc 
 $ cd ${BUILD_PATH}/cframework/libparc
 $ cmake ${SRC_PATH}/cframework/libparc -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
 $ make
 $ make install
 $ if brew ls --versions ffmpeg > /dev/null; then
	echo "ffmpeg installed"
    else
	brew install ffmpeg
	brew link ffmpeg
   fi
 $ cd ${SRC_PATH}
 
 $ if [ ! -d ${SRC_PATH}/QtAV ]; then
	git clone https://github.com/wang-bin/QtAV.git
   fi
 $ export CPATH=/usr/local/include:$CPATH
 $ export LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH
 $ mkdir -p ${BUILD_PATH}/QtAV
 $ cd ${BUILD_PATH}/QtAV
 $ $QT_DIR/clang_64/bin/qmake ${SRC_PATH}/QtAV/
 $ make
 $ bash sdk_install.sh
 $ cd ${SRC_PATH}
 $ if [ ! -d ${SRC_PATH}/ccnxlibs ]; then
	git clone -b ccnxlibs/master https://gerrit.fd.io/r/cicn ccnxlibs
   fi
 $ mkdir -p ${BUILD_PATH}/ccnxlibs/libccnx-common 
 $ cd ${BUILD_PATH}/ccnxlibs/libccnx-common 
 $ cmake  ${SRC_PATH}/ccnxlibs/libccnx-common -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
 $ make
 $ make install
 $ mkdir -p ${BUILD_PATH}/ccnxlibs/libccnx-transport-rta
 $ cd ${BUILD_PATH}/ccnxlibs/libccnx-transport-rta 
 $ cmake  ${SRC_PATH}/ccnxlibs/libccnx-transport-rta -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
 $ make
 $ make install
 $ mkdir -p ${BUILD_PATH}/ccnxlibs/libccnx-portal
 $ cd ${BUILD_PATH}/ccnxlibs/libccnx-portal 
 $ cmake  ${SRC_PATH}/ccnxlibs/libccnx-portal -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
 $ make
 $ make install
 $ cd ${SRC_PATH}
 $ if [ ! -d ${SRC_PATH}/sb-forwarder ]; then
	git clone -b sb-forwarder/master https://gerrit.fd.io/r/cicn sb-forwarder
   fi
 $ mkdir -p ${BUILD_PATH}/sb-forwarder/metis
 $ cd ${BUILD_PATH}/sb-forwarder/metis
 $ cmake  ${SRC_PATH}/sb-forwarder/metis -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1
 $ make
 $ make install
 $ cd ${SRC_PATH}
 $ if [ ! -d ${SRC_PATH}/libicnet ]; then
	git clone -b libicnet/master https://gerrit.fd.io/r/cicn libicnet
   fi	
 $ mkdir -p ${BUILD_PATH}/libicnet
 $ cd ${BUILD_PATH}/libicnet
 $ cmake  ${SRC_PATH}/libicnet
 $ make
 $ make install
 $ cd ${SRC_PATH}
 $ if [ ! -d ${SRC_PATH}/http-server ]; then
	git clone -b http-server/master https://gerrit.fd.io/r/cicn http-server
   fi
 $ mkdir -p ${BUILD_PATH}/http-server
 $ cd ${BUILD_PATH}/http-server
 $ cmake  ${SRC_PATH}/http-server
 $ make
 $ make install
 $ cd ${SRC_PATH}
 $ if [ ! -d ${SRC_PATH}/viper ]; then
 	git clone ssh://git@bitbucket-eng-gpk1.cisco.com:7999/icn/viper.git
   fi
 $ mkdir -p ${BUILD_PATH}/libdash
 $ cd ${BUILD_PATH}/libdash
 $ cmake  ${SRC_PATH}/viper/libdash
 $ make
 $ make install
 $ mkdir -p ${BUILD_PATH}/viper
 $ cd ${BUILD_PATH}/viper
 $ $QT_DIR/clang_64/bin/qmake ${SRC_PATH}/viper/
 $ make


Ubuntu 16.04

 $ sudo apt-get install software-properties-common
 $ echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.master.ubuntu.$(lsb_release -sc).main/ ./" \
          | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
 $ sudo add-apt-repository --yes ppa:beineri/opt-qt571-xenial
 $ wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
 $ echo "deb [trusted=yes] http://archive.getdeb.net/ubuntu xenial-getdeb apps" | sudo tee -a /etc/apt/sources.list.d/getdeb.list
 $ sudo apt-get update
 $ sudo apt-get install viper

Build the dependencies

  • QtAV For building and install the library, from the root folder of the projet:
 $ git clone https://github.com/wang-bin/QtAV
 $ cd QtAV
 $ mkdir build && cd build
 $ qmake ../QtAV.pro
 $ make
 $ sh sdk_install.sh
  • libdash For building the player, from the root folder of the project:
 $ git clone -b viper/master https://gerrit.fd.io/r/cicn viper
 $ cd viper/libdash
 $ mkdir build && cd build
 $ cmake ../
 $ make
 $ make install

Build the player

For building the player, from the root folder of the project:

 $ cd viper
 $ mkdir build && cd build
 $ qmake ../viper.pro
 $ make
 $ ./viper

Platforms

Viper has been tested in:

- Ubuntu 16.04 (x86_64)
- MacOSX 10.13
- Android 7
- iOS 10